diff options
Diffstat (limited to 'arch/powerpc/platforms/iseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index ad5ef80500ce..c6bbe5c25107 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <asm/iseries/mf.h> | 52 | #include <asm/iseries/mf.h> |
53 | #include <asm/iseries/hv_lp_event.h> | 53 | #include <asm/iseries/hv_lp_event.h> |
54 | #include <asm/iseries/lpar_map.h> | 54 | #include <asm/iseries/lpar_map.h> |
55 | #include <asm/udbg.h> | ||
55 | 56 | ||
56 | #include "naca.h" | 57 | #include "naca.h" |
57 | #include "setup.h" | 58 | #include "setup.h" |
@@ -62,10 +63,8 @@ | |||
62 | #include "call_sm.h" | 63 | #include "call_sm.h" |
63 | #include "call_hpt.h" | 64 | #include "call_hpt.h" |
64 | 65 | ||
65 | extern void hvlog(char *fmt, ...); | ||
66 | |||
67 | #ifdef DEBUG | 66 | #ifdef DEBUG |
68 | #define DBG(fmt...) hvlog(fmt) | 67 | #define DBG(fmt...) udbg_printf(fmt) |
69 | #else | 68 | #else |
70 | #define DBG(fmt...) | 69 | #define DBG(fmt...) |
71 | #endif | 70 | #endif |
@@ -474,14 +473,6 @@ static unsigned long __init build_iSeries_Memory_Map(void) | |||
474 | printk("HPT absolute addr = %016lx, size = %dK\n", | 473 | printk("HPT absolute addr = %016lx, size = %dK\n", |
475 | chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); | 474 | chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); |
476 | 475 | ||
477 | ppc64_pft_size = __ilog2(hptSizePages * HW_PAGE_SIZE); | ||
478 | |||
479 | /* | ||
480 | * The actual hashed page table is in the hypervisor, | ||
481 | * we have no direct access | ||
482 | */ | ||
483 | htab_address = NULL; | ||
484 | |||
485 | /* | 476 | /* |
486 | * Determine if absolute memory has any | 477 | * Determine if absolute memory has any |
487 | * holes so that we can interpret the | 478 | * holes so that we can interpret the |
@@ -861,6 +852,11 @@ void dt_prop_u64_list(struct iseries_flat_dt *dt, char *name, u64 *data, int n) | |||
861 | dt_prop(dt, name, (char *)data, sizeof(u64) * n); | 852 | dt_prop(dt, name, (char *)data, sizeof(u64) * n); |
862 | } | 853 | } |
863 | 854 | ||
855 | void dt_prop_u32_list(struct iseries_flat_dt *dt, char *name, u32 *data, int n) | ||
856 | { | ||
857 | dt_prop(dt, name, (char *)data, sizeof(u32) * n); | ||
858 | } | ||
859 | |||
864 | void dt_prop_empty(struct iseries_flat_dt *dt, char *name) | 860 | void dt_prop_empty(struct iseries_flat_dt *dt, char *name) |
865 | { | 861 | { |
866 | dt_prop(dt, name, NULL, 0); | 862 | dt_prop(dt, name, NULL, 0); |
@@ -872,6 +868,7 @@ void dt_cpus(struct iseries_flat_dt *dt) | |||
872 | unsigned char *p; | 868 | unsigned char *p; |
873 | unsigned int i, index; | 869 | unsigned int i, index; |
874 | struct IoHriProcessorVpd *d; | 870 | struct IoHriProcessorVpd *d; |
871 | u32 pft_size[2]; | ||
875 | 872 | ||
876 | /* yuck */ | 873 | /* yuck */ |
877 | snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); | 874 | snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); |
@@ -882,6 +879,9 @@ void dt_cpus(struct iseries_flat_dt *dt) | |||
882 | dt_prop_u32(dt, "#address-cells", 1); | 879 | dt_prop_u32(dt, "#address-cells", 1); |
883 | dt_prop_u32(dt, "#size-cells", 0); | 880 | dt_prop_u32(dt, "#size-cells", 0); |
884 | 881 | ||
882 | pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */ | ||
883 | pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE); | ||
884 | |||
885 | for (i = 0; i < NR_CPUS; i++) { | 885 | for (i = 0; i < NR_CPUS; i++) { |
886 | if (paca[i].lppaca.dyn_proc_status >= 2) | 886 | if (paca[i].lppaca.dyn_proc_status >= 2) |
887 | continue; | 887 | continue; |
@@ -908,6 +908,8 @@ void dt_cpus(struct iseries_flat_dt *dt) | |||
908 | 908 | ||
909 | dt_prop_u32(dt, "reg", i); | 909 | dt_prop_u32(dt, "reg", i); |
910 | 910 | ||
911 | dt_prop_u32_list(dt, "ibm,pft-size", pft_size, 2); | ||
912 | |||
911 | dt_end_node(dt); | 913 | dt_end_node(dt); |
912 | } | 914 | } |
913 | 915 | ||
@@ -984,3 +986,16 @@ static int __init early_parsemem(char *p) | |||
984 | return 0; | 986 | return 0; |
985 | } | 987 | } |
986 | early_param("mem", early_parsemem); | 988 | early_param("mem", early_parsemem); |
989 | |||
990 | static void hvputc(char c) | ||
991 | { | ||
992 | if (c == '\n') | ||
993 | hvputc('\r'); | ||
994 | |||
995 | HvCall_writeLogBuffer(&c, 1); | ||
996 | } | ||
997 | |||
998 | void __init udbg_init_iseries(void) | ||
999 | { | ||
1000 | udbg_putc = hvputc; | ||
1001 | } | ||