aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-01-04 01:01:51 -0500
committerPaul Mackerras <paulus@samba.org>2007-01-09 01:03:03 -0500
commitd9523aa157e9fbb93467dcd0d1bed9604153bf7f (patch)
tree373df43d5fb29b41b3ce23b37786f9ee1a9bc214 /arch
parent7232846b8d682a56407839e3774d03be0c7806c8 (diff)
[POWERPC] iSeries: fix mf proc initialisation
This proc file should only be created if we are running on legacy iSeries. Since we can now run the same kernel on legacy iSeries and other machines, we currently get the /proc/iSeries directory and the files in it on non-iSeries machines, and accessing them causes an oops in some cases. This and the following patches make sure that these files are not created on non-iSeries machines, thus avoiding the oops. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/iseries/mf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index cff15ae24f6b..1ad0e4aaad1a 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -38,6 +38,7 @@
38#include <asm/uaccess.h> 38#include <asm/uaccess.h>
39#include <asm/paca.h> 39#include <asm/paca.h>
40#include <asm/abs_addr.h> 40#include <asm/abs_addr.h>
41#include <asm/firmware.h>
41#include <asm/iseries/vio.h> 42#include <asm/iseries/vio.h>
42#include <asm/iseries/mf.h> 43#include <asm/iseries/mf.h>
43#include <asm/iseries/hv_lp_config.h> 44#include <asm/iseries/hv_lp_config.h>
@@ -1235,6 +1236,9 @@ static int __init mf_proc_init(void)
1235 char name[2]; 1236 char name[2];
1236 int i; 1237 int i;
1237 1238
1239 if (!firmware_has_feature(FW_FEATURE_ISERIES))
1240 return 0;
1241
1238 mf_proc_root = proc_mkdir("iSeries/mf", NULL); 1242 mf_proc_root = proc_mkdir("iSeries/mf", NULL);
1239 if (!mf_proc_root) 1243 if (!mf_proc_root)
1240 return 1; 1244 return 1;