diff options
Diffstat (limited to 'arch/powerpc/kernel/idle_book3e.S')
-rw-r--r-- | arch/powerpc/kernel/idle_book3e.S | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/arch/powerpc/kernel/idle_book3e.S b/arch/powerpc/kernel/idle_book3e.S index 16c002d6bdf1..ff007b59448d 100644 --- a/arch/powerpc/kernel/idle_book3e.S +++ b/arch/powerpc/kernel/idle_book3e.S | |||
@@ -29,43 +29,30 @@ _GLOBAL(book3e_idle) | |||
29 | wrteei 0 | 29 | wrteei 0 |
30 | 30 | ||
31 | /* Now check if an interrupt came in while we were soft disabled | 31 | /* Now check if an interrupt came in while we were soft disabled |
32 | * since we may otherwise lose it (doorbells etc...). We know | 32 | * since we may otherwise lose it (doorbells etc...). |
33 | * that since PACAHARDIRQEN will have been cleared in that case. | ||
34 | */ | 33 | */ |
35 | lbz r3,PACAHARDIRQEN(r13) | 34 | lbz r3,PACAIRQHAPPENED(r13) |
36 | cmpwi cr0,r3,0 | 35 | cmpwi cr0,r3,0 |
37 | beqlr | 36 | bnelr |
38 | 37 | ||
39 | /* Now we are going to mark ourselves as soft and hard enables in | 38 | /* Now we are going to mark ourselves as soft and hard enabled in |
40 | * order to be able to take interrupts while asleep. We inform lockdep | 39 | * order to be able to take interrupts while asleep. We inform lockdep |
41 | * of that. We don't actually turn interrupts on just yet tho. | 40 | * of that. We don't actually turn interrupts on just yet tho. |
42 | */ | 41 | */ |
43 | #ifdef CONFIG_TRACE_IRQFLAGS | 42 | #ifdef CONFIG_TRACE_IRQFLAGS |
44 | stdu r1,-128(r1) | 43 | stdu r1,-128(r1) |
45 | bl .trace_hardirqs_on | 44 | bl .trace_hardirqs_on |
45 | addi r1,r1,128 | ||
46 | #endif | 46 | #endif |
47 | li r0,1 | 47 | li r0,1 |
48 | stb r0,PACASOFTIRQEN(r13) | 48 | stb r0,PACASOFTIRQEN(r13) |
49 | stb r0,PACAHARDIRQEN(r13) | ||
50 | 49 | ||
51 | /* Interrupts will make use return to LR, so get something we want | 50 | /* Interrupts will make use return to LR, so get something we want |
52 | * in there | 51 | * in there |
53 | */ | 52 | */ |
54 | bl 1f | 53 | bl 1f |
55 | 54 | ||
56 | /* Hard disable interrupts again */ | 55 | /* And return (interrupts are on) */ |
57 | wrteei 0 | ||
58 | |||
59 | /* Mark them off again in the PACA as well */ | ||
60 | li r0,0 | ||
61 | stb r0,PACASOFTIRQEN(r13) | ||
62 | stb r0,PACAHARDIRQEN(r13) | ||
63 | |||
64 | /* Tell lockdep about it */ | ||
65 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
66 | bl .trace_hardirqs_off | ||
67 | addi r1,r1,128 | ||
68 | #endif | ||
69 | ld r0,16(r1) | 56 | ld r0,16(r1) |
70 | mtlr r0 | 57 | mtlr r0 |
71 | blr | 58 | blr |