aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/kernel')
-rw-r--r--arch/ppc64/kernel/pacaData.c211
1 files changed, 65 insertions, 146 deletions
diff --git a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c
index ebfb517019ef..6316188737b6 100644
--- a/arch/ppc64/kernel/pacaData.c
+++ b/arch/ppc64/kernel/pacaData.c
@@ -42,20 +42,7 @@ extern unsigned long __toc_start;
42 * processors. The processor VPD array needs one entry per physical 42 * processors. The processor VPD array needs one entry per physical
43 * processor (not thread). 43 * processor (not thread).
44 */ 44 */
45#ifdef CONFIG_PPC_ISERIES 45#define PACA_INIT_COMMON(number, start, asrr, asrv) \
46#define EXTRA_INITS(number, lpq) \
47 .lppaca_ptr = &paca[number].lppaca, \
48 .reg_save_ptr = &paca[number].reg_save, \
49 .reg_save = { \
50 .xDesc = 0xd397d9e2, /* "LpRS" */ \
51 .xSize = sizeof(struct ItLpRegSave) \
52 },
53#else
54#define EXTRA_INITS(number, lpq)
55#endif
56
57#define PACAINITDATA(number,start,lpq,asrr,asrv) \
58{ \
59 .lock_token = 0x8000, \ 46 .lock_token = 0x8000, \
60 .paca_index = (number), /* Paca Index */ \ 47 .paca_index = (number), /* Paca Index */ \
61 .default_decr = 0x00ff0000, /* Initial Decr */ \ 48 .default_decr = 0x00ff0000, /* Initial Decr */ \
@@ -73,147 +60,79 @@ extern unsigned long __toc_start;
73 .end_of_quantum = 0xfffffffffffffffful, \ 60 .end_of_quantum = 0xfffffffffffffffful, \
74 .slb_count = 64, \ 61 .slb_count = 64, \
75 }, \ 62 }, \
76 EXTRA_INITS((number), (lpq)) \
77}
78 63
79struct paca_struct paca[] = {
80#ifdef CONFIG_PPC_ISERIES 64#ifdef CONFIG_PPC_ISERIES
81 PACAINITDATA( 0, 1, &xItLpQueue, 0, STAB0_VIRT_ADDR), 65#define PACA_INIT_ISERIES(number) \
66 .lppaca_ptr = &paca[number].lppaca, \
67 .reg_save_ptr = &paca[number].reg_save, \
68 .reg_save = { \
69 .xDesc = 0xd397d9e2, /* "LpRS" */ \
70 .xSize = sizeof(struct ItLpRegSave) \
71 }
72
73#define PACA_INIT(number) \
74{ \
75 PACA_INIT_COMMON(number, 0, 0, 0) \
76 PACA_INIT_ISERIES(number) \
77}
78
79#define BOOTCPU_PACA_INIT(number) \
80{ \
81 PACA_INIT_COMMON(number, 1, 0, STAB0_VIRT_ADDR) \
82 PACA_INIT_ISERIES(number) \
83}
84
82#else 85#else
83 PACAINITDATA( 0, 1, NULL, STAB0_PHYS_ADDR, STAB0_VIRT_ADDR), 86#define PACA_INIT(number) \
87{ \
88 PACA_INIT_COMMON(number, 0, 0, 0) \
89}
90
91#define BOOTCPU_PACA_INIT(number) \
92{ \
93 PACA_INIT_COMMON(number, 1, STAB0_PHYS_ADDR, STAB0_VIRT_ADDR) \
94}
84#endif 95#endif
96
97struct paca_struct paca[] = {
98 BOOTCPU_PACA_INIT(0),
85#if NR_CPUS > 1 99#if NR_CPUS > 1
86 PACAINITDATA( 1, 0, NULL, 0, 0), 100 PACA_INIT( 1), PACA_INIT( 2), PACA_INIT( 3),
87 PACAINITDATA( 2, 0, NULL, 0, 0),
88 PACAINITDATA( 3, 0, NULL, 0, 0),
89#if NR_CPUS > 4 101#if NR_CPUS > 4
90 PACAINITDATA( 4, 0, NULL, 0, 0), 102 PACA_INIT( 4), PACA_INIT( 5), PACA_INIT( 6), PACA_INIT( 7),
91 PACAINITDATA( 5, 0, NULL, 0, 0),
92 PACAINITDATA( 6, 0, NULL, 0, 0),
93 PACAINITDATA( 7, 0, NULL, 0, 0),
94#if NR_CPUS > 8 103#if NR_CPUS > 8
95 PACAINITDATA( 8, 0, NULL, 0, 0), 104 PACA_INIT( 8), PACA_INIT( 9), PACA_INIT( 10), PACA_INIT( 11),
96 PACAINITDATA( 9, 0, NULL, 0, 0), 105 PACA_INIT( 12), PACA_INIT( 13), PACA_INIT( 14), PACA_INIT( 15),
97 PACAINITDATA(10, 0, NULL, 0, 0), 106 PACA_INIT( 16), PACA_INIT( 17), PACA_INIT( 18), PACA_INIT( 19),
98 PACAINITDATA(11, 0, NULL, 0, 0), 107 PACA_INIT( 20), PACA_INIT( 21), PACA_INIT( 22), PACA_INIT( 23),
99 PACAINITDATA(12, 0, NULL, 0, 0), 108 PACA_INIT( 24), PACA_INIT( 25), PACA_INIT( 26), PACA_INIT( 27),
100 PACAINITDATA(13, 0, NULL, 0, 0), 109 PACA_INIT( 28), PACA_INIT( 29), PACA_INIT( 30), PACA_INIT( 31),
101 PACAINITDATA(14, 0, NULL, 0, 0),
102 PACAINITDATA(15, 0, NULL, 0, 0),
103 PACAINITDATA(16, 0, NULL, 0, 0),
104 PACAINITDATA(17, 0, NULL, 0, 0),
105 PACAINITDATA(18, 0, NULL, 0, 0),
106 PACAINITDATA(19, 0, NULL, 0, 0),
107 PACAINITDATA(20, 0, NULL, 0, 0),
108 PACAINITDATA(21, 0, NULL, 0, 0),
109 PACAINITDATA(22, 0, NULL, 0, 0),
110 PACAINITDATA(23, 0, NULL, 0, 0),
111 PACAINITDATA(24, 0, NULL, 0, 0),
112 PACAINITDATA(25, 0, NULL, 0, 0),
113 PACAINITDATA(26, 0, NULL, 0, 0),
114 PACAINITDATA(27, 0, NULL, 0, 0),
115 PACAINITDATA(28, 0, NULL, 0, 0),
116 PACAINITDATA(29, 0, NULL, 0, 0),
117 PACAINITDATA(30, 0, NULL, 0, 0),
118 PACAINITDATA(31, 0, NULL, 0, 0),
119#if NR_CPUS > 32 110#if NR_CPUS > 32
120 PACAINITDATA(32, 0, NULL, 0, 0), 111 PACA_INIT( 32), PACA_INIT( 33), PACA_INIT( 34), PACA_INIT( 35),
121 PACAINITDATA(33, 0, NULL, 0, 0), 112 PACA_INIT( 36), PACA_INIT( 37), PACA_INIT( 38), PACA_INIT( 39),
122 PACAINITDATA(34, 0, NULL, 0, 0), 113 PACA_INIT( 40), PACA_INIT( 41), PACA_INIT( 42), PACA_INIT( 43),
123 PACAINITDATA(35, 0, NULL, 0, 0), 114 PACA_INIT( 44), PACA_INIT( 45), PACA_INIT( 46), PACA_INIT( 47),
124 PACAINITDATA(36, 0, NULL, 0, 0), 115 PACA_INIT( 48), PACA_INIT( 49), PACA_INIT( 50), PACA_INIT( 51),
125 PACAINITDATA(37, 0, NULL, 0, 0), 116 PACA_INIT( 52), PACA_INIT( 53), PACA_INIT( 54), PACA_INIT( 55),
126 PACAINITDATA(38, 0, NULL, 0, 0), 117 PACA_INIT( 56), PACA_INIT( 57), PACA_INIT( 58), PACA_INIT( 59),
127 PACAINITDATA(39, 0, NULL, 0, 0), 118 PACA_INIT( 60), PACA_INIT( 61), PACA_INIT( 62), PACA_INIT( 63),
128 PACAINITDATA(40, 0, NULL, 0, 0),
129 PACAINITDATA(41, 0, NULL, 0, 0),
130 PACAINITDATA(42, 0, NULL, 0, 0),
131 PACAINITDATA(43, 0, NULL, 0, 0),
132 PACAINITDATA(44, 0, NULL, 0, 0),
133 PACAINITDATA(45, 0, NULL, 0, 0),
134 PACAINITDATA(46, 0, NULL, 0, 0),
135 PACAINITDATA(47, 0, NULL, 0, 0),
136 PACAINITDATA(48, 0, NULL, 0, 0),
137 PACAINITDATA(49, 0, NULL, 0, 0),
138 PACAINITDATA(50, 0, NULL, 0, 0),
139 PACAINITDATA(51, 0, NULL, 0, 0),
140 PACAINITDATA(52, 0, NULL, 0, 0),
141 PACAINITDATA(53, 0, NULL, 0, 0),
142 PACAINITDATA(54, 0, NULL, 0, 0),
143 PACAINITDATA(55, 0, NULL, 0, 0),
144 PACAINITDATA(56, 0, NULL, 0, 0),
145 PACAINITDATA(57, 0, NULL, 0, 0),
146 PACAINITDATA(58, 0, NULL, 0, 0),
147 PACAINITDATA(59, 0, NULL, 0, 0),
148 PACAINITDATA(60, 0, NULL, 0, 0),
149 PACAINITDATA(61, 0, NULL, 0, 0),
150 PACAINITDATA(62, 0, NULL, 0, 0),
151 PACAINITDATA(63, 0, NULL, 0, 0),
152#if NR_CPUS > 64 119#if NR_CPUS > 64
153 PACAINITDATA(64, 0, NULL, 0, 0), 120 PACA_INIT( 64), PACA_INIT( 65), PACA_INIT( 66), PACA_INIT( 67),
154 PACAINITDATA(65, 0, NULL, 0, 0), 121 PACA_INIT( 68), PACA_INIT( 69), PACA_INIT( 70), PACA_INIT( 71),
155 PACAINITDATA(66, 0, NULL, 0, 0), 122 PACA_INIT( 72), PACA_INIT( 73), PACA_INIT( 74), PACA_INIT( 75),
156 PACAINITDATA(67, 0, NULL, 0, 0), 123 PACA_INIT( 76), PACA_INIT( 77), PACA_INIT( 78), PACA_INIT( 79),
157 PACAINITDATA(68, 0, NULL, 0, 0), 124 PACA_INIT( 80), PACA_INIT( 81), PACA_INIT( 82), PACA_INIT( 83),
158 PACAINITDATA(69, 0, NULL, 0, 0), 125 PACA_INIT( 84), PACA_INIT( 85), PACA_INIT( 86), PACA_INIT( 87),
159 PACAINITDATA(70, 0, NULL, 0, 0), 126 PACA_INIT( 88), PACA_INIT( 89), PACA_INIT( 90), PACA_INIT( 91),
160 PACAINITDATA(71, 0, NULL, 0, 0), 127 PACA_INIT( 92), PACA_INIT( 93), PACA_INIT( 94), PACA_INIT( 95),
161 PACAINITDATA(72, 0, NULL, 0, 0), 128 PACA_INIT( 96), PACA_INIT( 97), PACA_INIT( 98), PACA_INIT( 99),
162 PACAINITDATA(73, 0, NULL, 0, 0), 129 PACA_INIT(100), PACA_INIT(101), PACA_INIT(102), PACA_INIT(103),
163 PACAINITDATA(74, 0, NULL, 0, 0), 130 PACA_INIT(104), PACA_INIT(105), PACA_INIT(106), PACA_INIT(107),
164 PACAINITDATA(75, 0, NULL, 0, 0), 131 PACA_INIT(108), PACA_INIT(109), PACA_INIT(110), PACA_INIT(111),
165 PACAINITDATA(76, 0, NULL, 0, 0), 132 PACA_INIT(112), PACA_INIT(113), PACA_INIT(114), PACA_INIT(115),
166 PACAINITDATA(77, 0, NULL, 0, 0), 133 PACA_INIT(116), PACA_INIT(117), PACA_INIT(118), PACA_INIT(119),
167 PACAINITDATA(78, 0, NULL, 0, 0), 134 PACA_INIT(120), PACA_INIT(121), PACA_INIT(122), PACA_INIT(123),
168 PACAINITDATA(79, 0, NULL, 0, 0), 135 PACA_INIT(124), PACA_INIT(125), PACA_INIT(126), PACA_INIT(127),
169 PACAINITDATA(80, 0, NULL, 0, 0),
170 PACAINITDATA(81, 0, NULL, 0, 0),
171 PACAINITDATA(82, 0, NULL, 0, 0),
172 PACAINITDATA(83, 0, NULL, 0, 0),
173 PACAINITDATA(84, 0, NULL, 0, 0),
174 PACAINITDATA(85, 0, NULL, 0, 0),
175 PACAINITDATA(86, 0, NULL, 0, 0),
176 PACAINITDATA(87, 0, NULL, 0, 0),
177 PACAINITDATA(88, 0, NULL, 0, 0),
178 PACAINITDATA(89, 0, NULL, 0, 0),
179 PACAINITDATA(90, 0, NULL, 0, 0),
180 PACAINITDATA(91, 0, NULL, 0, 0),
181 PACAINITDATA(92, 0, NULL, 0, 0),
182 PACAINITDATA(93, 0, NULL, 0, 0),
183 PACAINITDATA(94, 0, NULL, 0, 0),
184 PACAINITDATA(95, 0, NULL, 0, 0),
185 PACAINITDATA(96, 0, NULL, 0, 0),
186 PACAINITDATA(97, 0, NULL, 0, 0),
187 PACAINITDATA(98, 0, NULL, 0, 0),
188 PACAINITDATA(99, 0, NULL, 0, 0),
189 PACAINITDATA(100, 0, NULL, 0, 0),
190 PACAINITDATA(101, 0, NULL, 0, 0),
191 PACAINITDATA(102, 0, NULL, 0, 0),
192 PACAINITDATA(103, 0, NULL, 0, 0),
193 PACAINITDATA(104, 0, NULL, 0, 0),
194 PACAINITDATA(105, 0, NULL, 0, 0),
195 PACAINITDATA(106, 0, NULL, 0, 0),
196 PACAINITDATA(107, 0, NULL, 0, 0),
197 PACAINITDATA(108, 0, NULL, 0, 0),
198 PACAINITDATA(109, 0, NULL, 0, 0),
199 PACAINITDATA(110, 0, NULL, 0, 0),
200 PACAINITDATA(111, 0, NULL, 0, 0),
201 PACAINITDATA(112, 0, NULL, 0, 0),
202 PACAINITDATA(113, 0, NULL, 0, 0),
203 PACAINITDATA(114, 0, NULL, 0, 0),
204 PACAINITDATA(115, 0, NULL, 0, 0),
205 PACAINITDATA(116, 0, NULL, 0, 0),
206 PACAINITDATA(117, 0, NULL, 0, 0),
207 PACAINITDATA(118, 0, NULL, 0, 0),
208 PACAINITDATA(119, 0, NULL, 0, 0),
209 PACAINITDATA(120, 0, NULL, 0, 0),
210 PACAINITDATA(121, 0, NULL, 0, 0),
211 PACAINITDATA(122, 0, NULL, 0, 0),
212 PACAINITDATA(123, 0, NULL, 0, 0),
213 PACAINITDATA(124, 0, NULL, 0, 0),
214 PACAINITDATA(125, 0, NULL, 0, 0),
215 PACAINITDATA(126, 0, NULL, 0, 0),
216 PACAINITDATA(127, 0, NULL, 0, 0),
217#endif 136#endif
218#endif 137#endif
219#endif 138#endif