diff options
author | Stuart Yoder <stuart.yoder@freescale.com> | 2012-07-05 00:41:35 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-07-11 00:18:22 -0400 |
commit | 9778b696a0188ad3b3524b383953ee73b31b7b68 (patch) | |
tree | ae706a4c23f3e5da85c6bc6e33a534eb20d0d338 /arch/powerpc/kernel | |
parent | db9112173b185995b80f56e136bd2ae44e4e6366 (diff) |
powerpc: Use CURRENT_THREAD_INFO instead of open coded assembly
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 24 | ||||
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/exceptions-64e.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/exceptions-64s.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_6xx.S | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_book3e.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_e500.S | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_power4.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/iommu.c.rej | 22 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 4 |
11 files changed, 51 insertions, 29 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index ba3aeb4bc06a..bad42e3d27a9 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -92,7 +92,7 @@ crit_transfer_to_handler: | |||
92 | mfspr r8,SPRN_SPRG_THREAD | 92 | mfspr r8,SPRN_SPRG_THREAD |
93 | lwz r0,KSP_LIMIT(r8) | 93 | lwz r0,KSP_LIMIT(r8) |
94 | stw r0,SAVED_KSP_LIMIT(r11) | 94 | stw r0,SAVED_KSP_LIMIT(r11) |
95 | rlwimi r0,r1,0,0,(31-THREAD_SHIFT) | 95 | CURRENT_THREAD_INFO(r0, r1) |
96 | stw r0,KSP_LIMIT(r8) | 96 | stw r0,KSP_LIMIT(r8) |
97 | /* fall through */ | 97 | /* fall through */ |
98 | #endif | 98 | #endif |
@@ -112,7 +112,7 @@ crit_transfer_to_handler: | |||
112 | mfspr r8,SPRN_SPRG_THREAD | 112 | mfspr r8,SPRN_SPRG_THREAD |
113 | lwz r0,KSP_LIMIT(r8) | 113 | lwz r0,KSP_LIMIT(r8) |
114 | stw r0,saved_ksp_limit@l(0) | 114 | stw r0,saved_ksp_limit@l(0) |
115 | rlwimi r0,r1,0,0,(31-THREAD_SHIFT) | 115 | CURRENT_THREAD_INFO(r0, r1) |
116 | stw r0,KSP_LIMIT(r8) | 116 | stw r0,KSP_LIMIT(r8) |
117 | /* fall through */ | 117 | /* fall through */ |
118 | #endif | 118 | #endif |
@@ -158,7 +158,7 @@ transfer_to_handler: | |||
158 | tophys(r11,r11) | 158 | tophys(r11,r11) |
159 | addi r11,r11,global_dbcr0@l | 159 | addi r11,r11,global_dbcr0@l |
160 | #ifdef CONFIG_SMP | 160 | #ifdef CONFIG_SMP |
161 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) | 161 | CURRENT_THREAD_INFO(r9, r1) |
162 | lwz r9,TI_CPU(r9) | 162 | lwz r9,TI_CPU(r9) |
163 | slwi r9,r9,3 | 163 | slwi r9,r9,3 |
164 | add r11,r11,r9 | 164 | add r11,r11,r9 |
@@ -179,7 +179,7 @@ transfer_to_handler: | |||
179 | ble- stack_ovf /* then the kernel stack overflowed */ | 179 | ble- stack_ovf /* then the kernel stack overflowed */ |
180 | 5: | 180 | 5: |
181 | #if defined(CONFIG_6xx) || defined(CONFIG_E500) | 181 | #if defined(CONFIG_6xx) || defined(CONFIG_E500) |
182 | rlwinm r9,r1,0,0,31-THREAD_SHIFT | 182 | CURRENT_THREAD_INFO(r9, r1) |
183 | tophys(r9,r9) /* check local flags */ | 183 | tophys(r9,r9) /* check local flags */ |
184 | lwz r12,TI_LOCAL_FLAGS(r9) | 184 | lwz r12,TI_LOCAL_FLAGS(r9) |
185 | mtcrf 0x01,r12 | 185 | mtcrf 0x01,r12 |
@@ -333,7 +333,7 @@ _GLOBAL(DoSyscall) | |||
333 | mtmsr r11 | 333 | mtmsr r11 |
334 | 1: | 334 | 1: |
335 | #endif /* CONFIG_TRACE_IRQFLAGS */ | 335 | #endif /* CONFIG_TRACE_IRQFLAGS */ |
336 | rlwinm r10,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ | 336 | CURRENT_THREAD_INFO(r10, r1) |
337 | lwz r11,TI_FLAGS(r10) | 337 | lwz r11,TI_FLAGS(r10) |
338 | andi. r11,r11,_TIF_SYSCALL_T_OR_A | 338 | andi. r11,r11,_TIF_SYSCALL_T_OR_A |
339 | bne- syscall_dotrace | 339 | bne- syscall_dotrace |
@@ -354,7 +354,7 @@ ret_from_syscall: | |||
354 | bl do_show_syscall_exit | 354 | bl do_show_syscall_exit |
355 | #endif | 355 | #endif |
356 | mr r6,r3 | 356 | mr r6,r3 |
357 | rlwinm r12,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ | 357 | CURRENT_THREAD_INFO(r12, r1) |
358 | /* disable interrupts so current_thread_info()->flags can't change */ | 358 | /* disable interrupts so current_thread_info()->flags can't change */ |
359 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) /* doesn't include MSR_EE */ | 359 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) /* doesn't include MSR_EE */ |
360 | /* Note: We don't bother telling lockdep about it */ | 360 | /* Note: We don't bother telling lockdep about it */ |
@@ -815,7 +815,7 @@ ret_from_except: | |||
815 | 815 | ||
816 | user_exc_return: /* r10 contains MSR_KERNEL here */ | 816 | user_exc_return: /* r10 contains MSR_KERNEL here */ |
817 | /* Check current_thread_info()->flags */ | 817 | /* Check current_thread_info()->flags */ |
818 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) | 818 | CURRENT_THREAD_INFO(r9, r1) |
819 | lwz r9,TI_FLAGS(r9) | 819 | lwz r9,TI_FLAGS(r9) |
820 | andi. r0,r9,_TIF_USER_WORK_MASK | 820 | andi. r0,r9,_TIF_USER_WORK_MASK |
821 | bne do_work | 821 | bne do_work |
@@ -835,7 +835,7 @@ restore_user: | |||
835 | /* N.B. the only way to get here is from the beq following ret_from_except. */ | 835 | /* N.B. the only way to get here is from the beq following ret_from_except. */ |
836 | resume_kernel: | 836 | resume_kernel: |
837 | /* check current_thread_info->preempt_count */ | 837 | /* check current_thread_info->preempt_count */ |
838 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) | 838 | CURRENT_THREAD_INFO(r9, r1) |
839 | lwz r0,TI_PREEMPT(r9) | 839 | lwz r0,TI_PREEMPT(r9) |
840 | cmpwi 0,r0,0 /* if non-zero, just restore regs and return */ | 840 | cmpwi 0,r0,0 /* if non-zero, just restore regs and return */ |
841 | bne restore | 841 | bne restore |
@@ -852,7 +852,7 @@ resume_kernel: | |||
852 | bl trace_hardirqs_off | 852 | bl trace_hardirqs_off |
853 | #endif | 853 | #endif |
854 | 1: bl preempt_schedule_irq | 854 | 1: bl preempt_schedule_irq |
855 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) | 855 | CURRENT_THREAD_INFO(r9, r1) |
856 | lwz r3,TI_FLAGS(r9) | 856 | lwz r3,TI_FLAGS(r9) |
857 | andi. r0,r3,_TIF_NEED_RESCHED | 857 | andi. r0,r3,_TIF_NEED_RESCHED |
858 | bne- 1b | 858 | bne- 1b |
@@ -1122,7 +1122,7 @@ ret_from_debug_exc: | |||
1122 | lwz r10,SAVED_KSP_LIMIT(r1) | 1122 | lwz r10,SAVED_KSP_LIMIT(r1) |
1123 | stw r10,KSP_LIMIT(r9) | 1123 | stw r10,KSP_LIMIT(r9) |
1124 | lwz r9,THREAD_INFO-THREAD(r9) | 1124 | lwz r9,THREAD_INFO-THREAD(r9) |
1125 | rlwinm r10,r1,0,0,(31-THREAD_SHIFT) | 1125 | CURRENT_THREAD_INFO(r10, r1) |
1126 | lwz r10,TI_PREEMPT(r10) | 1126 | lwz r10,TI_PREEMPT(r10) |
1127 | stw r10,TI_PREEMPT(r9) | 1127 | stw r10,TI_PREEMPT(r9) |
1128 | RESTORE_xSRR(SRR0,SRR1); | 1128 | RESTORE_xSRR(SRR0,SRR1); |
@@ -1156,7 +1156,7 @@ load_dbcr0: | |||
1156 | lis r11,global_dbcr0@ha | 1156 | lis r11,global_dbcr0@ha |
1157 | addi r11,r11,global_dbcr0@l | 1157 | addi r11,r11,global_dbcr0@l |
1158 | #ifdef CONFIG_SMP | 1158 | #ifdef CONFIG_SMP |
1159 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) | 1159 | CURRENT_THREAD_INFO(r9, r1) |
1160 | lwz r9,TI_CPU(r9) | 1160 | lwz r9,TI_CPU(r9) |
1161 | slwi r9,r9,3 | 1161 | slwi r9,r9,3 |
1162 | add r11,r11,r9 | 1162 | add r11,r11,r9 |
@@ -1197,7 +1197,7 @@ recheck: | |||
1197 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) | 1197 | LOAD_MSR_KERNEL(r10,MSR_KERNEL) |
1198 | SYNC | 1198 | SYNC |
1199 | MTMSRD(r10) /* disable interrupts */ | 1199 | MTMSRD(r10) /* disable interrupts */ |
1200 | rlwinm r9,r1,0,0,(31-THREAD_SHIFT) | 1200 | CURRENT_THREAD_INFO(r9, r1) |
1201 | lwz r9,TI_FLAGS(r9) | 1201 | lwz r9,TI_FLAGS(r9) |
1202 | andi. r0,r9,_TIF_NEED_RESCHED | 1202 | andi. r0,r9,_TIF_NEED_RESCHED |
1203 | bne- do_resched | 1203 | bne- do_resched |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index cf38a17ab28a..4b01a25e29ef 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -146,7 +146,7 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR) | |||
146 | REST_2GPRS(7,r1) | 146 | REST_2GPRS(7,r1) |
147 | addi r9,r1,STACK_FRAME_OVERHEAD | 147 | addi r9,r1,STACK_FRAME_OVERHEAD |
148 | #endif | 148 | #endif |
149 | clrrdi r11,r1,THREAD_SHIFT | 149 | CURRENT_THREAD_INFO(r11, r1) |
150 | ld r10,TI_FLAGS(r11) | 150 | ld r10,TI_FLAGS(r11) |
151 | andi. r11,r10,_TIF_SYSCALL_T_OR_A | 151 | andi. r11,r10,_TIF_SYSCALL_T_OR_A |
152 | bne- syscall_dotrace | 152 | bne- syscall_dotrace |
@@ -181,7 +181,7 @@ syscall_exit: | |||
181 | bl .do_show_syscall_exit | 181 | bl .do_show_syscall_exit |
182 | ld r3,RESULT(r1) | 182 | ld r3,RESULT(r1) |
183 | #endif | 183 | #endif |
184 | clrrdi r12,r1,THREAD_SHIFT | 184 | CURRENT_THREAD_INFO(r12, r1) |
185 | 185 | ||
186 | ld r8,_MSR(r1) | 186 | ld r8,_MSR(r1) |
187 | #ifdef CONFIG_PPC_BOOK3S | 187 | #ifdef CONFIG_PPC_BOOK3S |
@@ -260,7 +260,7 @@ syscall_dotrace: | |||
260 | ld r7,GPR7(r1) | 260 | ld r7,GPR7(r1) |
261 | ld r8,GPR8(r1) | 261 | ld r8,GPR8(r1) |
262 | addi r9,r1,STACK_FRAME_OVERHEAD | 262 | addi r9,r1,STACK_FRAME_OVERHEAD |
263 | clrrdi r10,r1,THREAD_SHIFT | 263 | CURRENT_THREAD_INFO(r10, r1) |
264 | ld r10,TI_FLAGS(r10) | 264 | ld r10,TI_FLAGS(r10) |
265 | b .Lsyscall_dotrace_cont | 265 | b .Lsyscall_dotrace_cont |
266 | 266 | ||
@@ -500,7 +500,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) | |||
500 | 2: | 500 | 2: |
501 | #endif /* !CONFIG_PPC_BOOK3S */ | 501 | #endif /* !CONFIG_PPC_BOOK3S */ |
502 | 502 | ||
503 | clrrdi r7,r8,THREAD_SHIFT /* base of new stack */ | 503 | CURRENT_THREAD_INFO(r7, r8) /* base of new stack */ |
504 | /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE | 504 | /* Note: this uses SWITCH_FRAME_SIZE rather than INT_FRAME_SIZE |
505 | because we don't need to leave the 288-byte ABI gap at the | 505 | because we don't need to leave the 288-byte ABI gap at the |
506 | top of the kernel stack. */ | 506 | top of the kernel stack. */ |
@@ -559,7 +559,7 @@ _GLOBAL(ret_from_except_lite) | |||
559 | mtmsrd r10,1 /* Update machine state */ | 559 | mtmsrd r10,1 /* Update machine state */ |
560 | #endif /* CONFIG_PPC_BOOK3E */ | 560 | #endif /* CONFIG_PPC_BOOK3E */ |
561 | 561 | ||
562 | clrrdi r9,r1,THREAD_SHIFT /* current_thread_info() */ | 562 | CURRENT_THREAD_INFO(r9, r1) |
563 | ld r3,_MSR(r1) | 563 | ld r3,_MSR(r1) |
564 | ld r4,TI_FLAGS(r9) | 564 | ld r4,TI_FLAGS(r9) |
565 | andi. r3,r3,MSR_PR | 565 | andi. r3,r3,MSR_PR |
@@ -602,7 +602,7 @@ resume_kernel: | |||
602 | 1: bl .preempt_schedule_irq | 602 | 1: bl .preempt_schedule_irq |
603 | 603 | ||
604 | /* Re-test flags and eventually loop */ | 604 | /* Re-test flags and eventually loop */ |
605 | clrrdi r9,r1,THREAD_SHIFT | 605 | CURRENT_THREAD_INFO(r9, r1) |
606 | ld r4,TI_FLAGS(r9) | 606 | ld r4,TI_FLAGS(r9) |
607 | andi. r0,r4,_TIF_NEED_RESCHED | 607 | andi. r0,r4,_TIF_NEED_RESCHED |
608 | bne 1b | 608 | bne 1b |
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index ecba705bd628..98be7f0cd227 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S | |||
@@ -222,7 +222,7 @@ exc_##n##_bad_stack: \ | |||
222 | * interrupts happen before the wait instruction. | 222 | * interrupts happen before the wait instruction. |
223 | */ | 223 | */ |
224 | #define CHECK_NAPPING() \ | 224 | #define CHECK_NAPPING() \ |
225 | clrrdi r11,r1,THREAD_SHIFT; \ | 225 | CURRENT_THREAD_INFO(r11, r1); \ |
226 | ld r10,TI_LOCAL_FLAGS(r11); \ | 226 | ld r10,TI_LOCAL_FLAGS(r11); \ |
227 | andi. r9,r10,_TLF_NAPPING; \ | 227 | andi. r9,r10,_TLF_NAPPING; \ |
228 | beq+ 1f; \ | 228 | beq+ 1f; \ |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 1c06d2971545..8ad346882684 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -851,7 +851,7 @@ BEGIN_FTR_SECTION | |||
851 | bne- do_ste_alloc /* If so handle it */ | 851 | bne- do_ste_alloc /* If so handle it */ |
852 | END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB) | 852 | END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB) |
853 | 853 | ||
854 | clrrdi r11,r1,THREAD_SHIFT | 854 | CURRENT_THREAD_INFO(r11, r1) |
855 | lwz r0,TI_PREEMPT(r11) /* If we're in an "NMI" */ | 855 | lwz r0,TI_PREEMPT(r11) /* If we're in an "NMI" */ |
856 | andis. r0,r0,NMI_MASK@h /* (i.e. an irq when soft-disabled) */ | 856 | andis. r0,r0,NMI_MASK@h /* (i.e. an irq when soft-disabled) */ |
857 | bne 77f /* then don't call hash_page now */ | 857 | bne 77f /* then don't call hash_page now */ |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 1f4434a38608..7e7bd88674db 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -192,7 +192,7 @@ _ENTRY(__early_start) | |||
192 | li r0,0 | 192 | li r0,0 |
193 | stwu r0,THREAD_SIZE-STACK_FRAME_OVERHEAD(r1) | 193 | stwu r0,THREAD_SIZE-STACK_FRAME_OVERHEAD(r1) |
194 | 194 | ||
195 | rlwinm r22,r1,0,0,31-THREAD_SHIFT /* current thread_info */ | 195 | CURRENT_THREAD_INFO(r22, r1) |
196 | stw r24, TI_CPU(r22) | 196 | stw r24, TI_CPU(r22) |
197 | 197 | ||
198 | bl early_init | 198 | bl early_init |
diff --git a/arch/powerpc/kernel/idle_6xx.S b/arch/powerpc/kernel/idle_6xx.S index 15c611de1ee2..1686916cc7f0 100644 --- a/arch/powerpc/kernel/idle_6xx.S +++ b/arch/powerpc/kernel/idle_6xx.S | |||
@@ -135,7 +135,7 @@ BEGIN_FTR_SECTION | |||
135 | DSSALL | 135 | DSSALL |
136 | sync | 136 | sync |
137 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | 137 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) |
138 | rlwinm r9,r1,0,0,31-THREAD_SHIFT /* current thread_info */ | 138 | CURRENT_THREAD_INFO(r9, r1) |
139 | lwz r8,TI_LOCAL_FLAGS(r9) /* set napping bit */ | 139 | lwz r8,TI_LOCAL_FLAGS(r9) /* set napping bit */ |
140 | ori r8,r8,_TLF_NAPPING /* so when we take an exception */ | 140 | ori r8,r8,_TLF_NAPPING /* so when we take an exception */ |
141 | stw r8,TI_LOCAL_FLAGS(r9) /* it will return to our caller */ | 141 | stw r8,TI_LOCAL_FLAGS(r9) /* it will return to our caller */ |
@@ -158,7 +158,7 @@ _GLOBAL(power_save_ppc32_restore) | |||
158 | stw r9,_NIP(r11) /* make it do a blr */ | 158 | stw r9,_NIP(r11) /* make it do a blr */ |
159 | 159 | ||
160 | #ifdef CONFIG_SMP | 160 | #ifdef CONFIG_SMP |
161 | rlwinm r12,r11,0,0,31-THREAD_SHIFT | 161 | CURRENT_THREAD_INFO(r12, r11) |
162 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ | 162 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ |
163 | slwi r11,r11,2 | 163 | slwi r11,r11,2 |
164 | #else | 164 | #else |
diff --git a/arch/powerpc/kernel/idle_book3e.S b/arch/powerpc/kernel/idle_book3e.S index ff007b59448d..4c7cb4008585 100644 --- a/arch/powerpc/kernel/idle_book3e.S +++ b/arch/powerpc/kernel/idle_book3e.S | |||
@@ -60,7 +60,7 @@ _GLOBAL(book3e_idle) | |||
60 | 1: /* Let's set the _TLF_NAPPING flag so interrupts make us return | 60 | 1: /* Let's set the _TLF_NAPPING flag so interrupts make us return |
61 | * to the right spot | 61 | * to the right spot |
62 | */ | 62 | */ |
63 | clrrdi r11,r1,THREAD_SHIFT | 63 | CURRENT_THREAD_INFO(r11, r1) |
64 | ld r10,TI_LOCAL_FLAGS(r11) | 64 | ld r10,TI_LOCAL_FLAGS(r11) |
65 | ori r10,r10,_TLF_NAPPING | 65 | ori r10,r10,_TLF_NAPPING |
66 | std r10,TI_LOCAL_FLAGS(r11) | 66 | std r10,TI_LOCAL_FLAGS(r11) |
diff --git a/arch/powerpc/kernel/idle_e500.S b/arch/powerpc/kernel/idle_e500.S index 4f0ab85f3788..15448668988d 100644 --- a/arch/powerpc/kernel/idle_e500.S +++ b/arch/powerpc/kernel/idle_e500.S | |||
@@ -21,7 +21,7 @@ | |||
21 | .text | 21 | .text |
22 | 22 | ||
23 | _GLOBAL(e500_idle) | 23 | _GLOBAL(e500_idle) |
24 | rlwinm r3,r1,0,0,31-THREAD_SHIFT /* current thread_info */ | 24 | CURRENT_THREAD_INFO(r3, r1) |
25 | lwz r4,TI_LOCAL_FLAGS(r3) /* set napping bit */ | 25 | lwz r4,TI_LOCAL_FLAGS(r3) /* set napping bit */ |
26 | ori r4,r4,_TLF_NAPPING /* so when we take an exception */ | 26 | ori r4,r4,_TLF_NAPPING /* so when we take an exception */ |
27 | stw r4,TI_LOCAL_FLAGS(r3) /* it will return to our caller */ | 27 | stw r4,TI_LOCAL_FLAGS(r3) /* it will return to our caller */ |
@@ -96,7 +96,7 @@ _GLOBAL(power_save_ppc32_restore) | |||
96 | stw r9,_NIP(r11) /* make it do a blr */ | 96 | stw r9,_NIP(r11) /* make it do a blr */ |
97 | 97 | ||
98 | #ifdef CONFIG_SMP | 98 | #ifdef CONFIG_SMP |
99 | rlwinm r12,r1,0,0,31-THREAD_SHIFT | 99 | CURRENT_THREAD_INFO(r12, r1) |
100 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ | 100 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ |
101 | slwi r11,r11,2 | 101 | slwi r11,r11,2 |
102 | #else | 102 | #else |
diff --git a/arch/powerpc/kernel/idle_power4.S b/arch/powerpc/kernel/idle_power4.S index 2c71b0fc9f91..e3edaa189911 100644 --- a/arch/powerpc/kernel/idle_power4.S +++ b/arch/powerpc/kernel/idle_power4.S | |||
@@ -59,7 +59,7 @@ BEGIN_FTR_SECTION | |||
59 | DSSALL | 59 | DSSALL |
60 | sync | 60 | sync |
61 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | 61 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) |
62 | clrrdi r9,r1,THREAD_SHIFT /* current thread_info */ | 62 | CURRENT_THREAD_INFO(r9, r1) |
63 | ld r8,TI_LOCAL_FLAGS(r9) /* set napping bit */ | 63 | ld r8,TI_LOCAL_FLAGS(r9) /* set napping bit */ |
64 | ori r8,r8,_TLF_NAPPING /* so when we take an exception */ | 64 | ori r8,r8,_TLF_NAPPING /* so when we take an exception */ |
65 | std r8,TI_LOCAL_FLAGS(r9) /* it will return to our caller */ | 65 | std r8,TI_LOCAL_FLAGS(r9) /* it will return to our caller */ |
diff --git a/arch/powerpc/kernel/iommu.c.rej b/arch/powerpc/kernel/iommu.c.rej new file mode 100644 index 000000000000..9d10d341cf86 --- /dev/null +++ b/arch/powerpc/kernel/iommu.c.rej | |||
@@ -0,0 +1,22 @@ | |||
1 | --- arch/powerpc/kernel/iommu.c 2012-06-08 09:01:02.785709100 +1000 | ||
2 | +++ arch/powerpc/kernel/iommu.c 2012-06-08 09:01:07.489784856 +1000 | ||
3 | @@ -33,7 +33,9 @@ | ||
4 | #include <linux/bitmap.h> | ||
5 | #include <linux/iommu-helper.h> | ||
6 | #include <linux/crash_dump.h> | ||
7 | +#include <linux/fault-inject.h> | ||
8 | #include <asm/io.h> | ||
9 | +#include <asm/vio.h> | ||
10 | #include <asm/prom.h> | ||
11 | #include <asm/iommu.h> | ||
12 | #include <asm/pci-bridge.h> | ||
13 | @@ -171,6 +261,9 @@ | ||
14 | return DMA_ERROR_CODE; | ||
15 | } | ||
16 | |||
17 | + if (should_fail_iommu(dev)) | ||
18 | + return DMA_ERROR_CODE; | ||
19 | + | ||
20 | if (handle && *handle) | ||
21 | start = *handle; | ||
22 | else | ||
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 386d57f66f28..407e293aad2f 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -179,7 +179,7 @@ _GLOBAL(low_choose_750fx_pll) | |||
179 | mtspr SPRN_HID1,r4 | 179 | mtspr SPRN_HID1,r4 |
180 | 180 | ||
181 | /* Store new HID1 image */ | 181 | /* Store new HID1 image */ |
182 | rlwinm r6,r1,0,0,(31-THREAD_SHIFT) | 182 | CURRENT_THREAD_INFO(r6, r1) |
183 | lwz r6,TI_CPU(r6) | 183 | lwz r6,TI_CPU(r6) |
184 | slwi r6,r6,2 | 184 | slwi r6,r6,2 |
185 | addis r6,r6,nap_save_hid1@ha | 185 | addis r6,r6,nap_save_hid1@ha |
@@ -699,7 +699,7 @@ _GLOBAL(kernel_thread) | |||
699 | #ifdef CONFIG_SMP | 699 | #ifdef CONFIG_SMP |
700 | _GLOBAL(start_secondary_resume) | 700 | _GLOBAL(start_secondary_resume) |
701 | /* Reset stack */ | 701 | /* Reset stack */ |
702 | rlwinm r1,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ | 702 | CURRENT_THREAD_INFO(r1, r1) |
703 | addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD | 703 | addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD |
704 | li r3,0 | 704 | li r3,0 |
705 | stw r3,0(r1) /* Zero the stack frame pointer */ | 705 | stw r3,0(r1) /* Zero the stack frame pointer */ |