diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2006-01-12 18:26:42 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-13 05:17:39 -0500 |
commit | 3356bb9f7ba378a6e2709f9df95f4ea52111f4df (patch) | |
tree | 84f370df6e58cec63132f9acce492d585226e671 /arch/powerpc/kernel/head_64.S | |
parent | e58c3495e6007af59382540bb21ee941e470d88d (diff) |
[PATCH] powerpc: Remove lppaca structure from the PACA
At present the lppaca - the structure shared with the iSeries
hypervisor and phyp - is contained within the PACA, our own low-level
per-cpu structure. This doesn't have to be so, the patch below
removes it, making a separate array of lppaca structures.
This saves approximately 500*NR_CPUS bytes of image size and kernel
memory, because we don't need aligning gap between the Linux and
hypervisor portions of every PACA. On the other hand it means an
extra level of dereference in many accesses to the lppaca.
The patch also gets rid of several places where we assign the paca
address to a local variable for no particular reason.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index b3718f3eb7b5..308268466342 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -255,8 +255,9 @@ exception_marker: | |||
255 | 255 | ||
256 | #define EXCEPTION_PROLOG_ISERIES_2 \ | 256 | #define EXCEPTION_PROLOG_ISERIES_2 \ |
257 | mfmsr r10; \ | 257 | mfmsr r10; \ |
258 | ld r11,PACALPPACA+LPPACASRR0(r13); \ | 258 | ld r12,PACALPPACAPTR(r13); \ |
259 | ld r12,PACALPPACA+LPPACASRR1(r13); \ | 259 | ld r11,LPPACASRR0(r12); \ |
260 | ld r12,LPPACASRR1(r12); \ | ||
260 | ori r10,r10,MSR_RI; \ | 261 | ori r10,r10,MSR_RI; \ |
261 | mtmsrd r10,1 | 262 | mtmsrd r10,1 |
262 | 263 | ||
@@ -635,7 +636,8 @@ data_access_slb_iSeries: | |||
635 | std r12,PACA_EXSLB+EX_R12(r13) | 636 | std r12,PACA_EXSLB+EX_R12(r13) |
636 | mfspr r10,SPRN_SPRG1 | 637 | mfspr r10,SPRN_SPRG1 |
637 | std r10,PACA_EXSLB+EX_R13(r13) | 638 | std r10,PACA_EXSLB+EX_R13(r13) |
638 | ld r12,PACALPPACA+LPPACASRR1(r13); | 639 | ld r12,PACALPPACAPTR(r13) |
640 | ld r12,LPPACASRR1(r12) | ||
639 | b .slb_miss_realmode | 641 | b .slb_miss_realmode |
640 | 642 | ||
641 | STD_EXCEPTION_ISERIES(0x400, instruction_access, PACA_EXGEN) | 643 | STD_EXCEPTION_ISERIES(0x400, instruction_access, PACA_EXGEN) |
@@ -645,7 +647,8 @@ instruction_access_slb_iSeries: | |||
645 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 647 | mtspr SPRN_SPRG1,r13 /* save r13 */ |
646 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | 648 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ |
647 | std r3,PACA_EXSLB+EX_R3(r13) | 649 | std r3,PACA_EXSLB+EX_R3(r13) |
648 | ld r3,PACALPPACA+LPPACASRR0(r13) /* get SRR0 value */ | 650 | ld r3,PACALPPACAPTR(r13) |
651 | ld r3,LPPACASRR0(r3) /* get SRR0 value */ | ||
649 | std r9,PACA_EXSLB+EX_R9(r13) | 652 | std r9,PACA_EXSLB+EX_R9(r13) |
650 | mfcr r9 | 653 | mfcr r9 |
651 | #ifdef __DISABLED__ | 654 | #ifdef __DISABLED__ |
@@ -657,7 +660,8 @@ instruction_access_slb_iSeries: | |||
657 | std r12,PACA_EXSLB+EX_R12(r13) | 660 | std r12,PACA_EXSLB+EX_R12(r13) |
658 | mfspr r10,SPRN_SPRG1 | 661 | mfspr r10,SPRN_SPRG1 |
659 | std r10,PACA_EXSLB+EX_R13(r13) | 662 | std r10,PACA_EXSLB+EX_R13(r13) |
660 | ld r12,PACALPPACA+LPPACASRR1(r13); | 663 | ld r12,PACALPPACAPTR(r13) |
664 | ld r12,LPPACASRR1(r12) | ||
661 | b .slb_miss_realmode | 665 | b .slb_miss_realmode |
662 | 666 | ||
663 | #ifdef __DISABLED__ | 667 | #ifdef __DISABLED__ |
@@ -746,7 +750,8 @@ iSeries_secondary_smp_loop: | |||
746 | .globl decrementer_iSeries_masked | 750 | .globl decrementer_iSeries_masked |
747 | decrementer_iSeries_masked: | 751 | decrementer_iSeries_masked: |
748 | li r11,1 | 752 | li r11,1 |
749 | stb r11,PACALPPACA+LPPACADECRINT(r13) | 753 | ld r12,PACALPPACAPTR(r13) |
754 | stb r11,LPPACADECRINT(r12) | ||
750 | LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy) | 755 | LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy) |
751 | lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12) | 756 | lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12) |
752 | mtspr SPRN_DEC,r12 | 757 | mtspr SPRN_DEC,r12 |
@@ -755,8 +760,9 @@ decrementer_iSeries_masked: | |||
755 | .globl hardware_interrupt_iSeries_masked | 760 | .globl hardware_interrupt_iSeries_masked |
756 | hardware_interrupt_iSeries_masked: | 761 | hardware_interrupt_iSeries_masked: |
757 | mtcrf 0x80,r9 /* Restore regs */ | 762 | mtcrf 0x80,r9 /* Restore regs */ |
758 | ld r11,PACALPPACA+LPPACASRR0(r13) | 763 | ld r12,PACALPPACAPTR(r13) |
759 | ld r12,PACALPPACA+LPPACASRR1(r13) | 764 | ld r11,LPPACASRR0(r12) |
765 | ld r12,LPPACASRR1(r12) | ||
760 | mtspr SPRN_SRR0,r11 | 766 | mtspr SPRN_SRR0,r11 |
761 | mtspr SPRN_SRR1,r12 | 767 | mtspr SPRN_SRR1,r12 |
762 | ld r9,PACA_EXGEN+EX_R9(r13) | 768 | ld r9,PACA_EXGEN+EX_R9(r13) |
@@ -995,7 +1001,8 @@ _GLOBAL(slb_miss_realmode) | |||
995 | ld r3,PACA_EXSLB+EX_R3(r13) | 1001 | ld r3,PACA_EXSLB+EX_R3(r13) |
996 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ | 1002 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ |
997 | #ifdef CONFIG_PPC_ISERIES | 1003 | #ifdef CONFIG_PPC_ISERIES |
998 | ld r11,PACALPPACA+LPPACASRR0(r13) /* get SRR0 value */ | 1004 | ld r11,PACALPPACAPTR(r13) |
1005 | ld r11,LPPACASRR0(r11) /* get SRR0 value */ | ||
999 | #endif /* CONFIG_PPC_ISERIES */ | 1006 | #endif /* CONFIG_PPC_ISERIES */ |
1000 | 1007 | ||
1001 | mtlr r10 | 1008 | mtlr r10 |