diff options
author | Jon Hunter <jon-hunter@ti.com> | 2009-06-27 00:07:25 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-10-05 10:50:59 -0700 |
commit | 77da2d910a17e1e6a7e949578723d5aab58568d5 (patch) | |
tree | 4d66e52b5644931c6d1c4808053cf26a0dd39fc1 /init/noinitramfs.c | |
parent | 17d857be649a21ca90008c6dc425d849fa83db5c (diff) | |
download | op-kernel-dev-77da2d910a17e1e6a7e949578723d5aab58568d5.zip op-kernel-dev-77da2d910a17e1e6a7e949578723d5aab58568d5.tar.gz |
OMAP3: PM: Prevent hang in prcm_interrupt_handler
There are two scenarios where a race condition could result in a hang
in the prcm_interrupt handler. These are:
1). Waiting for PRM_IRQSTATUS_MPU register to clear.
Bit 0 of the PRM_IRQSTATUS_MPU register indicates that a wake-up event
is pending for the MPU. This bit can only be cleared if the all the
wake-up events latched in the various PM_WKST_x registers have been
cleared. If a wake-up event occurred during the processing of the prcm
interrupt handler, after the corresponding PM_WKST_x register was
checked but before the PRM_IRQSTATUS_MPU was cleared, then the CPU
would be stuck forever waiting for bit 0 in PRM_IRQSTATUS_MPU to be
cleared.
2). Waiting for the PM_WKST_x register to clear.
Some power domains have more than one wake-up source. The PM_WKST_x
registers indicate the source of a wake-up event and need to be cleared
after a wake-up event occurs. When the PM_WKST_x registers are read and
before they are cleared, it is possible that another wake-up event
could occur causing another bit to be set in one of the PM_WKST_x
registers. If this did occur after reading a PM_WKST_x register then
the CPU would miss this event and get stuck forever in a loop waiting
for that PM_WKST_x register to clear.
This patch address the above race conditions that would result in a
hang.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'init/noinitramfs.c')
0 files changed, 0 insertions, 0 deletions