diff options
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 163 |
1 files changed, 102 insertions, 61 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index e720729f3e55..71b1fe58e9e4 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -35,9 +35,7 @@ | |||
35 | #include <asm/thread_info.h> | 35 | #include <asm/thread_info.h> |
36 | #include <asm/firmware.h> | 36 | #include <asm/firmware.h> |
37 | 37 | ||
38 | #ifdef CONFIG_PPC_ISERIES | ||
39 | #define DO_SOFT_DISABLE | 38 | #define DO_SOFT_DISABLE |
40 | #endif | ||
41 | 39 | ||
42 | /* | 40 | /* |
43 | * We layout physical memory as follows: | 41 | * We layout physical memory as follows: |
@@ -74,13 +72,11 @@ | |||
74 | .text | 72 | .text |
75 | .globl _stext | 73 | .globl _stext |
76 | _stext: | 74 | _stext: |
77 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
78 | _GLOBAL(__start) | 75 | _GLOBAL(__start) |
79 | /* NOP this out unconditionally */ | 76 | /* NOP this out unconditionally */ |
80 | BEGIN_FTR_SECTION | 77 | BEGIN_FTR_SECTION |
81 | b .__start_initialization_multiplatform | 78 | b .__start_initialization_multiplatform |
82 | END_FTR_SECTION(0, 1) | 79 | END_FTR_SECTION(0, 1) |
83 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | ||
84 | 80 | ||
85 | /* Catch branch to 0 in real mode */ | 81 | /* Catch branch to 0 in real mode */ |
86 | trap | 82 | trap |
@@ -308,7 +304,9 @@ exception_marker: | |||
308 | std r9,_LINK(r1); \ | 304 | std r9,_LINK(r1); \ |
309 | mfctr r10; /* save CTR in stackframe */ \ | 305 | mfctr r10; /* save CTR in stackframe */ \ |
310 | std r10,_CTR(r1); \ | 306 | std r10,_CTR(r1); \ |
307 | lbz r10,PACASOFTIRQEN(r13); \ | ||
311 | mfspr r11,SPRN_XER; /* save XER in stackframe */ \ | 308 | mfspr r11,SPRN_XER; /* save XER in stackframe */ \ |
309 | std r10,SOFTE(r1); \ | ||
312 | std r11,_XER(r1); \ | 310 | std r11,_XER(r1); \ |
313 | li r9,(n)+1; \ | 311 | li r9,(n)+1; \ |
314 | std r9,_TRAP(r1); /* set trap number */ \ | 312 | std r9,_TRAP(r1); /* set trap number */ \ |
@@ -343,6 +341,34 @@ label##_pSeries: \ | |||
343 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | 341 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) |
344 | 342 | ||
345 | 343 | ||
344 | #define MASKABLE_EXCEPTION_PSERIES(n, label) \ | ||
345 | . = n; \ | ||
346 | .globl label##_pSeries; \ | ||
347 | label##_pSeries: \ | ||
348 | HMT_MEDIUM; \ | ||
349 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
350 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
351 | std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \ | ||
352 | std r10,PACA_EXGEN+EX_R10(r13); \ | ||
353 | lbz r10,PACASOFTIRQEN(r13); \ | ||
354 | mfcr r9; \ | ||
355 | cmpwi r10,0; \ | ||
356 | beq masked_interrupt; \ | ||
357 | mfspr r10,SPRN_SPRG1; \ | ||
358 | std r10,PACA_EXGEN+EX_R13(r13); \ | ||
359 | std r11,PACA_EXGEN+EX_R11(r13); \ | ||
360 | std r12,PACA_EXGEN+EX_R12(r13); \ | ||
361 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
362 | mfmsr r10; \ | ||
363 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
364 | LOAD_HANDLER(r12,label##_common) \ | ||
365 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
366 | mtspr SPRN_SRR0,r12; \ | ||
367 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
368 | mtspr SPRN_SRR1,r10; \ | ||
369 | rfid; \ | ||
370 | b . /* prevent speculative execution */ | ||
371 | |||
346 | #define STD_EXCEPTION_ISERIES(n, label, area) \ | 372 | #define STD_EXCEPTION_ISERIES(n, label, area) \ |
347 | .globl label##_iSeries; \ | 373 | .globl label##_iSeries; \ |
348 | label##_iSeries: \ | 374 | label##_iSeries: \ |
@@ -358,40 +384,32 @@ label##_iSeries: \ | |||
358 | HMT_MEDIUM; \ | 384 | HMT_MEDIUM; \ |
359 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | 385 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ |
360 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \ | 386 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \ |
361 | lbz r10,PACAPROCENABLED(r13); \ | 387 | lbz r10,PACASOFTIRQEN(r13); \ |
362 | cmpwi 0,r10,0; \ | 388 | cmpwi 0,r10,0; \ |
363 | beq- label##_iSeries_masked; \ | 389 | beq- label##_iSeries_masked; \ |
364 | EXCEPTION_PROLOG_ISERIES_2; \ | 390 | EXCEPTION_PROLOG_ISERIES_2; \ |
365 | b label##_common; \ | 391 | b label##_common; \ |
366 | 392 | ||
367 | #ifdef DO_SOFT_DISABLE | 393 | #ifdef CONFIG_PPC_ISERIES |
368 | #define DISABLE_INTS \ | 394 | #define DISABLE_INTS \ |
369 | BEGIN_FW_FTR_SECTION; \ | ||
370 | lbz r10,PACAPROCENABLED(r13); \ | ||
371 | li r11,0; \ | 395 | li r11,0; \ |
372 | std r10,SOFTE(r1); \ | 396 | stb r11,PACASOFTIRQEN(r13); \ |
397 | BEGIN_FW_FTR_SECTION; \ | ||
398 | stb r11,PACAHARDIRQEN(r13); \ | ||
399 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES); \ | ||
400 | BEGIN_FW_FTR_SECTION; \ | ||
373 | mfmsr r10; \ | 401 | mfmsr r10; \ |
374 | stb r11,PACAPROCENABLED(r13); \ | ||
375 | ori r10,r10,MSR_EE; \ | 402 | ori r10,r10,MSR_EE; \ |
376 | mtmsrd r10,1; \ | 403 | mtmsrd r10,1; \ |
377 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | 404 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) |
378 | 405 | ||
379 | #define ENABLE_INTS \ | 406 | #else |
380 | BEGIN_FW_FTR_SECTION; \ | 407 | #define DISABLE_INTS \ |
381 | lbz r10,PACAPROCENABLED(r13); \ | 408 | li r11,0; \ |
382 | mfmsr r11; \ | 409 | stb r11,PACASOFTIRQEN(r13); \ |
383 | std r10,SOFTE(r1); \ | 410 | stb r11,PACAHARDIRQEN(r13) |
384 | ori r11,r11,MSR_EE; \ | ||
385 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES); \ | ||
386 | BEGIN_FW_FTR_SECTION; \ | ||
387 | ld r12,_MSR(r1); \ | ||
388 | mfmsr r11; \ | ||
389 | rlwimi r11,r12,0,MSR_EE; \ | ||
390 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES); \ | ||
391 | mtmsrd r11,1 | ||
392 | 411 | ||
393 | #else /* hard enable/disable interrupts */ | 412 | #endif /* CONFIG_PPC_ISERIES */ |
394 | #define DISABLE_INTS | ||
395 | 413 | ||
396 | #define ENABLE_INTS \ | 414 | #define ENABLE_INTS \ |
397 | ld r12,_MSR(r1); \ | 415 | ld r12,_MSR(r1); \ |
@@ -399,8 +417,6 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES); \ | |||
399 | rlwimi r11,r12,0,MSR_EE; \ | 417 | rlwimi r11,r12,0,MSR_EE; \ |
400 | mtmsrd r11,1 | 418 | mtmsrd r11,1 |
401 | 419 | ||
402 | #endif | ||
403 | |||
404 | #define STD_EXCEPTION_COMMON(trap, label, hdlr) \ | 420 | #define STD_EXCEPTION_COMMON(trap, label, hdlr) \ |
405 | .align 7; \ | 421 | .align 7; \ |
406 | .globl label##_common; \ | 422 | .globl label##_common; \ |
@@ -541,11 +557,11 @@ instruction_access_slb_pSeries: | |||
541 | mfspr r12,SPRN_SRR1 /* and SRR1 */ | 557 | mfspr r12,SPRN_SRR1 /* and SRR1 */ |
542 | b .slb_miss_realmode /* Rel. branch works in real mode */ | 558 | b .slb_miss_realmode /* Rel. branch works in real mode */ |
543 | 559 | ||
544 | STD_EXCEPTION_PSERIES(0x500, hardware_interrupt) | 560 | MASKABLE_EXCEPTION_PSERIES(0x500, hardware_interrupt) |
545 | STD_EXCEPTION_PSERIES(0x600, alignment) | 561 | STD_EXCEPTION_PSERIES(0x600, alignment) |
546 | STD_EXCEPTION_PSERIES(0x700, program_check) | 562 | STD_EXCEPTION_PSERIES(0x700, program_check) |
547 | STD_EXCEPTION_PSERIES(0x800, fp_unavailable) | 563 | STD_EXCEPTION_PSERIES(0x800, fp_unavailable) |
548 | STD_EXCEPTION_PSERIES(0x900, decrementer) | 564 | MASKABLE_EXCEPTION_PSERIES(0x900, decrementer) |
549 | STD_EXCEPTION_PSERIES(0xa00, trap_0a) | 565 | STD_EXCEPTION_PSERIES(0xa00, trap_0a) |
550 | STD_EXCEPTION_PSERIES(0xb00, trap_0b) | 566 | STD_EXCEPTION_PSERIES(0xb00, trap_0b) |
551 | 567 | ||
@@ -597,7 +613,24 @@ system_call_pSeries: | |||
597 | /*** pSeries interrupt support ***/ | 613 | /*** pSeries interrupt support ***/ |
598 | 614 | ||
599 | /* moved from 0xf00 */ | 615 | /* moved from 0xf00 */ |
600 | STD_EXCEPTION_PSERIES(., performance_monitor) | 616 | MASKABLE_EXCEPTION_PSERIES(., performance_monitor) |
617 | |||
618 | /* | ||
619 | * An interrupt came in while soft-disabled; clear EE in SRR1, | ||
620 | * clear paca->hard_enabled and return. | ||
621 | */ | ||
622 | masked_interrupt: | ||
623 | stb r10,PACAHARDIRQEN(r13) | ||
624 | mtcrf 0x80,r9 | ||
625 | ld r9,PACA_EXGEN+EX_R9(r13) | ||
626 | mfspr r10,SPRN_SRR1 | ||
627 | rldicl r10,r10,48,1 /* clear MSR_EE */ | ||
628 | rotldi r10,r10,16 | ||
629 | mtspr SPRN_SRR1,r10 | ||
630 | ld r10,PACA_EXGEN+EX_R10(r13) | ||
631 | mfspr r13,SPRN_SPRG1 | ||
632 | rfid | ||
633 | b . | ||
601 | 634 | ||
602 | .align 7 | 635 | .align 7 |
603 | do_stab_bolted_pSeries: | 636 | do_stab_bolted_pSeries: |
@@ -792,7 +825,7 @@ system_reset_iSeries: | |||
792 | 825 | ||
793 | cmpwi 0,r23,0 | 826 | cmpwi 0,r23,0 |
794 | beq iSeries_secondary_smp_loop /* Loop until told to go */ | 827 | beq iSeries_secondary_smp_loop /* Loop until told to go */ |
795 | bne .__secondary_start /* Loop until told to go */ | 828 | bne __secondary_start /* Loop until told to go */ |
796 | iSeries_secondary_smp_loop: | 829 | iSeries_secondary_smp_loop: |
797 | /* Let the Hypervisor know we are alive */ | 830 | /* Let the Hypervisor know we are alive */ |
798 | /* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */ | 831 | /* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */ |
@@ -813,7 +846,6 @@ iSeries_secondary_smp_loop: | |||
813 | b 1b /* If SMP not configured, secondaries | 846 | b 1b /* If SMP not configured, secondaries |
814 | * loop forever */ | 847 | * loop forever */ |
815 | 848 | ||
816 | .globl decrementer_iSeries_masked | ||
817 | decrementer_iSeries_masked: | 849 | decrementer_iSeries_masked: |
818 | /* We may not have a valid TOC pointer in here. */ | 850 | /* We may not have a valid TOC pointer in here. */ |
819 | li r11,1 | 851 | li r11,1 |
@@ -824,7 +856,6 @@ decrementer_iSeries_masked: | |||
824 | mtspr SPRN_DEC,r12 | 856 | mtspr SPRN_DEC,r12 |
825 | /* fall through */ | 857 | /* fall through */ |
826 | 858 | ||
827 | .globl hardware_interrupt_iSeries_masked | ||
828 | hardware_interrupt_iSeries_masked: | 859 | hardware_interrupt_iSeries_masked: |
829 | mtcrf 0x80,r9 /* Restore regs */ | 860 | mtcrf 0x80,r9 /* Restore regs */ |
830 | ld r12,PACALPPACAPTR(r13) | 861 | ld r12,PACALPPACAPTR(r13) |
@@ -926,10 +957,18 @@ bad_stack: | |||
926 | * any task or sent any task a signal, you should use | 957 | * any task or sent any task a signal, you should use |
927 | * ret_from_except or ret_from_except_lite instead of this. | 958 | * ret_from_except or ret_from_except_lite instead of this. |
928 | */ | 959 | */ |
960 | fast_exc_return_irq: /* restores irq state too */ | ||
961 | ld r3,SOFTE(r1) | ||
962 | ld r12,_MSR(r1) | ||
963 | stb r3,PACASOFTIRQEN(r13) /* restore paca->soft_enabled */ | ||
964 | rldicl r4,r12,49,63 /* get MSR_EE to LSB */ | ||
965 | stb r4,PACAHARDIRQEN(r13) /* restore paca->hard_enabled */ | ||
966 | b 1f | ||
967 | |||
929 | .globl fast_exception_return | 968 | .globl fast_exception_return |
930 | fast_exception_return: | 969 | fast_exception_return: |
931 | ld r12,_MSR(r1) | 970 | ld r12,_MSR(r1) |
932 | ld r11,_NIP(r1) | 971 | 1: ld r11,_NIP(r1) |
933 | andi. r3,r12,MSR_RI /* check if RI is set */ | 972 | andi. r3,r12,MSR_RI /* check if RI is set */ |
934 | beq- unrecov_fer | 973 | beq- unrecov_fer |
935 | 974 | ||
@@ -952,7 +991,8 @@ fast_exception_return: | |||
952 | REST_8GPRS(2, r1) | 991 | REST_8GPRS(2, r1) |
953 | 992 | ||
954 | mfmsr r10 | 993 | mfmsr r10 |
955 | clrrdi r10,r10,2 /* clear RI (LE is 0 already) */ | 994 | rldicl r10,r10,48,1 /* clear EE */ |
995 | rldicr r10,r10,16,61 /* clear RI (LE is 0 already) */ | ||
956 | mtmsrd r10,1 | 996 | mtmsrd r10,1 |
957 | 997 | ||
958 | mtspr SPRN_SRR1,r12 | 998 | mtspr SPRN_SRR1,r12 |
@@ -1326,6 +1366,16 @@ BEGIN_FW_FTR_SECTION | |||
1326 | * interrupts if necessary. | 1366 | * interrupts if necessary. |
1327 | */ | 1367 | */ |
1328 | beq 13f | 1368 | beq 13f |
1369 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
1370 | #endif | ||
1371 | BEGIN_FW_FTR_SECTION | ||
1372 | /* | ||
1373 | * Here we have interrupts hard-disabled, so it is sufficient | ||
1374 | * to restore paca->{soft,hard}_enable and get out. | ||
1375 | */ | ||
1376 | beq fast_exc_return_irq /* Return from exception on success */ | ||
1377 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) | ||
1378 | |||
1329 | /* For a hash failure, we don't bother re-enabling interrupts */ | 1379 | /* For a hash failure, we don't bother re-enabling interrupts */ |
1330 | ble- 12f | 1380 | ble- 12f |
1331 | 1381 | ||
@@ -1337,14 +1387,6 @@ BEGIN_FW_FTR_SECTION | |||
1337 | ld r3,SOFTE(r1) | 1387 | ld r3,SOFTE(r1) |
1338 | bl .local_irq_restore | 1388 | bl .local_irq_restore |
1339 | b 11f | 1389 | b 11f |
1340 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
1341 | #endif | ||
1342 | BEGIN_FW_FTR_SECTION | ||
1343 | beq fast_exception_return /* Return from exception on success */ | ||
1344 | ble- 12f /* Failure return from hash_page */ | ||
1345 | |||
1346 | /* fall through */ | ||
1347 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) | ||
1348 | 1390 | ||
1349 | /* Here we have a page fault that hash_page can't handle. */ | 1391 | /* Here we have a page fault that hash_page can't handle. */ |
1350 | handle_page_fault: | 1392 | handle_page_fault: |
@@ -1362,6 +1404,8 @@ handle_page_fault: | |||
1362 | bl .bad_page_fault | 1404 | bl .bad_page_fault |
1363 | b .ret_from_except | 1405 | b .ret_from_except |
1364 | 1406 | ||
1407 | 13: b .ret_from_except_lite | ||
1408 | |||
1365 | /* We have a page fault that hash_page could handle but HV refused | 1409 | /* We have a page fault that hash_page could handle but HV refused |
1366 | * the PTE insertion | 1410 | * the PTE insertion |
1367 | */ | 1411 | */ |
@@ -1371,8 +1415,6 @@ handle_page_fault: | |||
1371 | bl .low_hash_fault | 1415 | bl .low_hash_fault |
1372 | b .ret_from_except | 1416 | b .ret_from_except |
1373 | 1417 | ||
1374 | 13: b .ret_from_except_lite | ||
1375 | |||
1376 | /* here we have a segment miss */ | 1418 | /* here we have a segment miss */ |
1377 | do_ste_alloc: | 1419 | do_ste_alloc: |
1378 | bl .ste_allocate /* try to insert stab entry */ | 1420 | bl .ste_allocate /* try to insert stab entry */ |
@@ -1560,7 +1602,7 @@ _GLOBAL(generic_secondary_smp_init) | |||
1560 | ld r1,PACAEMERGSP(r13) | 1602 | ld r1,PACAEMERGSP(r13) |
1561 | subi r1,r1,STACK_FRAME_OVERHEAD | 1603 | subi r1,r1,STACK_FRAME_OVERHEAD |
1562 | 1604 | ||
1563 | b .__secondary_start | 1605 | b __secondary_start |
1564 | #endif | 1606 | #endif |
1565 | 1607 | ||
1566 | #ifdef CONFIG_PPC_ISERIES | 1608 | #ifdef CONFIG_PPC_ISERIES |
@@ -1595,7 +1637,6 @@ _STATIC(__start_initialization_iSeries) | |||
1595 | b .start_here_common | 1637 | b .start_here_common |
1596 | #endif /* CONFIG_PPC_ISERIES */ | 1638 | #endif /* CONFIG_PPC_ISERIES */ |
1597 | 1639 | ||
1598 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
1599 | 1640 | ||
1600 | _STATIC(__mmu_off) | 1641 | _STATIC(__mmu_off) |
1601 | mfmsr r3 | 1642 | mfmsr r3 |
@@ -1621,13 +1662,11 @@ _STATIC(__mmu_off) | |||
1621 | * | 1662 | * |
1622 | */ | 1663 | */ |
1623 | _GLOBAL(__start_initialization_multiplatform) | 1664 | _GLOBAL(__start_initialization_multiplatform) |
1624 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
1625 | /* | 1665 | /* |
1626 | * Are we booted from a PROM Of-type client-interface ? | 1666 | * Are we booted from a PROM Of-type client-interface ? |
1627 | */ | 1667 | */ |
1628 | cmpldi cr0,r5,0 | 1668 | cmpldi cr0,r5,0 |
1629 | bne .__boot_from_prom /* yes -> prom */ | 1669 | bne .__boot_from_prom /* yes -> prom */ |
1630 | #endif | ||
1631 | 1670 | ||
1632 | /* Save parameters */ | 1671 | /* Save parameters */ |
1633 | mr r31,r3 | 1672 | mr r31,r3 |
@@ -1656,7 +1695,6 @@ _GLOBAL(__start_initialization_multiplatform) | |||
1656 | bl .__mmu_off | 1695 | bl .__mmu_off |
1657 | b .__after_prom_start | 1696 | b .__after_prom_start |
1658 | 1697 | ||
1659 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
1660 | _STATIC(__boot_from_prom) | 1698 | _STATIC(__boot_from_prom) |
1661 | /* Save parameters */ | 1699 | /* Save parameters */ |
1662 | mr r31,r3 | 1700 | mr r31,r3 |
@@ -1696,7 +1734,6 @@ _STATIC(__boot_from_prom) | |||
1696 | bl .prom_init | 1734 | bl .prom_init |
1697 | /* We never return */ | 1735 | /* We never return */ |
1698 | trap | 1736 | trap |
1699 | #endif | ||
1700 | 1737 | ||
1701 | /* | 1738 | /* |
1702 | * At this point, r3 contains the physical address we are running at, | 1739 | * At this point, r3 contains the physical address we are running at, |
@@ -1752,8 +1789,6 @@ _STATIC(__after_prom_start) | |||
1752 | bl .copy_and_flush /* copy the rest */ | 1789 | bl .copy_and_flush /* copy the rest */ |
1753 | b .start_here_multiplatform | 1790 | b .start_here_multiplatform |
1754 | 1791 | ||
1755 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | ||
1756 | |||
1757 | /* | 1792 | /* |
1758 | * Copy routine used to copy the kernel to start at physical address 0 | 1793 | * Copy routine used to copy the kernel to start at physical address 0 |
1759 | * and flush and invalidate the caches as needed. | 1794 | * and flush and invalidate the caches as needed. |
@@ -1836,7 +1871,7 @@ _GLOBAL(pmac_secondary_start) | |||
1836 | ld r1,PACAEMERGSP(r13) | 1871 | ld r1,PACAEMERGSP(r13) |
1837 | subi r1,r1,STACK_FRAME_OVERHEAD | 1872 | subi r1,r1,STACK_FRAME_OVERHEAD |
1838 | 1873 | ||
1839 | b .__secondary_start | 1874 | b __secondary_start |
1840 | 1875 | ||
1841 | #endif /* CONFIG_PPC_PMAC */ | 1876 | #endif /* CONFIG_PPC_PMAC */ |
1842 | 1877 | ||
@@ -1853,7 +1888,7 @@ _GLOBAL(pmac_secondary_start) | |||
1853 | * r13 = paca virtual address | 1888 | * r13 = paca virtual address |
1854 | * SPRG3 = paca virtual address | 1889 | * SPRG3 = paca virtual address |
1855 | */ | 1890 | */ |
1856 | _GLOBAL(__secondary_start) | 1891 | __secondary_start: |
1857 | /* Set thread priority to MEDIUM */ | 1892 | /* Set thread priority to MEDIUM */ |
1858 | HMT_MEDIUM | 1893 | HMT_MEDIUM |
1859 | 1894 | ||
@@ -1877,11 +1912,16 @@ _GLOBAL(__secondary_start) | |||
1877 | /* enable MMU and jump to start_secondary */ | 1912 | /* enable MMU and jump to start_secondary */ |
1878 | LOAD_REG_ADDR(r3, .start_secondary_prolog) | 1913 | LOAD_REG_ADDR(r3, .start_secondary_prolog) |
1879 | LOAD_REG_IMMEDIATE(r4, MSR_KERNEL) | 1914 | LOAD_REG_IMMEDIATE(r4, MSR_KERNEL) |
1880 | #ifdef DO_SOFT_DISABLE | 1915 | #ifdef CONFIG_PPC_ISERIES |
1881 | BEGIN_FW_FTR_SECTION | 1916 | BEGIN_FW_FTR_SECTION |
1882 | ori r4,r4,MSR_EE | 1917 | ori r4,r4,MSR_EE |
1883 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | 1918 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) |
1884 | #endif | 1919 | #endif |
1920 | BEGIN_FW_FTR_SECTION | ||
1921 | stb r7,PACASOFTIRQEN(r13) | ||
1922 | stb r7,PACAHARDIRQEN(r13) | ||
1923 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) | ||
1924 | |||
1885 | mtspr SPRN_SRR0,r3 | 1925 | mtspr SPRN_SRR0,r3 |
1886 | mtspr SPRN_SRR1,r4 | 1926 | mtspr SPRN_SRR1,r4 |
1887 | rfid | 1927 | rfid |
@@ -1913,7 +1953,6 @@ _GLOBAL(enable_64b_mode) | |||
1913 | isync | 1953 | isync |
1914 | blr | 1954 | blr |
1915 | 1955 | ||
1916 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
1917 | /* | 1956 | /* |
1918 | * This is where the main kernel code starts. | 1957 | * This is where the main kernel code starts. |
1919 | */ | 1958 | */ |
@@ -1977,7 +2016,6 @@ _STATIC(start_here_multiplatform) | |||
1977 | mtspr SPRN_SRR1,r4 | 2016 | mtspr SPRN_SRR1,r4 |
1978 | rfid | 2017 | rfid |
1979 | b . /* prevent speculative execution */ | 2018 | b . /* prevent speculative execution */ |
1980 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | ||
1981 | 2019 | ||
1982 | /* This is where all platforms converge execution */ | 2020 | /* This is where all platforms converge execution */ |
1983 | _STATIC(start_here_common) | 2021 | _STATIC(start_here_common) |
@@ -2005,15 +2043,18 @@ _STATIC(start_here_common) | |||
2005 | 2043 | ||
2006 | /* Load up the kernel context */ | 2044 | /* Load up the kernel context */ |
2007 | 5: | 2045 | 5: |
2008 | #ifdef DO_SOFT_DISABLE | ||
2009 | BEGIN_FW_FTR_SECTION | ||
2010 | li r5,0 | 2046 | li r5,0 |
2011 | stb r5,PACAPROCENABLED(r13) /* Soft Disabled */ | 2047 | stb r5,PACASOFTIRQEN(r13) /* Soft Disabled */ |
2048 | #ifdef CONFIG_PPC_ISERIES | ||
2049 | BEGIN_FW_FTR_SECTION | ||
2012 | mfmsr r5 | 2050 | mfmsr r5 |
2013 | ori r5,r5,MSR_EE /* Hard Enabled */ | 2051 | ori r5,r5,MSR_EE /* Hard Enabled */ |
2014 | mtmsrd r5 | 2052 | mtmsrd r5 |
2015 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | 2053 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) |
2016 | #endif | 2054 | #endif |
2055 | BEGIN_FW_FTR_SECTION | ||
2056 | stb r5,PACAHARDIRQEN(r13) | ||
2057 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) | ||
2017 | 2058 | ||
2018 | bl .start_kernel | 2059 | bl .start_kernel |
2019 | 2060 | ||