aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/lparcfg.c
diff options
context:
space:
mode:
authorMilosz Tanski <milosz@adfin.com>2013-09-06 12:41:20 -0400
committerMilosz Tanski <milosz@adfin.com>2013-09-06 12:41:20 -0400
commitcd0a2df681ec2af45f50c555c2a39dc92a4dff71 (patch)
tree35d2278a9494582025f3dac08feb2266adef6a4d /arch/powerpc/kernel/lparcfg.c
parentc35455791c1131e7ccbf56ea6fbdd562401c2ce2 (diff)
parent5a6f282a2052bb13171b53f03b34501cf72c33f1 (diff)
Merge tag 'fscache-fixes-for-ceph' into wip-fscache
Patches for Ceph FS-Cache support
Diffstat (limited to 'arch/powerpc/kernel/lparcfg.c')
-rw-r--r--arch/powerpc/kernel/lparcfg.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index d92f3871e9cf..e2a0a162299b 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -35,7 +35,13 @@
35#include <asm/vdso_datapage.h> 35#include <asm/vdso_datapage.h>
36#include <asm/vio.h> 36#include <asm/vio.h>
37#include <asm/mmu.h> 37#include <asm/mmu.h>
38#include <asm/machdep.h>
38 39
40
41/*
42 * This isn't a module but we expose that to userspace
43 * via /proc so leave the definitions here
44 */
39#define MODULE_VERS "1.9" 45#define MODULE_VERS "1.9"
40#define MODULE_NAME "lparcfg" 46#define MODULE_NAME "lparcfg"
41 47
@@ -418,7 +424,8 @@ static void parse_em_data(struct seq_file *m)
418{ 424{
419 unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; 425 unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
420 426
421 if (plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS) 427 if (firmware_has_feature(FW_FEATURE_LPAR) &&
428 plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS)
422 seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]); 429 seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]);
423} 430}
424 431
@@ -677,7 +684,6 @@ static int lparcfg_open(struct inode *inode, struct file *file)
677} 684}
678 685
679static const struct file_operations lparcfg_fops = { 686static const struct file_operations lparcfg_fops = {
680 .owner = THIS_MODULE,
681 .read = seq_read, 687 .read = seq_read,
682 .write = lparcfg_write, 688 .write = lparcfg_write,
683 .open = lparcfg_open, 689 .open = lparcfg_open,
@@ -699,14 +705,4 @@ static int __init lparcfg_init(void)
699 } 705 }
700 return 0; 706 return 0;
701} 707}
702 708machine_device_initcall(pseries, lparcfg_init);
703static void __exit lparcfg_cleanup(void)
704{
705 remove_proc_subtree("powerpc/lparcfg", NULL);
706}
707
708module_init(lparcfg_init);
709module_exit(lparcfg_cleanup);
710MODULE_DESCRIPTION("Interface for LPAR configuration data");
711MODULE_AUTHOR("Dave Engebretsen");
712MODULE_LICENSE("GPL");