diff options
Diffstat (limited to 'arch/powerpc/kernel/lparcfg.c')
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 5e954fae031f..1b3ba8a440a6 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <asm/time.h> | 35 | #include <asm/time.h> |
36 | #include <asm/iseries/it_exp_vpd_panel.h> | 36 | #include <asm/iseries/it_exp_vpd_panel.h> |
37 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
38 | #include <asm/systemcfg.h> | 38 | #include <asm/vdso_datapage.h> |
39 | 39 | ||
40 | #define MODULE_VERS "1.6" | 40 | #define MODULE_VERS "1.6" |
41 | #define MODULE_NAME "lparcfg" | 41 | #define MODULE_NAME "lparcfg" |
@@ -43,7 +43,7 @@ | |||
43 | /* #define LPARCFG_DEBUG */ | 43 | /* #define LPARCFG_DEBUG */ |
44 | 44 | ||
45 | /* find a better place for this function... */ | 45 | /* find a better place for this function... */ |
46 | void log_plpar_hcall_return(unsigned long rc, char *tag) | 46 | static void log_plpar_hcall_return(unsigned long rc, char *tag) |
47 | { | 47 | { |
48 | if (rc == 0) /* success, return */ | 48 | if (rc == 0) /* success, return */ |
49 | return; | 49 | return; |
@@ -213,11 +213,10 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) | |||
213 | unsigned long dummy; | 213 | unsigned long dummy; |
214 | rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); | 214 | rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); |
215 | 215 | ||
216 | log_plpar_hcall_return(rc, "H_PIC"); | 216 | if (rc != H_Authority) |
217 | log_plpar_hcall_return(rc, "H_PIC"); | ||
217 | } | 218 | } |
218 | 219 | ||
219 | static unsigned long get_purr(void); | ||
220 | |||
221 | /* Track sum of all purrs across all processors. This is used to further */ | 220 | /* Track sum of all purrs across all processors. This is used to further */ |
222 | /* calculate usage values by different applications */ | 221 | /* calculate usage values by different applications */ |
223 | 222 | ||
@@ -319,8 +318,6 @@ static void parse_system_parameter_string(struct seq_file *m) | |||
319 | kfree(local_buffer); | 318 | kfree(local_buffer); |
320 | } | 319 | } |
321 | 320 | ||
322 | static int lparcfg_count_active_processors(void); | ||
323 | |||
324 | /* Return the number of processors in the system. | 321 | /* Return the number of processors in the system. |
325 | * This function reads through the device tree and counts | 322 | * This function reads through the device tree and counts |
326 | * the virtual processors, this does not include threads. | 323 | * the virtual processors, this does not include threads. |
@@ -372,7 +369,7 @@ static int lparcfg_data(struct seq_file *m, void *v) | |||
372 | lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL); | 369 | lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL); |
373 | 370 | ||
374 | if (lrdrp == NULL) { | 371 | if (lrdrp == NULL) { |
375 | partition_potential_processors = _systemcfg->processorCount; | 372 | partition_potential_processors = vdso_data->processorCount; |
376 | } else { | 373 | } else { |
377 | partition_potential_processors = *(lrdrp + 4); | 374 | partition_potential_processors = *(lrdrp + 4); |
378 | } | 375 | } |
@@ -548,7 +545,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, | |||
548 | retval = -EIO; | 545 | retval = -EIO; |
549 | } | 546 | } |
550 | 547 | ||
551 | out: | 548 | out: |
552 | kfree(kbuf); | 549 | kfree(kbuf); |
553 | return retval; | 550 | return retval; |
554 | } | 551 | } |
@@ -561,10 +558,10 @@ static int lparcfg_open(struct inode *inode, struct file *file) | |||
561 | } | 558 | } |
562 | 559 | ||
563 | struct file_operations lparcfg_fops = { | 560 | struct file_operations lparcfg_fops = { |
564 | .owner = THIS_MODULE, | 561 | .owner = THIS_MODULE, |
565 | .read = seq_read, | 562 | .read = seq_read, |
566 | .open = lparcfg_open, | 563 | .open = lparcfg_open, |
567 | .release = single_release, | 564 | .release = single_release, |
568 | }; | 565 | }; |
569 | 566 | ||
570 | int __init lparcfg_init(void) | 567 | int __init lparcfg_init(void) |