summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/lparcfg.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-11-11 03:53:11 +0100
committerPaul Mackerras <paulus@samba.org>2005-11-11 12:20:01 +0100
commit8acb888c9cf70d03598eb4a731e3c6e5a588f1ce (patch)
treebddd342b9c417da1f27b2a03c851a2ff2b0f7bed /arch/powerpc/kernel/lparcfg.c
parent[PATCH] ppc32: fix PQ2 PCI DMA interrupt handling (diff)
downloadlinux-8acb888c9cf70d03598eb4a731e3c6e5a588f1ce.tar.xz
linux-8acb888c9cf70d03598eb4a731e3c6e5a588f1ce.zip
[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 '')
-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 @@
/* #define LPARCFG_DEBUG */
/* find a better place for this function... */
-void log_plpar_hcall_return(unsigned long rc, char *tag)
+static void log_plpar_hcall_return(unsigned long rc, char *tag)
{
if (rc == 0) /* success, return */
return;
@@ -213,11 +213,10 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs)
unsigned long dummy;
rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);
- log_plpar_hcall_return(rc, "H_PIC");
+ if (rc != H_Authority)
+ log_plpar_hcall_return(rc, "H_PIC");
}
-static unsigned long get_purr(void);
-
/* Track sum of all purrs across all processors. This is used to further */
/* calculate usage values by different applications */
@@ -319,8 +318,6 @@ static void parse_system_parameter_string(struct seq_file *m)
kfree(local_buffer);
}
-static int lparcfg_count_active_processors(void);
-
/* Return the number of processors in the system.
* This function reads through the device tree and counts
* the virtual processors, this does not include threads.
@@ -548,7 +545,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
retval = -EIO;
}
- out:
+out:
kfree(kbuf);
return retval;
}
@@ -561,10 +558,10 @@ static int lparcfg_open(struct inode *inode, struct file *file)
}
struct file_operations lparcfg_fops = {
- .owner = THIS_MODULE,
- .read = seq_read,
- .open = lparcfg_open,
- .release = single_release,
+ .owner = THIS_MODULE,
+ .read = seq_read,
+ .open = lparcfg_open,
+ .release = single_release,
};
int __init lparcfg_init(void)