aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/asm-offsets.c15
-rw-r--r--arch/powerpc/kernel/cputable.c1
-rw-r--r--arch/powerpc/kernel/eeh.c24
-rw-r--r--arch/powerpc/kernel/eeh_driver.c4
-rw-r--r--arch/powerpc/kernel/eeh_pe.c20
-rw-r--r--arch/powerpc/kernel/entry_32.S83
-rw-r--r--arch/powerpc/kernel/entry_64.S37
-rw-r--r--arch/powerpc/kernel/head_8xx.S123
-rw-r--r--arch/powerpc/kernel/paca.c8
-rw-r--r--arch/powerpc/kernel/pci_dn.c4
-rw-r--r--arch/powerpc/kernel/prom.c3
-rw-r--r--arch/powerpc/kernel/rtas.c22
-rw-r--r--arch/powerpc/kernel/smp.c14
-rw-r--r--arch/powerpc/kernel/syscalls.c14
-rw-r--r--arch/powerpc/kernel/traps.c15
15 files changed, 135 insertions, 252 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index e624f9646350..4717859fdd04 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -644,8 +644,19 @@ int main(void)
644 HSTATE_FIELD(HSTATE_SAVED_XIRR, saved_xirr); 644 HSTATE_FIELD(HSTATE_SAVED_XIRR, saved_xirr);
645 HSTATE_FIELD(HSTATE_HOST_IPI, host_ipi); 645 HSTATE_FIELD(HSTATE_HOST_IPI, host_ipi);
646 HSTATE_FIELD(HSTATE_PTID, ptid); 646 HSTATE_FIELD(HSTATE_PTID, ptid);
647 HSTATE_FIELD(HSTATE_MMCR, host_mmcr); 647 HSTATE_FIELD(HSTATE_MMCR0, host_mmcr[0]);
648 HSTATE_FIELD(HSTATE_PMC, host_pmc); 648 HSTATE_FIELD(HSTATE_MMCR1, host_mmcr[1]);
649 HSTATE_FIELD(HSTATE_MMCRA, host_mmcr[2]);
650 HSTATE_FIELD(HSTATE_SIAR, host_mmcr[3]);
651 HSTATE_FIELD(HSTATE_SDAR, host_mmcr[4]);
652 HSTATE_FIELD(HSTATE_MMCR2, host_mmcr[5]);
653 HSTATE_FIELD(HSTATE_SIER, host_mmcr[6]);
654 HSTATE_FIELD(HSTATE_PMC1, host_pmc[0]);
655 HSTATE_FIELD(HSTATE_PMC2, host_pmc[1]);
656 HSTATE_FIELD(HSTATE_PMC3, host_pmc[2]);
657 HSTATE_FIELD(HSTATE_PMC4, host_pmc[3]);
658 HSTATE_FIELD(HSTATE_PMC5, host_pmc[4]);
659 HSTATE_FIELD(HSTATE_PMC6, host_pmc[5]);
649 HSTATE_FIELD(HSTATE_PURR, host_purr); 660 HSTATE_FIELD(HSTATE_PURR, host_purr);
650 HSTATE_FIELD(HSTATE_SPURR, host_spurr); 661 HSTATE_FIELD(HSTATE_SPURR, host_spurr);
651 HSTATE_FIELD(HSTATE_DSCR, host_dscr); 662 HSTATE_FIELD(HSTATE_DSCR, host_dscr);
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 808405906336..f337666768a7 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1133,6 +1133,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1133 .icache_bsize = 32, 1133 .icache_bsize = 32,
1134 .dcache_bsize = 32, 1134 .dcache_bsize = 32,
1135 .cpu_setup = __setup_cpu_603, 1135 .cpu_setup = __setup_cpu_603,
1136 .machine_check = machine_check_generic,
1136 .num_pmcs = 4, 1137 .num_pmcs = 4,
1137 .oprofile_cpu_type = "ppc/e300", 1138 .oprofile_cpu_type = "ppc/e300",
1138 .oprofile_type = PPC_OPROFILE_FSL_EMB, 1139 .oprofile_type = PPC_OPROFILE_FSL_EMB,
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index e1b6d8e17289..3b2252e7731b 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -104,6 +104,13 @@
104int eeh_subsystem_flags; 104int eeh_subsystem_flags;
105EXPORT_SYMBOL(eeh_subsystem_flags); 105EXPORT_SYMBOL(eeh_subsystem_flags);
106 106
107/*
108 * EEH allowed maximal frozen times. If one particular PE's
109 * frozen count in last hour exceeds this limit, the PE will
110 * be forced to be offline permanently.
111 */
112int eeh_max_freezes = 5;
113
107/* Platform dependent EEH operations */ 114/* Platform dependent EEH operations */
108struct eeh_ops *eeh_ops = NULL; 115struct eeh_ops *eeh_ops = NULL;
109 116
@@ -1652,8 +1659,22 @@ static int eeh_enable_dbgfs_get(void *data, u64 *val)
1652 return 0; 1659 return 0;
1653} 1660}
1654 1661
1662static int eeh_freeze_dbgfs_set(void *data, u64 val)
1663{
1664 eeh_max_freezes = val;
1665 return 0;
1666}
1667
1668static int eeh_freeze_dbgfs_get(void *data, u64 *val)
1669{
1670 *val = eeh_max_freezes;
1671 return 0;
1672}
1673
1655DEFINE_SIMPLE_ATTRIBUTE(eeh_enable_dbgfs_ops, eeh_enable_dbgfs_get, 1674DEFINE_SIMPLE_ATTRIBUTE(eeh_enable_dbgfs_ops, eeh_enable_dbgfs_get,
1656 eeh_enable_dbgfs_set, "0x%llx\n"); 1675 eeh_enable_dbgfs_set, "0x%llx\n");
1676DEFINE_SIMPLE_ATTRIBUTE(eeh_freeze_dbgfs_ops, eeh_freeze_dbgfs_get,
1677 eeh_freeze_dbgfs_set, "0x%llx\n");
1657#endif 1678#endif
1658 1679
1659static int __init eeh_init_proc(void) 1680static int __init eeh_init_proc(void)
@@ -1664,6 +1685,9 @@ static int __init eeh_init_proc(void)
1664 debugfs_create_file("eeh_enable", 0600, 1685 debugfs_create_file("eeh_enable", 0600,
1665 powerpc_debugfs_root, NULL, 1686 powerpc_debugfs_root, NULL,
1666 &eeh_enable_dbgfs_ops); 1687 &eeh_enable_dbgfs_ops);
1688 debugfs_create_file("eeh_max_freezes", 0600,
1689 powerpc_debugfs_root, NULL,
1690 &eeh_freeze_dbgfs_ops);
1667#endif 1691#endif
1668 } 1692 }
1669 1693
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index b17e793ba67e..d099540c0f56 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -667,7 +667,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
667 667
668 eeh_pe_update_time_stamp(pe); 668 eeh_pe_update_time_stamp(pe);
669 pe->freeze_count++; 669 pe->freeze_count++;
670 if (pe->freeze_count > EEH_MAX_ALLOWED_FREEZES) 670 if (pe->freeze_count > eeh_max_freezes)
671 goto excess_failures; 671 goto excess_failures;
672 pr_warn("EEH: This PCI device has failed %d times in the last hour\n", 672 pr_warn("EEH: This PCI device has failed %d times in the last hour\n",
673 pe->freeze_count); 673 pe->freeze_count);
@@ -806,7 +806,7 @@ perm_error:
806 eeh_pe_dev_traverse(pe, eeh_report_failure, NULL); 806 eeh_pe_dev_traverse(pe, eeh_report_failure, NULL);
807 807
808 /* Mark the PE to be removed permanently */ 808 /* Mark the PE to be removed permanently */
809 pe->freeze_count = EEH_MAX_ALLOWED_FREEZES + 1; 809 eeh_pe_state_mark(pe, EEH_PE_REMOVED);
810 810
811 /* 811 /*
812 * Shut down the device drivers for good. We mark 812 * Shut down the device drivers for good. We mark
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c
index 5a63e2b0f65b..1e4946c36f9e 100644
--- a/arch/powerpc/kernel/eeh_pe.c
+++ b/arch/powerpc/kernel/eeh_pe.c
@@ -239,10 +239,18 @@ static void *__eeh_pe_get(void *data, void *flag)
239 if (pe->type & EEH_PE_PHB) 239 if (pe->type & EEH_PE_PHB)
240 return NULL; 240 return NULL;
241 241
242 /* We prefer PE address */ 242 /*
243 if (edev->pe_config_addr && 243 * We prefer PE address. For most cases, we should
244 (edev->pe_config_addr == pe->addr)) 244 * have non-zero PE address
245 */
246 if (eeh_has_flag(EEH_VALID_PE_ZERO)) {
247 if (edev->pe_config_addr == pe->addr)
248 return pe;
249 } else {
250 if (edev->pe_config_addr &&
251 (edev->pe_config_addr == pe->addr))
245 return pe; 252 return pe;
253 }
246 254
247 /* Try BDF address */ 255 /* Try BDF address */
248 if (edev->config_addr && 256 if (edev->config_addr &&
@@ -518,8 +526,7 @@ static void *__eeh_pe_state_mark(void *data, void *flag)
518 struct pci_dev *pdev; 526 struct pci_dev *pdev;
519 527
520 /* Keep the state of permanently removed PE intact */ 528 /* Keep the state of permanently removed PE intact */
521 if ((pe->freeze_count > EEH_MAX_ALLOWED_FREEZES) && 529 if (pe->state & EEH_PE_REMOVED)
522 (state & (EEH_PE_ISOLATED | EEH_PE_RECOVERING)))
523 return NULL; 530 return NULL;
524 531
525 pe->state |= state; 532 pe->state |= state;
@@ -592,8 +599,7 @@ static void *__eeh_pe_state_clear(void *data, void *flag)
592 struct pci_dev *pdev; 599 struct pci_dev *pdev;
593 600
594 /* Keep the state of permanently removed PE intact */ 601 /* Keep the state of permanently removed PE intact */
595 if ((pe->freeze_count > EEH_MAX_ALLOWED_FREEZES) && 602 if (pe->state & EEH_PE_REMOVED)
596 (state & EEH_PE_ISOLATED))
597 return NULL; 603 return NULL;
598 604
599 pe->state &= ~state; 605 pe->state &= ~state;
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 10a093579191..46fc0f4d8982 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -33,9 +33,6 @@
33#include <asm/ftrace.h> 33#include <asm/ftrace.h>
34#include <asm/ptrace.h> 34#include <asm/ptrace.h>
35 35
36#undef SHOW_SYSCALLS
37#undef SHOW_SYSCALLS_TASK
38
39/* 36/*
40 * MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE. 37 * MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE.
41 */ 38 */
@@ -307,9 +304,6 @@ _GLOBAL(DoSyscall)
307 lwz r11,_CCR(r1) /* Clear SO bit in CR */ 304 lwz r11,_CCR(r1) /* Clear SO bit in CR */
308 rlwinm r11,r11,0,4,2 305 rlwinm r11,r11,0,4,2
309 stw r11,_CCR(r1) 306 stw r11,_CCR(r1)
310#ifdef SHOW_SYSCALLS
311 bl do_show_syscall
312#endif /* SHOW_SYSCALLS */
313#ifdef CONFIG_TRACE_IRQFLAGS 307#ifdef CONFIG_TRACE_IRQFLAGS
314 /* Return from syscalls can (and generally will) hard enable 308 /* Return from syscalls can (and generally will) hard enable
315 * interrupts. You aren't supposed to call a syscall with 309 * interrupts. You aren't supposed to call a syscall with
@@ -337,7 +331,7 @@ _GLOBAL(DoSyscall)
337#endif /* CONFIG_TRACE_IRQFLAGS */ 331#endif /* CONFIG_TRACE_IRQFLAGS */
338 CURRENT_THREAD_INFO(r10, r1) 332 CURRENT_THREAD_INFO(r10, r1)
339 lwz r11,TI_FLAGS(r10) 333 lwz r11,TI_FLAGS(r10)
340 andi. r11,r11,_TIF_SYSCALL_T_OR_A 334 andi. r11,r11,_TIF_SYSCALL_DOTRACE
341 bne- syscall_dotrace 335 bne- syscall_dotrace
342syscall_dotrace_cont: 336syscall_dotrace_cont:
343 cmplwi 0,r0,NR_syscalls 337 cmplwi 0,r0,NR_syscalls
@@ -352,9 +346,6 @@ syscall_dotrace_cont:
352 blrl /* Call handler */ 346 blrl /* Call handler */
353 .globl ret_from_syscall 347 .globl ret_from_syscall
354ret_from_syscall: 348ret_from_syscall:
355#ifdef SHOW_SYSCALLS
356 bl do_show_syscall_exit
357#endif
358 mr r6,r3 349 mr r6,r3
359 CURRENT_THREAD_INFO(r12, r1) 350 CURRENT_THREAD_INFO(r12, r1)
360 /* disable interrupts so current_thread_info()->flags can't change */ 351 /* disable interrupts so current_thread_info()->flags can't change */
@@ -364,7 +355,7 @@ ret_from_syscall:
364 MTMSRD(r10) 355 MTMSRD(r10)
365 lwz r9,TI_FLAGS(r12) 356 lwz r9,TI_FLAGS(r12)
366 li r8,-_LAST_ERRNO 357 li r8,-_LAST_ERRNO
367 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) 358 andi. r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)
368 bne- syscall_exit_work 359 bne- syscall_exit_work
369 cmplw 0,r3,r8 360 cmplw 0,r3,r8
370 blt+ syscall_exit_cont 361 blt+ syscall_exit_cont
@@ -501,7 +492,7 @@ syscall_exit_work:
501 subi r12,r12,TI_FLAGS 492 subi r12,r12,TI_FLAGS
502 493
5034: /* Anything which requires enabling interrupts? */ 4944: /* Anything which requires enabling interrupts? */
504 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP) 495 andi. r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP)
505 beq ret_from_except 496 beq ret_from_except
506 497
507 /* Re-enable interrupts. There is no need to trace that with 498 /* Re-enable interrupts. There is no need to trace that with
@@ -523,74 +514,6 @@ syscall_exit_work:
523 bl do_syscall_trace_leave 514 bl do_syscall_trace_leave
524 b ret_from_except_full 515 b ret_from_except_full
525 516
526#ifdef SHOW_SYSCALLS
527do_show_syscall:
528#ifdef SHOW_SYSCALLS_TASK
529 lis r11,show_syscalls_task@ha
530 lwz r11,show_syscalls_task@l(r11)
531 cmp 0,r2,r11
532 bnelr
533#endif
534 stw r31,GPR31(r1)
535 mflr r31
536 lis r3,7f@ha
537 addi r3,r3,7f@l
538 lwz r4,GPR0(r1)
539 lwz r5,GPR3(r1)
540 lwz r6,GPR4(r1)
541 lwz r7,GPR5(r1)
542 lwz r8,GPR6(r1)
543 lwz r9,GPR7(r1)
544 bl printk
545 lis r3,77f@ha
546 addi r3,r3,77f@l
547 lwz r4,GPR8(r1)
548 mr r5,r2
549 bl printk
550 lwz r0,GPR0(r1)
551 lwz r3,GPR3(r1)
552 lwz r4,GPR4(r1)
553 lwz r5,GPR5(r1)
554 lwz r6,GPR6(r1)
555 lwz r7,GPR7(r1)
556 lwz r8,GPR8(r1)
557 mtlr r31
558 lwz r31,GPR31(r1)
559 blr
560
561do_show_syscall_exit:
562#ifdef SHOW_SYSCALLS_TASK
563 lis r11,show_syscalls_task@ha
564 lwz r11,show_syscalls_task@l(r11)
565 cmp 0,r2,r11
566 bnelr
567#endif
568 stw r31,GPR31(r1)
569 mflr r31
570 stw r3,RESULT(r1) /* Save result */
571 mr r4,r3
572 lis r3,79f@ha
573 addi r3,r3,79f@l
574 bl printk
575 lwz r3,RESULT(r1)
576 mtlr r31
577 lwz r31,GPR31(r1)
578 blr
579
5807: .string "syscall %d(%x, %x, %x, %x, %x, "
58177: .string "%x), current=%p\n"
58279: .string " -> %x\n"
583 .align 2,0
584
585#ifdef SHOW_SYSCALLS_TASK
586 .data
587 .globl show_syscalls_task
588show_syscalls_task:
589 .long -1
590 .text
591#endif
592#endif /* SHOW_SYSCALLS */
593
594/* 517/*
595 * The fork/clone functions need to copy the full register set into 518 * The fork/clone functions need to copy the full register set into
596 * the child process. Therefore we need to save all the nonvolatile 519 * the child process. Therefore we need to save all the nonvolatile
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 194e46dcf08d..d180caf2d6de 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -49,8 +49,6 @@ exception_marker:
49 .section ".text" 49 .section ".text"
50 .align 7 50 .align 7
51 51
52#undef SHOW_SYSCALLS
53
54 .globl system_call_common 52 .globl system_call_common
55system_call_common: 53system_call_common:
56 andi. r10,r12,MSR_PR 54 andi. r10,r12,MSR_PR
@@ -142,16 +140,9 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR)
142 li r10,1 140 li r10,1
143 std r10,SOFTE(r1) 141 std r10,SOFTE(r1)
144 142
145#ifdef SHOW_SYSCALLS
146 bl do_show_syscall
147 REST_GPR(0,r1)
148 REST_4GPRS(3,r1)
149 REST_2GPRS(7,r1)
150 addi r9,r1,STACK_FRAME_OVERHEAD
151#endif
152 CURRENT_THREAD_INFO(r11, r1) 143 CURRENT_THREAD_INFO(r11, r1)
153 ld r10,TI_FLAGS(r11) 144 ld r10,TI_FLAGS(r11)
154 andi. r11,r10,_TIF_SYSCALL_T_OR_A 145 andi. r11,r10,_TIF_SYSCALL_DOTRACE
155 bne syscall_dotrace 146 bne syscall_dotrace
156.Lsyscall_dotrace_cont: 147.Lsyscall_dotrace_cont:
157 cmpldi 0,r0,NR_syscalls 148 cmpldi 0,r0,NR_syscalls
@@ -178,12 +169,8 @@ system_call: /* label this so stack traces look sane */
178 mtctr r12 169 mtctr r12
179 bctrl /* Call handler */ 170 bctrl /* Call handler */
180 171
181syscall_exit: 172.Lsyscall_exit:
182 std r3,RESULT(r1) 173 std r3,RESULT(r1)
183#ifdef SHOW_SYSCALLS
184 bl do_show_syscall_exit
185 ld r3,RESULT(r1)
186#endif
187 CURRENT_THREAD_INFO(r12, r1) 174 CURRENT_THREAD_INFO(r12, r1)
188 175
189 ld r8,_MSR(r1) 176 ld r8,_MSR(r1)
@@ -214,7 +201,7 @@ syscall_exit:
214 201
215 ld r9,TI_FLAGS(r12) 202 ld r9,TI_FLAGS(r12)
216 li r11,-_LAST_ERRNO 203 li r11,-_LAST_ERRNO
217 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) 204 andi. r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)
218 bne- syscall_exit_work 205 bne- syscall_exit_work
219 cmpld r3,r11 206 cmpld r3,r11
220 ld r5,_CCR(r1) 207 ld r5,_CCR(r1)
@@ -270,7 +257,7 @@ syscall_dotrace:
270 257
271syscall_enosys: 258syscall_enosys:
272 li r3,-ENOSYS 259 li r3,-ENOSYS
273 b syscall_exit 260 b .Lsyscall_exit
274 261
275syscall_exit_work: 262syscall_exit_work:
276#ifdef CONFIG_PPC_BOOK3S 263#ifdef CONFIG_PPC_BOOK3S
@@ -307,7 +294,7 @@ syscall_exit_work:
307 294
3084: /* Anything else left to do? */ 2954: /* Anything else left to do? */
309 SET_DEFAULT_THREAD_PPR(r3, r10) /* Set thread.ppr = 3 */ 296 SET_DEFAULT_THREAD_PPR(r3, r10) /* Set thread.ppr = 3 */
310 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP) 297 andi. r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP)
311 beq ret_from_except_lite 298 beq ret_from_except_lite
312 299
313 /* Re-enable interrupts */ 300 /* Re-enable interrupts */
@@ -347,33 +334,33 @@ _GLOBAL(save_nvgprs)
347_GLOBAL(ppc_fork) 334_GLOBAL(ppc_fork)
348 bl save_nvgprs 335 bl save_nvgprs
349 bl sys_fork 336 bl sys_fork
350 b syscall_exit 337 b .Lsyscall_exit
351 338
352_GLOBAL(ppc_vfork) 339_GLOBAL(ppc_vfork)
353 bl save_nvgprs 340 bl save_nvgprs
354 bl sys_vfork 341 bl sys_vfork
355 b syscall_exit 342 b .Lsyscall_exit
356 343
357_GLOBAL(ppc_clone) 344_GLOBAL(ppc_clone)
358 bl save_nvgprs 345 bl save_nvgprs
359 bl sys_clone 346 bl sys_clone
360 b syscall_exit 347 b .Lsyscall_exit
361 348
362_GLOBAL(ppc32_swapcontext) 349_GLOBAL(ppc32_swapcontext)
363 bl save_nvgprs 350 bl save_nvgprs
364 bl compat_sys_swapcontext 351 bl compat_sys_swapcontext
365 b syscall_exit 352 b .Lsyscall_exit
366 353
367_GLOBAL(ppc64_swapcontext) 354_GLOBAL(ppc64_swapcontext)
368 bl save_nvgprs 355 bl save_nvgprs
369 bl sys_swapcontext 356 bl sys_swapcontext
370 b syscall_exit 357 b .Lsyscall_exit
371 358
372_GLOBAL(ret_from_fork) 359_GLOBAL(ret_from_fork)
373 bl schedule_tail 360 bl schedule_tail
374 REST_NVGPRS(r1) 361 REST_NVGPRS(r1)
375 li r3,0 362 li r3,0
376 b syscall_exit 363 b .Lsyscall_exit
377 364
378_GLOBAL(ret_from_kernel_thread) 365_GLOBAL(ret_from_kernel_thread)
379 bl schedule_tail 366 bl schedule_tail
@@ -385,7 +372,7 @@ _GLOBAL(ret_from_kernel_thread)
385#endif 372#endif
386 blrl 373 blrl
387 li r3,0 374 li r3,0
388 b syscall_exit 375 b .Lsyscall_exit
389 376
390/* 377/*
391 * This routine switches between two different tasks. The process 378 * This routine switches between two different tasks. The process
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index d99aac0d69f1..9b53fe139bf6 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -319,36 +319,29 @@ InstructionTLBMiss:
319 * pin the first 8MB of kernel memory */ 319 * pin the first 8MB of kernel memory */
320 andis. r11, r10, 0x8000 /* Address >= 0x80000000 */ 320 andis. r11, r10, 0x8000 /* Address >= 0x80000000 */
321#endif 321#endif
322 mfspr r11, SPRN_M_TW /* Get level 1 table base address */ 322 mfspr r11, SPRN_M_TW /* Get level 1 table */
323#ifdef CONFIG_MODULES 323#ifdef CONFIG_MODULES
324 beq 3f 324 beq 3f
325 lis r11, (swapper_pg_dir-PAGE_OFFSET)@h 325 lis r11, (swapper_pg_dir-PAGE_OFFSET)@ha
326 ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l
3273: 3263:
328#endif 327#endif
329 /* Extract level 1 index */ 328 /* Insert level 1 index */
330 rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 329 rlwimi r11, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29
331 lwzx r11, r10, r11 /* Get the level 1 entry */ 330 lwz r11, (swapper_pg_dir-PAGE_OFFSET)@l(r11) /* Get the level 1 entry */
332 rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ 331
333 beq 2f /* If zero, don't try to find a pte */ 332 /* Load the MI_TWC with the attributes for this "segment." */
334
335 /* We have a pte table, so load the MI_TWC with the attributes
336 * for this "segment."
337 */
338 MTSPR_CPU6(SPRN_MI_TWC, r11, r3) /* Set segment attributes */ 333 MTSPR_CPU6(SPRN_MI_TWC, r11, r3) /* Set segment attributes */
339 mfspr r11, SPRN_SRR0 /* Get effective address of fault */ 334 rlwinm r11, r11,0,0,19 /* Extract page descriptor page address */
340 /* Extract level 2 index */ 335 /* Extract level 2 index */
341 rlwinm r11, r11, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29 336 rlwinm r10, r10, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29
342 lwzx r10, r10, r11 /* Get the pte */ 337 lwzx r10, r10, r11 /* Get the pte */
343 338
344#ifdef CONFIG_SWAP 339#ifdef CONFIG_SWAP
345 andi. r11, r10, _PAGE_ACCESSED | _PAGE_PRESENT 340 rlwinm r11, r10, 32-5, _PAGE_PRESENT
346 cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT 341 and r11, r11, r10
347 li r11, RPN_PATTERN 342 rlwimi r10, r11, 0, _PAGE_PRESENT
348 bne- cr0, 2f
349#else
350 li r11, RPN_PATTERN
351#endif 343#endif
344 li r11, RPN_PATTERN
352 /* The Linux PTE won't go exactly into the MMU TLB. 345 /* The Linux PTE won't go exactly into the MMU TLB.
353 * Software indicator bits 21 and 28 must be clear. 346 * Software indicator bits 21 and 28 must be clear.
354 * Software indicator bits 24, 25, 26, and 27 must be 347 * Software indicator bits 24, 25, 26, and 27 must be
@@ -366,21 +359,6 @@ InstructionTLBMiss:
366 mfspr r10, SPRN_SPRG_SCRATCH2 359 mfspr r10, SPRN_SPRG_SCRATCH2
367 EXCEPTION_EPILOG_0 360 EXCEPTION_EPILOG_0
368 rfi 361 rfi
3692:
370 mfspr r10, SPRN_SRR1
371 /* clear all error bits as TLB Miss
372 * sets a few unconditionally
373 */
374 rlwinm r10, r10, 0, 0xffff
375 mtspr SPRN_SRR1, r10
376
377 /* Restore registers */
378#ifdef CONFIG_8xx_CPU6
379 mfspr r3, SPRN_DAR
380 mtspr SPRN_DAR, r11 /* Tag DAR */
381#endif
382 mfspr r10, SPRN_SPRG_SCRATCH2
383 b InstructionTLBError1
384 362
385 . = 0x1200 363 . = 0x1200
386DataStoreTLBMiss: 364DataStoreTLBMiss:
@@ -395,20 +373,16 @@ DataStoreTLBMiss:
395 * kernel page tables. 373 * kernel page tables.
396 */ 374 */
397 andis. r11, r10, 0x8000 375 andis. r11, r10, 0x8000
398 mfspr r11, SPRN_M_TW /* Get level 1 table base address */ 376 mfspr r11, SPRN_M_TW /* Get level 1 table */
399 beq 3f 377 beq 3f
400 lis r11, (swapper_pg_dir-PAGE_OFFSET)@h 378 lis r11, (swapper_pg_dir-PAGE_OFFSET)@ha
401 ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l
4023: 3793:
403 /* Extract level 1 index */ 380 /* Insert level 1 index */
404 rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 381 rlwimi r11, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29
405 lwzx r11, r10, r11 /* Get the level 1 entry */ 382 lwz r11, (swapper_pg_dir-PAGE_OFFSET)@l(r11) /* Get the level 1 entry */
406 rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */
407 beq 2f /* If zero, don't try to find a pte */
408 383
409 /* We have a pte table, so load fetch the pte from the table. 384 /* We have a pte table, so load fetch the pte from the table.
410 */ 385 */
411 mfspr r10, SPRN_MD_EPN /* Get address of fault */
412 /* Extract level 2 index */ 386 /* Extract level 2 index */
413 rlwinm r10, r10, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29 387 rlwinm r10, r10, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29
414 rlwimi r10, r11, 0, 0, 32 - PAGE_SHIFT - 1 /* Add level 2 base */ 388 rlwimi r10, r11, 0, 0, 32 - PAGE_SHIFT - 1 /* Add level 2 base */
@@ -441,16 +415,13 @@ DataStoreTLBMiss:
441 and r11, r11, r10 415 and r11, r11, r10
442 rlwimi r10, r11, 0, _PAGE_PRESENT 416 rlwimi r10, r11, 0, _PAGE_PRESENT
443#endif 417#endif
444 /* invert RW */
445 xori r10, r10, _PAGE_RW
446
447 /* The Linux PTE won't go exactly into the MMU TLB. 418 /* The Linux PTE won't go exactly into the MMU TLB.
448 * Software indicator bits 22 and 28 must be clear. 419 * Software indicator bits 22 and 28 must be clear.
449 * Software indicator bits 24, 25, 26, and 27 must be 420 * Software indicator bits 24, 25, 26, and 27 must be
450 * set. All other Linux PTE bits control the behavior 421 * set. All other Linux PTE bits control the behavior
451 * of the MMU. 422 * of the MMU.
452 */ 423 */
4532: li r11, RPN_PATTERN 424 li r11, RPN_PATTERN
454 rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */ 425 rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */
455 MTSPR_CPU6(SPRN_MD_RPN, r10, r3) /* Update TLB entry */ 426 MTSPR_CPU6(SPRN_MD_RPN, r10, r3) /* Update TLB entry */
456 427
@@ -469,10 +440,7 @@ DataStoreTLBMiss:
469 */ 440 */
470 . = 0x1300 441 . = 0x1300
471InstructionTLBError: 442InstructionTLBError:
472 EXCEPTION_PROLOG_0 443 EXCEPTION_PROLOG
473InstructionTLBError1:
474 EXCEPTION_PROLOG_1
475 EXCEPTION_PROLOG_2
476 mr r4,r12 444 mr r4,r12
477 mr r5,r9 445 mr r5,r9
478 andis. r10,r5,0x4000 446 andis. r10,r5,0x4000
@@ -532,30 +500,21 @@ DARFixed:/* Return from dcbx instruction bug workaround */
532 /* define if you don't want to use self modifying code */ 500 /* define if you don't want to use self modifying code */
533#define NO_SELF_MODIFYING_CODE 501#define NO_SELF_MODIFYING_CODE
534FixupDAR:/* Entry point for dcbx workaround. */ 502FixupDAR:/* Entry point for dcbx workaround. */
535#ifdef CONFIG_8xx_CPU6
536 mtspr SPRN_DAR, r3
537#endif
538 mtspr SPRN_SPRG_SCRATCH2, r10 503 mtspr SPRN_SPRG_SCRATCH2, r10
539 /* fetch instruction from memory. */ 504 /* fetch instruction from memory. */
540 mfspr r10, SPRN_SRR0 505 mfspr r10, SPRN_SRR0
541 andis. r11, r10, 0x8000 /* Address >= 0x80000000 */ 506 andis. r11, r10, 0x8000 /* Address >= 0x80000000 */
542 mfspr r11, SPRN_M_TW /* Get level 1 table base address */ 507 mfspr r11, SPRN_M_TW /* Get level 1 table */
543 beq- 3f /* Branch if user space */ 508 beq 3f
544 lis r11, (swapper_pg_dir-PAGE_OFFSET)@h 509 lis r11, (swapper_pg_dir-PAGE_OFFSET)@ha
545 ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l 510 /* Insert level 1 index */
546 /* Extract level 1 index */ 5113: rlwimi r11, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29
5473: rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 512 lwz r11, (swapper_pg_dir-PAGE_OFFSET)@l(r11) /* Get the level 1 entry */
548 lwzx r11, r10, r11 /* Get the level 1 entry */ 513 rlwinm r11, r11,0,0,19 /* Extract page descriptor page address */
549 rlwinm r10, r11,0,0,19 /* Extract page descriptor page address */ 514 /* Insert level 2 index */
550 mfspr r11, SPRN_SRR0 /* Get effective address of fault */ 515 rlwimi r11, r10, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29
551 /* Extract level 2 index */ 516 lwz r11, 0(r11) /* Get the pte */
552 rlwinm r11, r11, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29
553 lwzx r11, r10, r11 /* Get the pte */
554#ifdef CONFIG_8xx_CPU6
555 mfspr r3, SPRN_DAR
556#endif
557 /* concat physical page address(r11) and page offset(r10) */ 517 /* concat physical page address(r11) and page offset(r10) */
558 mfspr r10, SPRN_SRR0
559 rlwimi r11, r10, 0, 32 - PAGE_SHIFT, 31 518 rlwimi r11, r10, 0, 32 - PAGE_SHIFT, 31
560 lwz r11,0(r11) 519 lwz r11,0(r11)
561/* Check if it really is a dcbx instruction. */ 520/* Check if it really is a dcbx instruction. */
@@ -705,8 +664,7 @@ start_here:
705 * init's THREAD like the context switch code does, but this is 664 * init's THREAD like the context switch code does, but this is
706 * easier......until someone changes init's static structures. 665 * easier......until someone changes init's static structures.
707 */ 666 */
708 lis r6, swapper_pg_dir@h 667 lis r6, swapper_pg_dir@ha
709 ori r6, r6, swapper_pg_dir@l
710 tophys(r6,r6) 668 tophys(r6,r6)
711#ifdef CONFIG_8xx_CPU6 669#ifdef CONFIG_8xx_CPU6
712 lis r4, cpu6_errata_word@h 670 lis r4, cpu6_errata_word@h
@@ -885,23 +843,28 @@ _GLOBAL(set_context)
885 stw r4, 0x4(r5) 843 stw r4, 0x4(r5)
886#endif 844#endif
887 845
846 /* Register M_TW will contain base address of level 1 table minus the
847 * lower part of the kernel PGDIR base address, so that all accesses to
848 * level 1 table are done relative to lower part of kernel PGDIR base
849 * address.
850 */
851 li r5, (swapper_pg_dir-PAGE_OFFSET)@l
852 sub r4, r4, r5
853 tophys (r4, r4)
888#ifdef CONFIG_8xx_CPU6 854#ifdef CONFIG_8xx_CPU6
889 lis r6, cpu6_errata_word@h 855 lis r6, cpu6_errata_word@h
890 ori r6, r6, cpu6_errata_word@l 856 ori r6, r6, cpu6_errata_word@l
891 tophys (r4, r4)
892 li r7, 0x3f80 857 li r7, 0x3f80
893 stw r7, 12(r6) 858 stw r7, 12(r6)
894 lwz r7, 12(r6) 859 lwz r7, 12(r6)
895 mtspr SPRN_M_TW, r4 /* Update MMU base address */ 860#endif
861 mtspr SPRN_M_TW, r4 /* Update pointeur to level 1 table */
862#ifdef CONFIG_8xx_CPU6
896 li r7, 0x3380 863 li r7, 0x3380
897 stw r7, 12(r6) 864 stw r7, 12(r6)
898 lwz r7, 12(r6) 865 lwz r7, 12(r6)
899 mtspr SPRN_M_CASID, r3 /* Update context */
900#else
901 mtspr SPRN_M_CASID,r3 /* Update context */
902 tophys (r4, r4)
903 mtspr SPRN_M_TW, r4 /* and pgd */
904#endif 866#endif
867 mtspr SPRN_M_CASID, r3 /* Update context */
905 SYNC 868 SYNC
906 blr 869 blr
907 870
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index d6e195e8cd4c..5a23b69f8129 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -115,6 +115,14 @@ static struct slb_shadow * __init init_slb_shadow(int cpu)
115{ 115{
116 struct slb_shadow *s = &slb_shadow[cpu]; 116 struct slb_shadow *s = &slb_shadow[cpu];
117 117
118 /*
119 * When we come through here to initialise boot_paca, the slb_shadow
120 * buffers are not allocated yet. That's OK, we'll get one later in
121 * boot, but make sure we don't corrupt memory at 0.
122 */
123 if (!slb_shadow)
124 return NULL;
125
118 s->persistent = cpu_to_be32(SLB_NUM_BOLTED); 126 s->persistent = cpu_to_be32(SLB_NUM_BOLTED);
119 s->buffer_length = cpu_to_be32(sizeof(*s)); 127 s->buffer_length = cpu_to_be32(sizeof(*s));
120 128
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index 1f61fab59d9b..83df3075d3df 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -147,10 +147,8 @@ void pci_devs_phb_init_dynamic(struct pci_controller *phb)
147 /* PHB nodes themselves must not match */ 147 /* PHB nodes themselves must not match */
148 update_dn_pci_info(dn, phb); 148 update_dn_pci_info(dn, phb);
149 pdn = dn->data; 149 pdn = dn->data;
150 if (pdn) { 150 if (pdn)
151 pdn->devfn = pdn->busno = -1; 151 pdn->devfn = pdn->busno = -1;
152 pdn->phb = phb;
153 }
154 152
155 /* Update dn->phb ptrs for new phb and children devices */ 153 /* Update dn->phb ptrs for new phb and children devices */
156 traverse_pci_devices(dn, update_dn_pci_info, phb); 154 traverse_pci_devices(dn, update_dn_pci_info, phb);
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 6a799b3cc6b4..b8e15c678960 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -652,9 +652,6 @@ void __init early_init_devtree(void *params)
652 if (!early_init_dt_verify(params)) 652 if (!early_init_dt_verify(params))
653 panic("BUG: Failed verifying flat device tree, bad version?"); 653 panic("BUG: Failed verifying flat device tree, bad version?");
654 654
655 /* Setup flat device-tree pointer */
656 initial_boot_params = params;
657
658#ifdef CONFIG_PPC_RTAS 655#ifdef CONFIG_PPC_RTAS
659 /* Some machines might need RTAS info for debugging, grab it now. */ 656 /* Some machines might need RTAS info for debugging, grab it now. */
660 of_scan_flat_dt(early_init_dt_scan_rtas, NULL); 657 of_scan_flat_dt(early_init_dt_scan_rtas, NULL);
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 4af905e81ab0..21c45a2d0706 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -897,7 +897,7 @@ int rtas_offline_cpus_mask(cpumask_var_t cpus)
897} 897}
898EXPORT_SYMBOL(rtas_offline_cpus_mask); 898EXPORT_SYMBOL(rtas_offline_cpus_mask);
899 899
900int rtas_ibm_suspend_me(struct rtas_args *args) 900int rtas_ibm_suspend_me(u64 handle, int *vasi_return)
901{ 901{
902 long state; 902 long state;
903 long rc; 903 long rc;
@@ -911,8 +911,7 @@ int rtas_ibm_suspend_me(struct rtas_args *args)
911 return -ENOSYS; 911 return -ENOSYS;
912 912
913 /* Make sure the state is valid */ 913 /* Make sure the state is valid */
914 rc = plpar_hcall(H_VASI_STATE, retbuf, 914 rc = plpar_hcall(H_VASI_STATE, retbuf, handle);
915 ((u64)args->args[0] << 32) | args->args[1]);
916 915
917 state = retbuf[0]; 916 state = retbuf[0];
918 917
@@ -920,12 +919,12 @@ int rtas_ibm_suspend_me(struct rtas_args *args)
920 printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned %ld\n",rc); 919 printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned %ld\n",rc);
921 return rc; 920 return rc;
922 } else if (state == H_VASI_ENABLED) { 921 } else if (state == H_VASI_ENABLED) {
923 args->args[args->nargs] = RTAS_NOT_SUSPENDABLE; 922 *vasi_return = RTAS_NOT_SUSPENDABLE;
924 return 0; 923 return 0;
925 } else if (state != H_VASI_SUSPENDING) { 924 } else if (state != H_VASI_SUSPENDING) {
926 printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned state %ld\n", 925 printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned state %ld\n",
927 state); 926 state);
928 args->args[args->nargs] = -1; 927 *vasi_return = -1;
929 return 0; 928 return 0;
930 } 929 }
931 930
@@ -973,7 +972,7 @@ out:
973 return atomic_read(&data.error); 972 return atomic_read(&data.error);
974} 973}
975#else /* CONFIG_PPC_PSERIES */ 974#else /* CONFIG_PPC_PSERIES */
976int rtas_ibm_suspend_me(struct rtas_args *args) 975int rtas_ibm_suspend_me(u64 handle, int *vasi_return)
977{ 976{
978 return -ENOSYS; 977 return -ENOSYS;
979} 978}
@@ -1053,7 +1052,16 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
1053 1052
1054 /* Need to handle ibm,suspend_me call specially */ 1053 /* Need to handle ibm,suspend_me call specially */
1055 if (token == ibm_suspend_me_token) { 1054 if (token == ibm_suspend_me_token) {
1056 rc = rtas_ibm_suspend_me(&args); 1055
1056 /*
1057 * rtas_ibm_suspend_me assumes args are in cpu endian, or at least the
1058 * hcall within it requires it.
1059 */
1060 int vasi_rc = 0;
1061 u64 handle = ((u64)be32_to_cpu(args.args[0]) << 32)
1062 | be32_to_cpu(args.args[1]);
1063 rc = rtas_ibm_suspend_me(handle, &vasi_rc);
1064 args.rets[0] = cpu_to_be32(vasi_rc);
1057 if (rc) 1065 if (rc)
1058 return rc; 1066 return rc;
1059 goto copy_return; 1067 goto copy_return;
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 8b2d2dc8ef10..6e19afa35a15 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -434,20 +434,6 @@ void generic_cpu_die(unsigned int cpu)
434 printk(KERN_ERR "CPU%d didn't die...\n", cpu); 434 printk(KERN_ERR "CPU%d didn't die...\n", cpu);
435} 435}
436 436
437void generic_mach_cpu_die(void)
438{
439 unsigned int cpu;
440
441 local_irq_disable();
442 idle_task_exit();
443 cpu = smp_processor_id();
444 printk(KERN_DEBUG "CPU%d offline\n", cpu);
445 __this_cpu_write(cpu_state, CPU_DEAD);
446 smp_wmb();
447 while (__this_cpu_read(cpu_state) != CPU_UP_PREPARE)
448 cpu_relax();
449}
450
451void generic_set_cpu_dead(unsigned int cpu) 437void generic_set_cpu_dead(unsigned int cpu)
452{ 438{
453 per_cpu(cpu_state, cpu) = CPU_DEAD; 439 per_cpu(cpu_state, cpu) = CPU_DEAD;
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index cd9be9aa016d..b2702e87db0d 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -121,17 +121,3 @@ long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
121 return sys_fadvise64(fd, (u64)offset_high << 32 | offset_low, 121 return sys_fadvise64(fd, (u64)offset_high << 32 | offset_low,
122 (u64)len_high << 32 | len_low, advice); 122 (u64)len_high << 32 | len_low, advice);
123} 123}
124
125void do_show_syscall(unsigned long r3, unsigned long r4, unsigned long r5,
126 unsigned long r6, unsigned long r7, unsigned long r8,
127 struct pt_regs *regs)
128{
129 printk("syscall %ld(%lx, %lx, %lx, %lx, %lx, %lx) regs=%p current=%p"
130 " cpu=%d\n", regs->gpr[0], r3, r4, r5, r6, r7, r8, regs,
131 current, smp_processor_id());
132}
133
134void do_show_syscall_exit(unsigned long r3)
135{
136 printk(" -> %lx, current=%p cpu=%d\n", r3, current, smp_processor_id());
137}
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index e6595b72269b..19e4744b6eba 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -1707,21 +1707,6 @@ void altivec_assist_exception(struct pt_regs *regs)
1707} 1707}
1708#endif /* CONFIG_ALTIVEC */ 1708#endif /* CONFIG_ALTIVEC */
1709 1709
1710#ifdef CONFIG_VSX
1711void vsx_assist_exception(struct pt_regs *regs)
1712{
1713 if (!user_mode(regs)) {
1714 printk(KERN_EMERG "VSX assist exception in kernel mode"
1715 " at %lx\n", regs->nip);
1716 die("Kernel VSX assist exception", regs, SIGILL);
1717 }
1718
1719 flush_vsx_to_thread(current);
1720 printk(KERN_INFO "VSX assist not supported at %lx\n", regs->nip);
1721 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
1722}
1723#endif /* CONFIG_VSX */
1724
1725#ifdef CONFIG_FSL_BOOKE 1710#ifdef CONFIG_FSL_BOOKE
1726void CacheLockingException(struct pt_regs *regs, unsigned long address, 1711void CacheLockingException(struct pt_regs *regs, unsigned long address,
1727 unsigned long error_code) 1712 unsigned long error_code)