diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-05-11 01:22:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-11 11:29:34 -0400 |
commit | e1fa2e136ff64a3814a98c03d46320b9e80d29c8 (patch) | |
tree | 14620d6f3361274139cccded4b38dc7e0347a593 /arch/powerpc/platforms | |
parent | 2acdb1694494eb6f17b44b2b3065879af32d0d46 (diff) |
powerpc: fixup hard_irq_disable semantics
This patch renames the raw hard_irq_{enable,disable} into
__hard_irq_{enable,disable} and introduces a higher level hard_irq_disable()
function that can be used by any code to enforce that IRQs are fully disabled,
not only lazy disabled.
The difference with the __ versions is that it will update some per-processor
fields so that the kernel keeps track and properly re-enables them in the next
local_irq_disable();
This prepares powerpc for my next patch that introduces hard_irq_disable()
generically.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/cell/pervasive.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c index 8c20f0fb8651..812bf563ed65 100644 --- a/arch/powerpc/platforms/cell/pervasive.c +++ b/arch/powerpc/platforms/cell/pervasive.c | |||
@@ -43,12 +43,10 @@ static void cbe_power_save(void) | |||
43 | unsigned long ctrl, thread_switch_control; | 43 | unsigned long ctrl, thread_switch_control; |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * We need to hard disable interrupts, but we also need to mark them | 46 | * We need to hard disable interrupts, the local_irq_enable() done by |
47 | * hard disabled in the PACA so that the local_irq_enable() done by | 47 | * our caller upon return will hard re-enable. |
48 | * our caller upon return propertly hard enables. | ||
49 | */ | 48 | */ |
50 | hard_irq_disable(); | 49 | hard_irq_disable(); |
51 | get_paca()->hard_enabled = 0; | ||
52 | 50 | ||
53 | ctrl = mfspr(SPRN_CTRLF); | 51 | ctrl = mfspr(SPRN_CTRLF); |
54 | 52 | ||