From ed1dbe6a11b8272c52beac7eafbd38377b0cd706 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Wed, 27 Jun 2012 13:13:52 +0000 Subject: [PATCH] --- yaml --- r: 311499 b: refs/heads/master c: 0b17ba7258db83cd02da560884e053b85de371f2 h: refs/heads/master i: 311497: 7eec2e024bf7457ac7b68c7b5c24530167ca0e09 311495: 1d6cce2aebd69197f523d1f2fce2707988697b9e v: v3 --- [refs] | 2 +- trunk/arch/powerpc/include/asm/hw_irq.h | 5 +++++ trunk/arch/powerpc/platforms/pseries/processor_idle.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index f7c7780a4aaa..bb80aacbfd5e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2d773aa4810d4a612d1c879faacc38594cc3f841 +refs/heads/master: 0b17ba7258db83cd02da560884e053b85de371f2 diff --git a/trunk/arch/powerpc/include/asm/hw_irq.h b/trunk/arch/powerpc/include/asm/hw_irq.h index 32b394f3b854..6eb75b80488c 100644 --- a/trunk/arch/powerpc/include/asm/hw_irq.h +++ b/trunk/arch/powerpc/include/asm/hw_irq.h @@ -103,6 +103,11 @@ static inline void hard_irq_disable(void) /* include/linux/interrupt.h needs hard_irq_disable to be a macro */ #define hard_irq_disable hard_irq_disable +static inline bool lazy_irq_pending(void) +{ + return !!(get_paca()->irq_happened & ~PACA_IRQ_HARD_DIS); +} + /* * This is called by asynchronous interrupts to conditionally * re-enable hard interrupts when soft-disabled after having diff --git a/trunk/arch/powerpc/platforms/pseries/processor_idle.c b/trunk/arch/powerpc/platforms/pseries/processor_idle.c index 41a34bc4a9a2..e61483e8e960 100644 --- a/trunk/arch/powerpc/platforms/pseries/processor_idle.c +++ b/trunk/arch/powerpc/platforms/pseries/processor_idle.c @@ -106,7 +106,7 @@ static void check_and_cede_processor(void) * we first hard disable then check. */ hard_irq_disable(); - if (get_paca()->irq_happened == 0) + if (!lazy_irq_pending()) cede_processor(); }