Searched hist:ad9064d5 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/arch/powerpc/include/asm/ |
H A D | delay.h | ad9064d5 Mon Jun 29 08:40:51 CDT 2009 Grant Likely <grant.likely@secretlab.ca> powerpc: Fix spin_event_timeout() to be robust over context switches
Current implementation of spin_event_timeout can be interrupted by an IRQ or context switch after testing the condition, but before checking the timeout. This can cause the loop to report a timeout when the condition actually became true in the middle.
This patch adds one final check of the condition upon exit of the loop if the last test of the condition was still false.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> ad9064d5 Mon Jun 29 08:40:51 CDT 2009 Grant Likely <grant.likely@secretlab.ca> powerpc: Fix spin_event_timeout() to be robust over context switches Current implementation of spin_event_timeout can be interrupted by an IRQ or context switch after testing the condition, but before checking the timeout. This can cause the loop to report a timeout when the condition actually became true in the middle. This patch adds one final check of the condition upon exit of the loop if the last test of the condition was still false. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|