OSDN Git Service

ARM: hwmod: RTC: Don't assume lock/unlock will be called with irq enabled
authorDave Gerlach <d-gerlach@ti.com>
Thu, 21 Jun 2018 09:13:08 +0000 (14:43 +0530)
committerTony Lindgren <tony@atomide.com>
Tue, 3 Jul 2018 08:46:52 +0000 (01:46 -0700)
commit6d609b35c815ba20132b7b64bcca04516bb17c56
tree1902092256e2b4825e309c5049757297c085d0d4
parentce397d215ccd07b8ae3f71db689aedb85d56ab40
ARM: hwmod: RTC: Don't assume lock/unlock will be called with irq enabled

When the RTC lock and unlock functions were introduced it was likely
assumed that they would always be called from irq enabled context, hence
the use of local_irq_disable/enable. This is no longer true as the
RTC+DDR path makes a late call during the suspend path after irqs
have been disabled to enable the RTC hwmod which calls both unlock and
lock, leading to IRQs being reenabled through the local_irq_enable call
in omap_hwmod_rtc_lock call.

To avoid this change the local_irq_disable/enable to
local_irq_save/restore to ensure that from whatever context this is
called the proper IRQ configuration is maintained.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod_reset.c