diff options
Diffstat (limited to 'arch/ppc64/kernel/pSeries_lpar.c')
-rw-r--r-- | arch/ppc64/kernel/pSeries_lpar.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c index 74dd144dcce8..a6de83f2078f 100644 --- a/arch/ppc64/kernel/pSeries_lpar.c +++ b/arch/ppc64/kernel/pSeries_lpar.c | |||
@@ -52,7 +52,6 @@ EXPORT_SYMBOL(plpar_hcall_4out); | |||
52 | EXPORT_SYMBOL(plpar_hcall_norets); | 52 | EXPORT_SYMBOL(plpar_hcall_norets); |
53 | EXPORT_SYMBOL(plpar_hcall_8arg_2ret); | 53 | EXPORT_SYMBOL(plpar_hcall_8arg_2ret); |
54 | 54 | ||
55 | extern void fw_feature_init(void); | ||
56 | extern void pSeries_find_serial_port(void); | 55 | extern void pSeries_find_serial_port(void); |
57 | 56 | ||
58 | 57 | ||
@@ -193,9 +192,9 @@ static unsigned char udbg_getcLP(void) | |||
193 | void udbg_init_debug_lpar(void) | 192 | void udbg_init_debug_lpar(void) |
194 | { | 193 | { |
195 | vtermno = 0; | 194 | vtermno = 0; |
196 | ppc_md.udbg_putc = udbg_putcLP; | 195 | udbg_putc = udbg_putcLP; |
197 | ppc_md.udbg_getc = udbg_getcLP; | 196 | udbg_getc = udbg_getcLP; |
198 | ppc_md.udbg_getc_poll = udbg_getc_pollLP; | 197 | udbg_getc_poll = udbg_getc_pollLP; |
199 | } | 198 | } |
200 | 199 | ||
201 | /* returns 0 if couldn't find or use /chosen/stdout as console */ | 200 | /* returns 0 if couldn't find or use /chosen/stdout as console */ |
@@ -228,18 +227,18 @@ int find_udbg_vterm(void) | |||
228 | termno = (u32 *)get_property(stdout_node, "reg", NULL); | 227 | termno = (u32 *)get_property(stdout_node, "reg", NULL); |
229 | if (termno) { | 228 | if (termno) { |
230 | vtermno = termno[0]; | 229 | vtermno = termno[0]; |
231 | ppc_md.udbg_putc = udbg_putcLP; | 230 | udbg_putc = udbg_putcLP; |
232 | ppc_md.udbg_getc = udbg_getcLP; | 231 | udbg_getc = udbg_getcLP; |
233 | ppc_md.udbg_getc_poll = udbg_getc_pollLP; | 232 | udbg_getc_poll = udbg_getc_pollLP; |
234 | found = 1; | 233 | found = 1; |
235 | } | 234 | } |
236 | } else if (device_is_compatible(stdout_node, "hvterm-protocol")) { | 235 | } else if (device_is_compatible(stdout_node, "hvterm-protocol")) { |
237 | termno = (u32 *)get_property(stdout_node, "reg", NULL); | 236 | termno = (u32 *)get_property(stdout_node, "reg", NULL); |
238 | if (termno) { | 237 | if (termno) { |
239 | vtermno = termno[0]; | 238 | vtermno = termno[0]; |
240 | ppc_md.udbg_putc = udbg_hvsi_putc; | 239 | udbg_putc = udbg_hvsi_putc; |
241 | ppc_md.udbg_getc = udbg_hvsi_getc; | 240 | udbg_getc = udbg_hvsi_getc; |
242 | ppc_md.udbg_getc_poll = udbg_hvsi_getc_poll; | 241 | udbg_getc_poll = udbg_hvsi_getc_poll; |
243 | found = 1; | 242 | found = 1; |
244 | } | 243 | } |
245 | } | 244 | } |
@@ -267,6 +266,10 @@ void vpa_init(int cpu) | |||
267 | 266 | ||
268 | /* Register the Virtual Processor Area (VPA) */ | 267 | /* Register the Virtual Processor Area (VPA) */ |
269 | flags = 1UL << (63 - 18); | 268 | flags = 1UL << (63 - 18); |
269 | |||
270 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) | ||
271 | paca[cpu].lppaca.vmxregs_in_use = 1; | ||
272 | |||
270 | ret = register_vpa(flags, hwcpu, __pa(vpa)); | 273 | ret = register_vpa(flags, hwcpu, __pa(vpa)); |
271 | 274 | ||
272 | if (ret) | 275 | if (ret) |
@@ -279,7 +282,6 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group, | |||
279 | unsigned long va, unsigned long prpn, | 282 | unsigned long va, unsigned long prpn, |
280 | unsigned long vflags, unsigned long rflags) | 283 | unsigned long vflags, unsigned long rflags) |
281 | { | 284 | { |
282 | unsigned long arpn = physRpn_to_absRpn(prpn); | ||
283 | unsigned long lpar_rc; | 285 | unsigned long lpar_rc; |
284 | unsigned long flags; | 286 | unsigned long flags; |
285 | unsigned long slot; | 287 | unsigned long slot; |
@@ -290,7 +292,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group, | |||
290 | if (vflags & HPTE_V_LARGE) | 292 | if (vflags & HPTE_V_LARGE) |
291 | hpte_v &= ~(1UL << HPTE_V_AVPN_SHIFT); | 293 | hpte_v &= ~(1UL << HPTE_V_AVPN_SHIFT); |
292 | 294 | ||
293 | hpte_r = (arpn << HPTE_R_RPN_SHIFT) | rflags; | 295 | hpte_r = (prpn << HPTE_R_RPN_SHIFT) | rflags; |
294 | 296 | ||
295 | /* Now fill in the actual HPTE */ | 297 | /* Now fill in the actual HPTE */ |
296 | /* Set CEC cookie to 0 */ | 298 | /* Set CEC cookie to 0 */ |