diff options
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 97cedcd6c9b4..1111fcec7673 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -278,8 +278,12 @@ exception_marker: | |||
278 | beq- 1f; \ | 278 | beq- 1f; \ |
279 | ld r1,PACAKSAVE(r13); /* kernel stack to use */ \ | 279 | ld r1,PACAKSAVE(r13); /* kernel stack to use */ \ |
280 | 1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \ | 280 | 1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \ |
281 | bge- cr1,bad_stack; /* abort if it is */ \ | 281 | bge- cr1,2f; /* abort if it is */ \ |
282 | std r9,_CCR(r1); /* save CR in stackframe */ \ | 282 | b 3f; \ |
283 | 2: li r1,(n); /* will be reloaded later */ \ | ||
284 | sth r1,PACA_TRAP_SAVE(r13); \ | ||
285 | b bad_stack; \ | ||
286 | 3: std r9,_CCR(r1); /* save CR in stackframe */ \ | ||
283 | std r11,_NIP(r1); /* save SRR0 in stackframe */ \ | 287 | std r11,_NIP(r1); /* save SRR0 in stackframe */ \ |
284 | std r12,_MSR(r1); /* save SRR1 in stackframe */ \ | 288 | std r12,_MSR(r1); /* save SRR1 in stackframe */ \ |
285 | std r10,0(r1); /* make stack chain pointer */ \ | 289 | std r10,0(r1); /* make stack chain pointer */ \ |
@@ -940,6 +944,8 @@ bad_stack: | |||
940 | SAVE_2GPRS(7,r1) | 944 | SAVE_2GPRS(7,r1) |
941 | SAVE_10GPRS(12,r1) | 945 | SAVE_10GPRS(12,r1) |
942 | SAVE_10GPRS(22,r1) | 946 | SAVE_10GPRS(22,r1) |
947 | lhz r12,PACA_TRAP_SAVE(r13) | ||
948 | std r12,_TRAP(r1) | ||
943 | addi r11,r1,INT_FRAME_SIZE | 949 | addi r11,r1,INT_FRAME_SIZE |
944 | std r11,0(r1) | 950 | std r11,0(r1) |
945 | li r12,0 | 951 | li r12,0 |
@@ -1555,7 +1561,6 @@ _GLOBAL(generic_secondary_smp_init) | |||
1555 | 1561 | ||
1556 | /* turn on 64-bit mode */ | 1562 | /* turn on 64-bit mode */ |
1557 | bl .enable_64b_mode | 1563 | bl .enable_64b_mode |
1558 | isync | ||
1559 | 1564 | ||
1560 | /* Set up a paca value for this processor. Since we have the | 1565 | /* Set up a paca value for this processor. Since we have the |
1561 | * physical cpu id in r24, we need to search the pacas to find | 1566 | * physical cpu id in r24, we need to search the pacas to find |
@@ -1735,10 +1740,6 @@ _STATIC(__boot_from_prom) | |||
1735 | /* We never return */ | 1740 | /* We never return */ |
1736 | trap | 1741 | trap |
1737 | 1742 | ||
1738 | /* | ||
1739 | * At this point, r3 contains the physical address we are running at, | ||
1740 | * returned by prom_init() | ||
1741 | */ | ||
1742 | _STATIC(__after_prom_start) | 1743 | _STATIC(__after_prom_start) |
1743 | 1744 | ||
1744 | /* | 1745 | /* |
@@ -1851,7 +1852,6 @@ __secondary_start_pmac_0: | |||
1851 | _GLOBAL(pmac_secondary_start) | 1852 | _GLOBAL(pmac_secondary_start) |
1852 | /* turn on 64-bit mode */ | 1853 | /* turn on 64-bit mode */ |
1853 | bl .enable_64b_mode | 1854 | bl .enable_64b_mode |
1854 | isync | ||
1855 | 1855 | ||
1856 | /* Copy some CPU settings from CPU 0 */ | 1856 | /* Copy some CPU settings from CPU 0 */ |
1857 | bl .__restore_cpu_ppc970 | 1857 | bl .__restore_cpu_ppc970 |