aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_64.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-09-05 21:41:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-09-05 21:41:32 -0400
commitcb4f9a296472ebd1cde88970194888e962150875 (patch)
tree257cf69e93eb1773e0c9c3905a84b4d476267b41 /arch/powerpc/kernel/entry_64.S
parent813e64382a8a4afcbfd7caeba40292a8ea6d5cc3 (diff)
parent636802ef96eebe279b22ad9f9dacfe29291e45c7 (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt: "Here are a few fixes for 3.6 that were piling up while I was away or busy (I was mostly MIA a week or two before San Diego). Some fixes from Anton fixing up issues with our relatively new DSCR control feature, and a few other fixes that are either regressions or bugs nasty enough to warrant not waiting." * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Don't use __put_user() in patch_instruction powerpc: Make sure IPI handlers see data written by IPI senders powerpc: Restore correct DSCR in context switch powerpc: Fix DSCR inheritance in copy_thread() powerpc: Keep thread.dscr and thread.dscr_inherit in sync powerpc: Update DSCR on all CPUs when writing sysfs dscr_default powerpc/powernv: Always go into nap mode when CPU is offline powerpc: Give hypervisor decrementer interrupts their own handler powerpc/vphn: Fix arch_update_cpu_topology() return value
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r--arch/powerpc/kernel/entry_64.S23
1 files changed, 17 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 4b01a25e29e..b40e0b4815b 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -370,6 +370,12 @@ _GLOBAL(ret_from_fork)
370 li r3,0 370 li r3,0
371 b syscall_exit 371 b syscall_exit
372 372
373 .section ".toc","aw"
374DSCR_DEFAULT:
375 .tc dscr_default[TC],dscr_default
376
377 .section ".text"
378
373/* 379/*
374 * This routine switches between two different tasks. The process 380 * This routine switches between two different tasks. The process
375 * state of one is saved on its kernel stack. Then the state 381 * state of one is saved on its kernel stack. Then the state
@@ -509,9 +515,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
509 mr r1,r8 /* start using new stack pointer */ 515 mr r1,r8 /* start using new stack pointer */
510 std r7,PACAKSAVE(r13) 516 std r7,PACAKSAVE(r13)
511 517
512 ld r6,_CCR(r1)
513 mtcrf 0xFF,r6
514
515#ifdef CONFIG_ALTIVEC 518#ifdef CONFIG_ALTIVEC
516BEGIN_FTR_SECTION 519BEGIN_FTR_SECTION
517 ld r0,THREAD_VRSAVE(r4) 520 ld r0,THREAD_VRSAVE(r4)
@@ -520,14 +523,22 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
520#endif /* CONFIG_ALTIVEC */ 523#endif /* CONFIG_ALTIVEC */
521#ifdef CONFIG_PPC64 524#ifdef CONFIG_PPC64
522BEGIN_FTR_SECTION 525BEGIN_FTR_SECTION
526 lwz r6,THREAD_DSCR_INHERIT(r4)
527 ld r7,DSCR_DEFAULT@toc(2)
523 ld r0,THREAD_DSCR(r4) 528 ld r0,THREAD_DSCR(r4)
524 cmpd r0,r25 529 cmpwi r6,0
525 beq 1f 530 bne 1f
531 ld r0,0(r7)
5321: cmpd r0,r25
533 beq 2f
526 mtspr SPRN_DSCR,r0 534 mtspr SPRN_DSCR,r0
5271: 5352:
528END_FTR_SECTION_IFSET(CPU_FTR_DSCR) 536END_FTR_SECTION_IFSET(CPU_FTR_DSCR)
529#endif 537#endif
530 538
539 ld r6,_CCR(r1)
540 mtcrf 0xFF,r6
541
531 /* r3-r13 are destroyed -- Cort */ 542 /* r3-r13 are destroyed -- Cort */
532 REST_8GPRS(14, r1) 543 REST_8GPRS(14, r1)
533 REST_10GPRS(22, r1) 544 REST_10GPRS(22, r1)