aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/paca.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/paca.c')
-rw-r--r--arch/powerpc/kernel/paca.c33
1 files changed, 8 insertions, 25 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 55f1a25085cd..867b22d17385 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -15,7 +15,6 @@
15#include <asm/ptrace.h> 15#include <asm/ptrace.h>
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/lppaca.h> 17#include <asm/lppaca.h>
18#include <asm/iseries/it_lp_reg_save.h>
19#include <asm/paca.h> 18#include <asm/paca.h>
20#include <asm/mmu.h> 19#include <asm/mmu.h>
21 20
@@ -25,13 +24,13 @@
25extern unsigned long __toc_start; 24extern unsigned long __toc_start;
26 25
27/* 26/*
28 * iSeries structure which the hypervisor knows about - this structure 27 * The structure which the hypervisor knows about - this structure
29 * should not cross a page boundary. The vpa_init/register_vpa call 28 * should not cross a page boundary. The vpa_init/register_vpa call
30 * is now known to fail if the lppaca structure crosses a page 29 * is now known to fail if the lppaca structure crosses a page
31 * boundary. The lppaca is also used on POWER5 pSeries boxes. The 30 * boundary. The lppaca is also used on legacy iSeries and POWER5
32 * lppaca is 640 bytes long, and cannot readily change since the 31 * pSeries boxes. The lppaca is 640 bytes long, and cannot readily
33 * hypervisor knows its layout, so a 1kB alignment will suffice to 32 * change since the hypervisor knows its layout, so a 1kB alignment
34 * ensure that it doesn't cross a page boundary. 33 * will suffice to ensure that it doesn't cross a page boundary.
35 */ 34 */
36struct lppaca lppaca[] = { 35struct lppaca lppaca[] = {
37 [0 ... (NR_CPUS-1)] = { 36 [0 ... (NR_CPUS-1)] = {
@@ -66,32 +65,16 @@ struct slb_shadow slb_shadow[] __cacheline_aligned = {
66 * processors. The processor VPD array needs one entry per physical 65 * processors. The processor VPD array needs one entry per physical
67 * processor (not thread). 66 * processor (not thread).
68 */ 67 */
69#define PACA_INIT_COMMON(number) \ 68#define PACA_INIT(number) \
69{ \
70 .lppaca_ptr = &lppaca[number], \ 70 .lppaca_ptr = &lppaca[number], \
71 .lock_token = 0x8000, \ 71 .lock_token = 0x8000, \
72 .paca_index = (number), /* Paca Index */ \ 72 .paca_index = (number), /* Paca Index */ \
73 .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ 73 .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \
74 .hw_cpu_id = 0xffff, \ 74 .hw_cpu_id = 0xffff, \
75 .slb_shadow_ptr = &slb_shadow[number], 75 .slb_shadow_ptr = &slb_shadow[number], \
76
77#ifdef CONFIG_PPC_ISERIES
78#define PACA_INIT_ISERIES(number) \
79 .reg_save_ptr = &iseries_reg_save[number],
80
81#define PACA_INIT(number) \
82{ \
83 PACA_INIT_COMMON(number) \
84 PACA_INIT_ISERIES(number) \
85} 76}
86 77
87#else
88#define PACA_INIT(number) \
89{ \
90 PACA_INIT_COMMON(number) \
91}
92
93#endif
94
95struct paca_struct paca[] = { 78struct paca_struct paca[] = {
96 PACA_INIT(0), 79 PACA_INIT(0),
97#if NR_CPUS > 1 80#if NR_CPUS > 1