aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-11-10 21:53:11 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-11 06:20:01 -0500
commit8acb888c9cf70d03598eb4a731e3c6e5a588f1ce (patch)
treebddd342b9c417da1f27b2a03c851a2ff2b0f7bed /arch
parent7f7fda04a6a00d2b99990cec2182bf5181c53de1 (diff)
[PATCH] ppc64: Quieten lparcfg
If we dont have permission to read some information from the hypervisor, lparcfg outputs a warning on the console. Now that lparcfg is world readable this is a problem. Dont warn in the case of H_Authority, remove some unnecessary function prototypes and fix whitespace damage in a structure as well. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/lparcfg.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 5e954fae031f..e45ce48ec126 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -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... */
46void log_plpar_hcall_return(unsigned long rc, char *tag) 46static 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
219static 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
322static 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.
@@ -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: 548out:
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
563struct file_operations lparcfg_fops = { 560struct 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
570int __init lparcfg_init(void) 567int __init lparcfg_init(void)