diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-28 03:17:32 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-28 03:17:32 +0200 |
commit | 10420921675582903ab256dc3094206ac0280f68 (patch) | |
tree | b774e849efa85255b2fbc0a24698c75196038e96 /arch/powerpc/kernel | |
parent | powerpc/powernv: Return secondary CPUs to firmware on kexec (diff) | |
parent | powerpc/hvsi: Increase handshake timeout from 200ms to 400ms. (diff) | |
download | linux-10420921675582903ab256dc3094206ac0280f68.tar.xz linux-10420921675582903ab256dc3094206ac0280f68.zip |
Merge branch 'merge' into next
Merge recent fixes to lparcfg so subsequent patches can move
the whole file to arch/powerpc/platforms/pseries
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 0204089ebdd4..e738007eae64 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c @@ -35,7 +35,13 @@ #include <asm/vdso_datapage.h> #include <asm/vio.h> #include <asm/mmu.h> +#include <asm/machdep.h> + +/* + * This isn't a module but we expose that to userspace + * via /proc so leave the definitions here + */ #define MODULE_VERS "1.9" #define MODULE_NAME "lparcfg" @@ -419,7 +425,8 @@ static void parse_em_data(struct seq_file *m) { unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; - if (plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS) + if (firmware_has_feature(FW_FEATURE_LPAR) && + plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS) seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]); } @@ -679,7 +686,6 @@ static int lparcfg_open(struct inode *inode, struct file *file) } static const struct file_operations lparcfg_fops = { - .owner = THIS_MODULE, .read = seq_read, .write = lparcfg_write, .open = lparcfg_open, @@ -701,14 +707,4 @@ static int __init lparcfg_init(void) } return 0; } - -static void __exit lparcfg_cleanup(void) -{ - remove_proc_subtree("powerpc/lparcfg", NULL); -} - -module_init(lparcfg_init); -module_exit(lparcfg_cleanup); -MODULE_DESCRIPTION("Interface for LPAR configuration data"); -MODULE_AUTHOR("Dave Engebretsen"); -MODULE_LICENSE("GPL"); +machine_device_initcall(pseries, lparcfg_init); |