diff options
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 645c7f10fb28..e720729f3e55 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -487,7 +487,7 @@ BEGIN_FTR_SECTION | |||
487 | rlwimi r13,r12,16,0x20 | 487 | rlwimi r13,r12,16,0x20 |
488 | mfcr r12 | 488 | mfcr r12 |
489 | cmpwi r13,0x2c | 489 | cmpwi r13,0x2c |
490 | beq .do_stab_bolted_pSeries | 490 | beq do_stab_bolted_pSeries |
491 | mtcrf 0x80,r12 | 491 | mtcrf 0x80,r12 |
492 | mfspr r12,SPRN_SPRG2 | 492 | mfspr r12,SPRN_SPRG2 |
493 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | 493 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) |
@@ -600,7 +600,7 @@ system_call_pSeries: | |||
600 | STD_EXCEPTION_PSERIES(., performance_monitor) | 600 | STD_EXCEPTION_PSERIES(., performance_monitor) |
601 | 601 | ||
602 | .align 7 | 602 | .align 7 |
603 | _GLOBAL(do_stab_bolted_pSeries) | 603 | do_stab_bolted_pSeries: |
604 | mtcrf 0x80,r12 | 604 | mtcrf 0x80,r12 |
605 | mfspr r12,SPRN_SPRG2 | 605 | mfspr r12,SPRN_SPRG2 |
606 | EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted) | 606 | EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted) |
@@ -1046,7 +1046,7 @@ slb_miss_fault: | |||
1046 | li r5,0 | 1046 | li r5,0 |
1047 | std r4,_DAR(r1) | 1047 | std r4,_DAR(r1) |
1048 | std r5,_DSISR(r1) | 1048 | std r5,_DSISR(r1) |
1049 | b .handle_page_fault | 1049 | b handle_page_fault |
1050 | 1050 | ||
1051 | unrecov_user_slb: | 1051 | unrecov_user_slb: |
1052 | EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN) | 1052 | EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN) |
@@ -1174,12 +1174,13 @@ program_check_common: | |||
1174 | .globl fp_unavailable_common | 1174 | .globl fp_unavailable_common |
1175 | fp_unavailable_common: | 1175 | fp_unavailable_common: |
1176 | EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN) | 1176 | EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN) |
1177 | bne .load_up_fpu /* if from user, just load it up */ | 1177 | bne 1f /* if from user, just load it up */ |
1178 | bl .save_nvgprs | 1178 | bl .save_nvgprs |
1179 | addi r3,r1,STACK_FRAME_OVERHEAD | 1179 | addi r3,r1,STACK_FRAME_OVERHEAD |
1180 | ENABLE_INTS | 1180 | ENABLE_INTS |
1181 | bl .kernel_fp_unavailable_exception | 1181 | bl .kernel_fp_unavailable_exception |
1182 | BUG_OPCODE | 1182 | BUG_OPCODE |
1183 | 1: b .load_up_fpu | ||
1183 | 1184 | ||
1184 | .align 7 | 1185 | .align 7 |
1185 | .globl altivec_unavailable_common | 1186 | .globl altivec_unavailable_common |
@@ -1279,10 +1280,10 @@ _GLOBAL(do_hash_page) | |||
1279 | std r4,_DSISR(r1) | 1280 | std r4,_DSISR(r1) |
1280 | 1281 | ||
1281 | andis. r0,r4,0xa450 /* weird error? */ | 1282 | andis. r0,r4,0xa450 /* weird error? */ |
1282 | bne- .handle_page_fault /* if not, try to insert a HPTE */ | 1283 | bne- handle_page_fault /* if not, try to insert a HPTE */ |
1283 | BEGIN_FTR_SECTION | 1284 | BEGIN_FTR_SECTION |
1284 | andis. r0,r4,0x0020 /* Is it a segment table fault? */ | 1285 | andis. r0,r4,0x0020 /* Is it a segment table fault? */ |
1285 | bne- .do_ste_alloc /* If so handle it */ | 1286 | bne- do_ste_alloc /* If so handle it */ |
1286 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | 1287 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) |
1287 | 1288 | ||
1288 | /* | 1289 | /* |
@@ -1324,7 +1325,7 @@ BEGIN_FW_FTR_SECTION | |||
1324 | * because ret_from_except_lite will check for and handle pending | 1325 | * because ret_from_except_lite will check for and handle pending |
1325 | * interrupts if necessary. | 1326 | * interrupts if necessary. |
1326 | */ | 1327 | */ |
1327 | beq .ret_from_except_lite | 1328 | beq 13f |
1328 | /* For a hash failure, we don't bother re-enabling interrupts */ | 1329 | /* For a hash failure, we don't bother re-enabling interrupts */ |
1329 | ble- 12f | 1330 | ble- 12f |
1330 | 1331 | ||
@@ -1346,14 +1347,14 @@ BEGIN_FW_FTR_SECTION | |||
1346 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) | 1347 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) |
1347 | 1348 | ||
1348 | /* Here we have a page fault that hash_page can't handle. */ | 1349 | /* Here we have a page fault that hash_page can't handle. */ |
1349 | _GLOBAL(handle_page_fault) | 1350 | handle_page_fault: |
1350 | ENABLE_INTS | 1351 | ENABLE_INTS |
1351 | 11: ld r4,_DAR(r1) | 1352 | 11: ld r4,_DAR(r1) |
1352 | ld r5,_DSISR(r1) | 1353 | ld r5,_DSISR(r1) |
1353 | addi r3,r1,STACK_FRAME_OVERHEAD | 1354 | addi r3,r1,STACK_FRAME_OVERHEAD |
1354 | bl .do_page_fault | 1355 | bl .do_page_fault |
1355 | cmpdi r3,0 | 1356 | cmpdi r3,0 |
1356 | beq+ .ret_from_except_lite | 1357 | beq+ 13f |
1357 | bl .save_nvgprs | 1358 | bl .save_nvgprs |
1358 | mr r5,r3 | 1359 | mr r5,r3 |
1359 | addi r3,r1,STACK_FRAME_OVERHEAD | 1360 | addi r3,r1,STACK_FRAME_OVERHEAD |
@@ -1370,12 +1371,14 @@ _GLOBAL(handle_page_fault) | |||
1370 | bl .low_hash_fault | 1371 | bl .low_hash_fault |
1371 | b .ret_from_except | 1372 | b .ret_from_except |
1372 | 1373 | ||
1374 | 13: b .ret_from_except_lite | ||
1375 | |||
1373 | /* here we have a segment miss */ | 1376 | /* here we have a segment miss */ |
1374 | _GLOBAL(do_ste_alloc) | 1377 | do_ste_alloc: |
1375 | bl .ste_allocate /* try to insert stab entry */ | 1378 | bl .ste_allocate /* try to insert stab entry */ |
1376 | cmpdi r3,0 | 1379 | cmpdi r3,0 |
1377 | beq+ fast_exception_return | 1380 | bne- handle_page_fault |
1378 | b .handle_page_fault | 1381 | b fast_exception_return |
1379 | 1382 | ||
1380 | /* | 1383 | /* |
1381 | * r13 points to the PACA, r9 contains the saved CR, | 1384 | * r13 points to the PACA, r9 contains the saved CR, |
@@ -1580,11 +1583,6 @@ _STATIC(__start_initialization_iSeries) | |||
1580 | li r0,0 | 1583 | li r0,0 |
1581 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | 1584 | stdu r0,-STACK_FRAME_OVERHEAD(r1) |
1582 | 1585 | ||
1583 | LOAD_REG_IMMEDIATE(r3,cpu_specs) | ||
1584 | LOAD_REG_IMMEDIATE(r4,cur_cpu_spec) | ||
1585 | li r5,0 | ||
1586 | bl .identify_cpu | ||
1587 | |||
1588 | LOAD_REG_IMMEDIATE(r2,__toc_start) | 1586 | LOAD_REG_IMMEDIATE(r2,__toc_start) |
1589 | addi r2,r2,0x4000 | 1587 | addi r2,r2,0x4000 |
1590 | addi r2,r2,0x4000 | 1588 | addi r2,r2,0x4000 |
@@ -1646,6 +1644,8 @@ _GLOBAL(__start_initialization_multiplatform) | |||
1646 | cmpwi r0,0x3c /* 970FX */ | 1644 | cmpwi r0,0x3c /* 970FX */ |
1647 | beq 1f | 1645 | beq 1f |
1648 | cmpwi r0,0x44 /* 970MP */ | 1646 | cmpwi r0,0x44 /* 970MP */ |
1647 | beq 1f | ||
1648 | cmpwi r0,0x45 /* 970GX */ | ||
1649 | bne 2f | 1649 | bne 2f |
1650 | 1: bl .__cpu_preinit_ppc970 | 1650 | 1: bl .__cpu_preinit_ppc970 |
1651 | 2: | 1651 | 2: |
@@ -1964,13 +1964,6 @@ _STATIC(start_here_multiplatform) | |||
1964 | addi r2,r2,0x4000 | 1964 | addi r2,r2,0x4000 |
1965 | add r2,r2,r26 | 1965 | add r2,r2,r26 |
1966 | 1966 | ||
1967 | LOAD_REG_IMMEDIATE(r3, cpu_specs) | ||
1968 | add r3,r3,r26 | ||
1969 | LOAD_REG_IMMEDIATE(r4,cur_cpu_spec) | ||
1970 | add r4,r4,r26 | ||
1971 | mr r5,r26 | ||
1972 | bl .identify_cpu | ||
1973 | |||
1974 | /* Do very early kernel initializations, including initial hash table, | 1967 | /* Do very early kernel initializations, including initial hash table, |
1975 | * stab and slb setup before we turn on relocation. */ | 1968 | * stab and slb setup before we turn on relocation. */ |
1976 | 1969 | ||
@@ -2000,13 +1993,6 @@ _STATIC(start_here_common) | |||
2000 | li r0,0 | 1993 | li r0,0 |
2001 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | 1994 | stdu r0,-STACK_FRAME_OVERHEAD(r1) |
2002 | 1995 | ||
2003 | /* Apply the CPUs-specific fixups (nop out sections not relevant | ||
2004 | * to this CPU | ||
2005 | */ | ||
2006 | li r3,0 | ||
2007 | bl .do_cpu_ftr_fixups | ||
2008 | bl .do_fw_ftr_fixups | ||
2009 | |||
2010 | /* ptr to current */ | 1996 | /* ptr to current */ |
2011 | LOAD_REG_IMMEDIATE(r4, init_task) | 1997 | LOAD_REG_IMMEDIATE(r4, init_task) |
2012 | std r4,PACACURRENT(r13) | 1998 | std r4,PACACURRENT(r13) |