diff options
Diffstat (limited to 'arch/powerpc/kernel/lparcfg.c')
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 23f34daa044a..41c05dcd68f4 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/rtas.h> | 32 | #include <asm/rtas.h> |
33 | #include <asm/system.h> | 33 | #include <asm/system.h> |
34 | #include <asm/time.h> | 34 | #include <asm/time.h> |
35 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
36 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
37 | #include <asm/vdso_datapage.h> | 36 | #include <asm/vdso_datapage.h> |
38 | 37 | ||
@@ -183,8 +182,14 @@ static unsigned int h_get_ppp(unsigned long *entitled, | |||
183 | unsigned long *resource) | 182 | unsigned long *resource) |
184 | { | 183 | { |
185 | unsigned long rc; | 184 | unsigned long rc; |
186 | rc = plpar_hcall_4out(H_GET_PPP, 0, 0, 0, 0, entitled, unallocated, | 185 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; |
187 | aggregation, resource); | 186 | |
187 | rc = plpar_hcall(H_GET_PPP, retbuf); | ||
188 | |||
189 | *entitled = retbuf[0]; | ||
190 | *unallocated = retbuf[1]; | ||
191 | *aggregation = retbuf[2]; | ||
192 | *resource = retbuf[3]; | ||
188 | 193 | ||
189 | log_plpar_hcall_return(rc, "H_GET_PPP"); | 194 | log_plpar_hcall_return(rc, "H_GET_PPP"); |
190 | 195 | ||
@@ -194,8 +199,12 @@ static unsigned int h_get_ppp(unsigned long *entitled, | |||
194 | static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) | 199 | static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) |
195 | { | 200 | { |
196 | unsigned long rc; | 201 | unsigned long rc; |
197 | unsigned long dummy; | 202 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; |
198 | rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); | 203 | |
204 | rc = plpar_hcall(H_PIC, retbuf); | ||
205 | |||
206 | *pool_idle_time = retbuf[0]; | ||
207 | *num_procs = retbuf[1]; | ||
199 | 208 | ||
200 | if (rc != H_AUTHORITY) | 209 | if (rc != H_AUTHORITY) |
201 | log_plpar_hcall_return(rc, "H_PIC"); | 210 | log_plpar_hcall_return(rc, "H_PIC"); |
@@ -310,12 +319,11 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) | |||
310 | int partition_potential_processors; | 319 | int partition_potential_processors; |
311 | int partition_active_processors; | 320 | int partition_active_processors; |
312 | struct device_node *rtas_node; | 321 | struct device_node *rtas_node; |
313 | int *lrdrp = NULL; | 322 | const int *lrdrp = NULL; |
314 | 323 | ||
315 | rtas_node = find_path_device("/rtas"); | 324 | rtas_node = find_path_device("/rtas"); |
316 | if (rtas_node) | 325 | if (rtas_node) |
317 | lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", | 326 | lrdrp = get_property(rtas_node, "ibm,lrdr-capacity", NULL); |
318 | NULL); | ||
319 | 327 | ||
320 | if (lrdrp == NULL) { | 328 | if (lrdrp == NULL) { |
321 | partition_potential_processors = vdso_data->processorCount; | 329 | partition_potential_processors = vdso_data->processorCount; |
@@ -520,7 +528,8 @@ static int lparcfg_data(struct seq_file *m, void *v) | |||
520 | const char *model = ""; | 528 | const char *model = ""; |
521 | const char *system_id = ""; | 529 | const char *system_id = ""; |
522 | const char *tmp; | 530 | const char *tmp; |
523 | unsigned int *lp_index_ptr, lp_index = 0; | 531 | const unsigned int *lp_index_ptr; |
532 | unsigned int lp_index = 0; | ||
524 | 533 | ||
525 | seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); | 534 | seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); |
526 | 535 | ||
@@ -540,8 +549,7 @@ static int lparcfg_data(struct seq_file *m, void *v) | |||
540 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 549 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
541 | system_id += 4; | 550 | system_id += 4; |
542 | } | 551 | } |
543 | lp_index_ptr = (unsigned int *) | 552 | lp_index_ptr = get_property(rootdn, "ibm,partition-no", NULL); |
544 | get_property(rootdn, "ibm,partition-no", NULL); | ||
545 | if (lp_index_ptr) | 553 | if (lp_index_ptr) |
546 | lp_index = *lp_index_ptr; | 554 | lp_index = *lp_index_ptr; |
547 | } | 555 | } |