diff options
-rw-r--r-- | arch/powerpc/include/asm/exception-64s.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/thread_info.h | 6 | ||||
-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 | ||||
-rw-r--r-- | arch/powerpc/kvm/bookehv_interrupts.S | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_low_32.S | 8 | ||||
-rw-r--r-- | arch/powerpc/sysdev/6xx-suspend.S | 2 |
16 files changed, 65 insertions, 41 deletions
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index d58fc4e4149c..a43c1473915f 100644 --- a/arch/powerpc/include/asm/exception-64s.h +++ b/arch/powerpc/include/asm/exception-64s.h | |||
@@ -293,7 +293,7 @@ label##_hv: \ | |||
293 | 293 | ||
294 | #define RUNLATCH_ON \ | 294 | #define RUNLATCH_ON \ |
295 | BEGIN_FTR_SECTION \ | 295 | BEGIN_FTR_SECTION \ |
296 | clrrdi r3,r1,THREAD_SHIFT; \ | 296 | CURRENT_THREAD_INFO(r3, r1); \ |
297 | ld r4,TI_LOCAL_FLAGS(r3); \ | 297 | ld r4,TI_LOCAL_FLAGS(r3); \ |
298 | andi. r0,r4,_TLF_RUNLATCH; \ | 298 | andi. r0,r4,_TLF_RUNLATCH; \ |
299 | beql ppc64_runlatch_on_trampoline; \ | 299 | beql ppc64_runlatch_on_trampoline; \ |
@@ -332,7 +332,7 @@ label##_common: \ | |||
332 | #ifdef CONFIG_PPC_970_NAP | 332 | #ifdef CONFIG_PPC_970_NAP |
333 | #define FINISH_NAP \ | 333 | #define FINISH_NAP \ |
334 | BEGIN_FTR_SECTION \ | 334 | BEGIN_FTR_SECTION \ |
335 | clrrdi r11,r1,THREAD_SHIFT; \ | 335 | CURRENT_THREAD_INFO(r11, r1); \ |
336 | ld r9,TI_LOCAL_FLAGS(r11); \ | 336 | ld r9,TI_LOCAL_FLAGS(r11); \ |
337 | andi. r10,r9,_TLF_NAPPING; \ | 337 | andi. r10,r9,_TLF_NAPPING; \ |
338 | bnel power4_fixup_nap; \ | 338 | bnel power4_fixup_nap; \ |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 68831e9cf82f..faf93529cbf0 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -22,6 +22,12 @@ | |||
22 | 22 | ||
23 | #define THREAD_SIZE (1 << THREAD_SHIFT) | 23 | #define THREAD_SIZE (1 << THREAD_SHIFT) |
24 | 24 | ||
25 | #ifdef CONFIG_PPC64 | ||
26 | #define CURRENT_THREAD_INFO(dest, sp) clrrdi dest, sp, THREAD_SHIFT | ||
27 | #else | ||
28 | #define CURRENT_THREAD_INFO(dest, sp) rlwinm dest, sp, 0, 0, 31-THREAD_SHIFT | ||
29 | #endif | ||
30 | |||
25 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
26 | #include <linux/cache.h> | 32 | #include <linux/cache.h> |
27 | #include <asm/processor.h> | 33 | #include <asm/processor.h> |
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 */ |
diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index 18cee4b0098a..1685dc43bcf2 100644 --- a/arch/powerpc/kvm/bookehv_interrupts.S +++ b/arch/powerpc/kvm/bookehv_interrupts.S | |||
@@ -160,11 +160,7 @@ | |||
160 | mtspr SPRN_EPLC, r8 | 160 | mtspr SPRN_EPLC, r8 |
161 | 161 | ||
162 | /* disable preemption, so we are sure we hit the fixup handler */ | 162 | /* disable preemption, so we are sure we hit the fixup handler */ |
163 | #ifdef CONFIG_PPC64 | 163 | CURRENT_THREAD_INFO(r8, r1) |
164 | clrrdi r8,r1,THREAD_SHIFT | ||
165 | #else | ||
166 | rlwinm r8,r1,0,0,31-THREAD_SHIFT /* current thread_info */ | ||
167 | #endif | ||
168 | li r7, 1 | 164 | li r7, 1 |
169 | stw r7, TI_PREEMPT(r8) | 165 | stw r7, TI_PREEMPT(r8) |
170 | 166 | ||
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index b13d58932bf6..115347f74ce5 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -184,7 +184,7 @@ _GLOBAL(add_hash_page) | |||
184 | add r3,r3,r0 /* note create_hpte trims to 24 bits */ | 184 | add r3,r3,r0 /* note create_hpte trims to 24 bits */ |
185 | 185 | ||
186 | #ifdef CONFIG_SMP | 186 | #ifdef CONFIG_SMP |
187 | rlwinm r8,r1,0,0,(31-THREAD_SHIFT) /* use cpu number to make tag */ | 187 | CURRENT_THREAD_INFO(r8, r1) /* use cpu number to make tag */ |
188 | lwz r8,TI_CPU(r8) /* to go in mmu_hash_lock */ | 188 | lwz r8,TI_CPU(r8) /* to go in mmu_hash_lock */ |
189 | oris r8,r8,12 | 189 | oris r8,r8,12 |
190 | #endif /* CONFIG_SMP */ | 190 | #endif /* CONFIG_SMP */ |
@@ -545,7 +545,7 @@ _GLOBAL(flush_hash_pages) | |||
545 | #ifdef CONFIG_SMP | 545 | #ifdef CONFIG_SMP |
546 | addis r9,r7,mmu_hash_lock@ha | 546 | addis r9,r7,mmu_hash_lock@ha |
547 | addi r9,r9,mmu_hash_lock@l | 547 | addi r9,r9,mmu_hash_lock@l |
548 | rlwinm r8,r1,0,0,(31-THREAD_SHIFT) | 548 | CURRENT_THREAD_INFO(r8, r1) |
549 | add r8,r8,r7 | 549 | add r8,r8,r7 |
550 | lwz r8,TI_CPU(r8) | 550 | lwz r8,TI_CPU(r8) |
551 | oris r8,r8,9 | 551 | oris r8,r8,9 |
@@ -639,7 +639,7 @@ _GLOBAL(flush_hash_patch_B) | |||
639 | */ | 639 | */ |
640 | _GLOBAL(_tlbie) | 640 | _GLOBAL(_tlbie) |
641 | #ifdef CONFIG_SMP | 641 | #ifdef CONFIG_SMP |
642 | rlwinm r8,r1,0,0,(31-THREAD_SHIFT) | 642 | CURRENT_THREAD_INFO(r8, r1) |
643 | lwz r8,TI_CPU(r8) | 643 | lwz r8,TI_CPU(r8) |
644 | oris r8,r8,11 | 644 | oris r8,r8,11 |
645 | mfmsr r10 | 645 | mfmsr r10 |
@@ -677,7 +677,7 @@ _GLOBAL(_tlbie) | |||
677 | */ | 677 | */ |
678 | _GLOBAL(_tlbia) | 678 | _GLOBAL(_tlbia) |
679 | #if defined(CONFIG_SMP) | 679 | #if defined(CONFIG_SMP) |
680 | rlwinm r8,r1,0,0,(31-THREAD_SHIFT) | 680 | CURRENT_THREAD_INFO(r8, r1) |
681 | lwz r8,TI_CPU(r8) | 681 | lwz r8,TI_CPU(r8) |
682 | oris r8,r8,10 | 682 | oris r8,r8,10 |
683 | mfmsr r10 | 683 | mfmsr r10 |
diff --git a/arch/powerpc/sysdev/6xx-suspend.S b/arch/powerpc/sysdev/6xx-suspend.S index 21cda085d926..cf48e9cb2575 100644 --- a/arch/powerpc/sysdev/6xx-suspend.S +++ b/arch/powerpc/sysdev/6xx-suspend.S | |||
@@ -29,7 +29,7 @@ _GLOBAL(mpc6xx_enter_standby) | |||
29 | ori r5, r5, ret_from_standby@l | 29 | ori r5, r5, ret_from_standby@l |
30 | mtlr r5 | 30 | mtlr r5 |
31 | 31 | ||
32 | rlwinm r5, r1, 0, 0, 31-THREAD_SHIFT | 32 | CURRENT_THREAD_INFO(r5, r1) |
33 | lwz r6, TI_LOCAL_FLAGS(r5) | 33 | lwz r6, TI_LOCAL_FLAGS(r5) |
34 | ori r6, r6, _TLF_SLEEPING | 34 | ori r6, r6, _TLF_SLEEPING |
35 | stw r6, TI_LOCAL_FLAGS(r5) | 35 | stw r6, TI_LOCAL_FLAGS(r5) |