diff options
| -rw-r--r-- | arch/powerpc/include/asm/hw_irq.h | 5 | ||||
| -rw-r--r-- | arch/powerpc/platforms/pseries/processor_idle.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index 32b394f3b854..6eb75b80488c 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h | |||
| @@ -103,6 +103,11 @@ static inline void hard_irq_disable(void) | |||
| 103 | /* include/linux/interrupt.h needs hard_irq_disable to be a macro */ | 103 | /* include/linux/interrupt.h needs hard_irq_disable to be a macro */ |
| 104 | #define hard_irq_disable hard_irq_disable | 104 | #define hard_irq_disable hard_irq_disable |
| 105 | 105 | ||
| 106 | static inline bool lazy_irq_pending(void) | ||
| 107 | { | ||
| 108 | return !!(get_paca()->irq_happened & ~PACA_IRQ_HARD_DIS); | ||
| 109 | } | ||
| 110 | |||
| 106 | /* | 111 | /* |
| 107 | * This is called by asynchronous interrupts to conditionally | 112 | * This is called by asynchronous interrupts to conditionally |
| 108 | * re-enable hard interrupts when soft-disabled after having | 113 | * re-enable hard interrupts when soft-disabled after having |
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c index 41a34bc4a9a2..e61483e8e960 100644 --- a/arch/powerpc/platforms/pseries/processor_idle.c +++ b/arch/powerpc/platforms/pseries/processor_idle.c | |||
| @@ -106,7 +106,7 @@ static void check_and_cede_processor(void) | |||
| 106 | * we first hard disable then check. | 106 | * we first hard disable then check. |
| 107 | */ | 107 | */ |
| 108 | hard_irq_disable(); | 108 | hard_irq_disable(); |
| 109 | if (get_paca()->irq_happened == 0) | 109 | if (!lazy_irq_pending()) |
| 110 | cede_processor(); | 110 | cede_processor(); |
| 111 | } | 111 | } |
| 112 | 112 | ||
