diff options
author | Paul Mackerras <paulus@samba.org> | 2006-12-03 23:59:07 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-03 23:59:07 -0500 |
commit | 79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch) | |
tree | 6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /arch/powerpc/kernel/head_64.S | |
parent | 19a79859e168640f8e16d7b216d211c1c52b687a (diff) | |
parent | 2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2 (diff) |
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 76d1c81afe52..8cdff5a1f3e2 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -503,7 +503,7 @@ BEGIN_FTR_SECTION | |||
503 | rlwimi r13,r12,16,0x20 | 503 | rlwimi r13,r12,16,0x20 |
504 | mfcr r12 | 504 | mfcr r12 |
505 | cmpwi r13,0x2c | 505 | cmpwi r13,0x2c |
506 | beq .do_stab_bolted_pSeries | 506 | beq do_stab_bolted_pSeries |
507 | mtcrf 0x80,r12 | 507 | mtcrf 0x80,r12 |
508 | mfspr r12,SPRN_SPRG2 | 508 | mfspr r12,SPRN_SPRG2 |
509 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | 509 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) |
@@ -633,7 +633,7 @@ masked_interrupt: | |||
633 | b . | 633 | b . |
634 | 634 | ||
635 | .align 7 | 635 | .align 7 |
636 | _GLOBAL(do_stab_bolted_pSeries) | 636 | do_stab_bolted_pSeries: |
637 | mtcrf 0x80,r12 | 637 | mtcrf 0x80,r12 |
638 | mfspr r12,SPRN_SPRG2 | 638 | mfspr r12,SPRN_SPRG2 |
639 | EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted) | 639 | EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted) |
@@ -1088,7 +1088,7 @@ slb_miss_fault: | |||
1088 | li r5,0 | 1088 | li r5,0 |
1089 | std r4,_DAR(r1) | 1089 | std r4,_DAR(r1) |
1090 | std r5,_DSISR(r1) | 1090 | std r5,_DSISR(r1) |
1091 | b .handle_page_fault | 1091 | b handle_page_fault |
1092 | 1092 | ||
1093 | unrecov_user_slb: | 1093 | unrecov_user_slb: |
1094 | EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN) | 1094 | EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN) |
@@ -1216,12 +1216,13 @@ program_check_common: | |||
1216 | .globl fp_unavailable_common | 1216 | .globl fp_unavailable_common |
1217 | fp_unavailable_common: | 1217 | fp_unavailable_common: |
1218 | EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN) | 1218 | EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN) |
1219 | bne .load_up_fpu /* if from user, just load it up */ | 1219 | bne 1f /* if from user, just load it up */ |
1220 | bl .save_nvgprs | 1220 | bl .save_nvgprs |
1221 | addi r3,r1,STACK_FRAME_OVERHEAD | 1221 | addi r3,r1,STACK_FRAME_OVERHEAD |
1222 | ENABLE_INTS | 1222 | ENABLE_INTS |
1223 | bl .kernel_fp_unavailable_exception | 1223 | bl .kernel_fp_unavailable_exception |
1224 | BUG_OPCODE | 1224 | BUG_OPCODE |
1225 | 1: b .load_up_fpu | ||
1225 | 1226 | ||
1226 | .align 7 | 1227 | .align 7 |
1227 | .globl altivec_unavailable_common | 1228 | .globl altivec_unavailable_common |
@@ -1321,10 +1322,10 @@ _GLOBAL(do_hash_page) | |||
1321 | std r4,_DSISR(r1) | 1322 | std r4,_DSISR(r1) |
1322 | 1323 | ||
1323 | andis. r0,r4,0xa450 /* weird error? */ | 1324 | andis. r0,r4,0xa450 /* weird error? */ |
1324 | bne- .handle_page_fault /* if not, try to insert a HPTE */ | 1325 | bne- handle_page_fault /* if not, try to insert a HPTE */ |
1325 | BEGIN_FTR_SECTION | 1326 | BEGIN_FTR_SECTION |
1326 | andis. r0,r4,0x0020 /* Is it a segment table fault? */ | 1327 | andis. r0,r4,0x0020 /* Is it a segment table fault? */ |
1327 | bne- .do_ste_alloc /* If so handle it */ | 1328 | bne- do_ste_alloc /* If so handle it */ |
1328 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | 1329 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) |
1329 | 1330 | ||
1330 | /* | 1331 | /* |
@@ -1366,7 +1367,7 @@ BEGIN_FW_FTR_SECTION | |||
1366 | * because ret_from_except_lite will check for and handle pending | 1367 | * because ret_from_except_lite will check for and handle pending |
1367 | * interrupts if necessary. | 1368 | * interrupts if necessary. |
1368 | */ | 1369 | */ |
1369 | beq .ret_from_except_lite | 1370 | beq 13f |
1370 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | 1371 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) |
1371 | #endif | 1372 | #endif |
1372 | BEGIN_FW_FTR_SECTION | 1373 | BEGIN_FW_FTR_SECTION |
@@ -1390,14 +1391,14 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) | |||
1390 | b 11f | 1391 | b 11f |
1391 | 1392 | ||
1392 | /* Here we have a page fault that hash_page can't handle. */ | 1393 | /* Here we have a page fault that hash_page can't handle. */ |
1393 | _GLOBAL(handle_page_fault) | 1394 | handle_page_fault: |
1394 | ENABLE_INTS | 1395 | ENABLE_INTS |
1395 | 11: ld r4,_DAR(r1) | 1396 | 11: ld r4,_DAR(r1) |
1396 | ld r5,_DSISR(r1) | 1397 | ld r5,_DSISR(r1) |
1397 | addi r3,r1,STACK_FRAME_OVERHEAD | 1398 | addi r3,r1,STACK_FRAME_OVERHEAD |
1398 | bl .do_page_fault | 1399 | bl .do_page_fault |
1399 | cmpdi r3,0 | 1400 | cmpdi r3,0 |
1400 | beq+ .ret_from_except_lite | 1401 | beq+ 13f |
1401 | bl .save_nvgprs | 1402 | bl .save_nvgprs |
1402 | mr r5,r3 | 1403 | mr r5,r3 |
1403 | addi r3,r1,STACK_FRAME_OVERHEAD | 1404 | addi r3,r1,STACK_FRAME_OVERHEAD |
@@ -1405,6 +1406,8 @@ _GLOBAL(handle_page_fault) | |||
1405 | bl .bad_page_fault | 1406 | bl .bad_page_fault |
1406 | b .ret_from_except | 1407 | b .ret_from_except |
1407 | 1408 | ||
1409 | 13: b .ret_from_except_lite | ||
1410 | |||
1408 | /* We have a page fault that hash_page could handle but HV refused | 1411 | /* We have a page fault that hash_page could handle but HV refused |
1409 | * the PTE insertion | 1412 | * the PTE insertion |
1410 | */ | 1413 | */ |
@@ -1415,11 +1418,11 @@ _GLOBAL(handle_page_fault) | |||
1415 | b .ret_from_except | 1418 | b .ret_from_except |
1416 | 1419 | ||
1417 | /* here we have a segment miss */ | 1420 | /* here we have a segment miss */ |
1418 | _GLOBAL(do_ste_alloc) | 1421 | do_ste_alloc: |
1419 | bl .ste_allocate /* try to insert stab entry */ | 1422 | bl .ste_allocate /* try to insert stab entry */ |
1420 | cmpdi r3,0 | 1423 | cmpdi r3,0 |
1421 | beq+ fast_exception_return | 1424 | bne- handle_page_fault |
1422 | b .handle_page_fault | 1425 | b fast_exception_return |
1423 | 1426 | ||
1424 | /* | 1427 | /* |
1425 | * r13 points to the PACA, r9 contains the saved CR, | 1428 | * r13 points to the PACA, r9 contains the saved CR, |
@@ -1624,11 +1627,6 @@ _STATIC(__start_initialization_iSeries) | |||
1624 | li r0,0 | 1627 | li r0,0 |
1625 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | 1628 | stdu r0,-STACK_FRAME_OVERHEAD(r1) |
1626 | 1629 | ||
1627 | LOAD_REG_IMMEDIATE(r3,cpu_specs) | ||
1628 | LOAD_REG_IMMEDIATE(r4,cur_cpu_spec) | ||
1629 | li r5,0 | ||
1630 | bl .identify_cpu | ||
1631 | |||
1632 | LOAD_REG_IMMEDIATE(r2,__toc_start) | 1630 | LOAD_REG_IMMEDIATE(r2,__toc_start) |
1633 | addi r2,r2,0x4000 | 1631 | addi r2,r2,0x4000 |
1634 | addi r2,r2,0x4000 | 1632 | addi r2,r2,0x4000 |
@@ -1687,6 +1685,8 @@ _GLOBAL(__start_initialization_multiplatform) | |||
1687 | cmpwi r0,0x3c /* 970FX */ | 1685 | cmpwi r0,0x3c /* 970FX */ |
1688 | beq 1f | 1686 | beq 1f |
1689 | cmpwi r0,0x44 /* 970MP */ | 1687 | cmpwi r0,0x44 /* 970MP */ |
1688 | beq 1f | ||
1689 | cmpwi r0,0x45 /* 970GX */ | ||
1690 | bne 2f | 1690 | bne 2f |
1691 | 1: bl .__cpu_preinit_ppc970 | 1691 | 1: bl .__cpu_preinit_ppc970 |
1692 | 2: | 1692 | 2: |
@@ -2005,13 +2005,6 @@ _STATIC(start_here_multiplatform) | |||
2005 | addi r2,r2,0x4000 | 2005 | addi r2,r2,0x4000 |
2006 | add r2,r2,r26 | 2006 | add r2,r2,r26 |
2007 | 2007 | ||
2008 | LOAD_REG_IMMEDIATE(r3, cpu_specs) | ||
2009 | add r3,r3,r26 | ||
2010 | LOAD_REG_IMMEDIATE(r4,cur_cpu_spec) | ||
2011 | add r4,r4,r26 | ||
2012 | mr r5,r26 | ||
2013 | bl .identify_cpu | ||
2014 | |||
2015 | /* Do very early kernel initializations, including initial hash table, | 2008 | /* Do very early kernel initializations, including initial hash table, |
2016 | * stab and slb setup before we turn on relocation. */ | 2009 | * stab and slb setup before we turn on relocation. */ |
2017 | 2010 | ||
@@ -2040,13 +2033,6 @@ _STATIC(start_here_common) | |||
2040 | li r0,0 | 2033 | li r0,0 |
2041 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | 2034 | stdu r0,-STACK_FRAME_OVERHEAD(r1) |
2042 | 2035 | ||
2043 | /* Apply the CPUs-specific fixups (nop out sections not relevant | ||
2044 | * to this CPU | ||
2045 | */ | ||
2046 | li r3,0 | ||
2047 | bl .do_cpu_ftr_fixups | ||
2048 | bl .do_fw_ftr_fixups | ||
2049 | |||
2050 | /* ptr to current */ | 2036 | /* ptr to current */ |
2051 | LOAD_REG_IMMEDIATE(r4, init_task) | 2037 | LOAD_REG_IMMEDIATE(r4, init_task) |
2052 | std r4,PACACURRENT(r13) | 2038 | std r4,PACACURRENT(r13) |