diff options
Diffstat (limited to 'arch/powerpc/kernel/paca.c')
-rw-r--r-- | arch/powerpc/kernel/paca.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index c744b327bcab..e9962c7f8a09 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * field correctly */ | 18 | * field correctly */ |
19 | extern unsigned long __toc_start; | 19 | extern unsigned long __toc_start; |
20 | 20 | ||
21 | #ifdef CONFIG_PPC_BOOK3S | ||
22 | |||
21 | /* | 23 | /* |
22 | * The structure which the hypervisor knows about - this structure | 24 | * The structure which the hypervisor knows about - this structure |
23 | * should not cross a page boundary. The vpa_init/register_vpa call | 25 | * should not cross a page boundary. The vpa_init/register_vpa call |
@@ -41,6 +43,10 @@ struct lppaca lppaca[] = { | |||
41 | }, | 43 | }, |
42 | }; | 44 | }; |
43 | 45 | ||
46 | #endif /* CONFIG_PPC_BOOK3S */ | ||
47 | |||
48 | #ifdef CONFIG_PPC_STD_MMU_64 | ||
49 | |||
44 | /* | 50 | /* |
45 | * 3 persistent SLBs are registered here. The buffer will be zero | 51 | * 3 persistent SLBs are registered here. The buffer will be zero |
46 | * initially, hence will all be invaild until we actually write them. | 52 | * initially, hence will all be invaild until we actually write them. |
@@ -52,6 +58,8 @@ struct slb_shadow slb_shadow[] __cacheline_aligned = { | |||
52 | }, | 58 | }, |
53 | }; | 59 | }; |
54 | 60 | ||
61 | #endif /* CONFIG_PPC_STD_MMU_64 */ | ||
62 | |||
55 | /* The Paca is an array with one entry per processor. Each contains an | 63 | /* The Paca is an array with one entry per processor. Each contains an |
56 | * lppaca, which contains the information shared between the | 64 | * lppaca, which contains the information shared between the |
57 | * hypervisor and Linux. | 65 | * hypervisor and Linux. |
@@ -77,15 +85,19 @@ void __init initialise_pacas(void) | |||
77 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 85 | for (cpu = 0; cpu < NR_CPUS; cpu++) { |
78 | struct paca_struct *new_paca = &paca[cpu]; | 86 | struct paca_struct *new_paca = &paca[cpu]; |
79 | 87 | ||
88 | #ifdef CONFIG_PPC_BOOK3S | ||
80 | new_paca->lppaca_ptr = &lppaca[cpu]; | 89 | new_paca->lppaca_ptr = &lppaca[cpu]; |
90 | #endif | ||
81 | new_paca->lock_token = 0x8000; | 91 | new_paca->lock_token = 0x8000; |
82 | new_paca->paca_index = cpu; | 92 | new_paca->paca_index = cpu; |
83 | new_paca->kernel_toc = kernel_toc; | 93 | new_paca->kernel_toc = kernel_toc; |
84 | new_paca->kernelbase = (unsigned long) _stext; | 94 | new_paca->kernelbase = (unsigned long) _stext; |
85 | new_paca->kernel_msr = MSR_KERNEL; | 95 | new_paca->kernel_msr = MSR_KERNEL; |
86 | new_paca->hw_cpu_id = 0xffff; | 96 | new_paca->hw_cpu_id = 0xffff; |
87 | new_paca->slb_shadow_ptr = &slb_shadow[cpu]; | ||
88 | new_paca->__current = &init_task; | 97 | new_paca->__current = &init_task; |
98 | #ifdef CONFIG_PPC_STD_MMU_64 | ||
99 | new_paca->slb_shadow_ptr = &slb_shadow[cpu]; | ||
100 | #endif /* CONFIG_PPC_STD_MMU_64 */ | ||
89 | 101 | ||
90 | } | 102 | } |
91 | } | 103 | } |