diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/lpar.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 9a455d46379d..9235c469449e 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <asm/smp.h> | 40 | #include <asm/smp.h> |
41 | 41 | ||
42 | #include "plpar_wrappers.h" | 42 | #include "plpar_wrappers.h" |
43 | #include "pseries.h" | ||
43 | 44 | ||
44 | #ifdef DEBUG_LOW | 45 | #ifdef DEBUG_LOW |
45 | #define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0) | 46 | #define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0) |
@@ -203,7 +204,6 @@ void __init find_udbg_vterm(void) | |||
203 | struct device_node *stdout_node; | 204 | struct device_node *stdout_node; |
204 | const u32 *termno; | 205 | const u32 *termno; |
205 | const char *name; | 206 | const char *name; |
206 | int add_console; | ||
207 | 207 | ||
208 | /* find the boot console from /chosen/stdout */ | 208 | /* find the boot console from /chosen/stdout */ |
209 | if (!of_chosen) | 209 | if (!of_chosen) |
@@ -219,8 +219,6 @@ void __init find_udbg_vterm(void) | |||
219 | printk(KERN_WARNING "stdout node missing 'name' property!\n"); | 219 | printk(KERN_WARNING "stdout node missing 'name' property!\n"); |
220 | goto out; | 220 | goto out; |
221 | } | 221 | } |
222 | /* The user has requested a console so this is already set up. */ | ||
223 | add_console = !strstr(cmd_line, "console="); | ||
224 | 222 | ||
225 | /* Check if it's a virtual terminal */ | 223 | /* Check if it's a virtual terminal */ |
226 | if (strncmp(name, "vty", 3) != 0) | 224 | if (strncmp(name, "vty", 3) != 0) |
@@ -234,15 +232,13 @@ void __init find_udbg_vterm(void) | |||
234 | udbg_putc = udbg_putcLP; | 232 | udbg_putc = udbg_putcLP; |
235 | udbg_getc = udbg_getcLP; | 233 | udbg_getc = udbg_getcLP; |
236 | udbg_getc_poll = udbg_getc_pollLP; | 234 | udbg_getc_poll = udbg_getc_pollLP; |
237 | if (add_console) | 235 | add_preferred_console("hvc", termno[0] & 0xff, NULL); |
238 | add_preferred_console("hvc", termno[0] & 0xff, NULL); | ||
239 | } else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { | 236 | } else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { |
240 | vtermno = termno[0]; | 237 | vtermno = termno[0]; |
241 | udbg_putc = udbg_hvsi_putc; | 238 | udbg_putc = udbg_hvsi_putc; |
242 | udbg_getc = udbg_hvsi_getc; | 239 | udbg_getc = udbg_hvsi_getc; |
243 | udbg_getc_poll = udbg_hvsi_getc_poll; | 240 | udbg_getc_poll = udbg_hvsi_getc_poll; |
244 | if (add_console) | 241 | add_preferred_console("hvsi", termno[0] & 0xff, NULL); |
245 | add_preferred_console("hvsi", termno[0] & 0xff, NULL); | ||
246 | } | 242 | } |
247 | out: | 243 | out: |
248 | of_node_put(stdout_node); | 244 | of_node_put(stdout_node); |
@@ -520,6 +516,20 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, | |||
520 | BUG_ON(lpar_rc != H_SUCCESS); | 516 | BUG_ON(lpar_rc != H_SUCCESS); |
521 | } | 517 | } |
522 | 518 | ||
519 | static void pSeries_lpar_hpte_removebolted(unsigned long ea, | ||
520 | int psize, int ssize) | ||
521 | { | ||
522 | unsigned long slot, vsid, va; | ||
523 | |||
524 | vsid = get_kernel_vsid(ea, ssize); | ||
525 | va = hpt_va(ea, vsid, ssize); | ||
526 | |||
527 | slot = pSeries_lpar_hpte_find(va, psize, ssize); | ||
528 | BUG_ON(slot == -1); | ||
529 | |||
530 | pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0); | ||
531 | } | ||
532 | |||
523 | /* Flag bits for H_BULK_REMOVE */ | 533 | /* Flag bits for H_BULK_REMOVE */ |
524 | #define HBR_REQUEST 0x4000000000000000UL | 534 | #define HBR_REQUEST 0x4000000000000000UL |
525 | #define HBR_RESPONSE 0x8000000000000000UL | 535 | #define HBR_RESPONSE 0x8000000000000000UL |
@@ -597,6 +607,7 @@ void __init hpte_init_lpar(void) | |||
597 | ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp; | 607 | ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp; |
598 | ppc_md.hpte_insert = pSeries_lpar_hpte_insert; | 608 | ppc_md.hpte_insert = pSeries_lpar_hpte_insert; |
599 | ppc_md.hpte_remove = pSeries_lpar_hpte_remove; | 609 | ppc_md.hpte_remove = pSeries_lpar_hpte_remove; |
610 | ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted; | ||
600 | ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; | 611 | ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; |
601 | ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; | 612 | ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; |
602 | } | 613 | } |