Commit d9523aa1 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Paul Mackerras

[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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7232846b
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/paca.h> #include <asm/paca.h>
#include <asm/abs_addr.h> #include <asm/abs_addr.h>
#include <asm/firmware.h>
#include <asm/iseries/vio.h> #include <asm/iseries/vio.h>
#include <asm/iseries/mf.h> #include <asm/iseries/mf.h>
#include <asm/iseries/hv_lp_config.h> #include <asm/iseries/hv_lp_config.h>
...@@ -1235,6 +1236,9 @@ static int __init mf_proc_init(void) ...@@ -1235,6 +1236,9 @@ static int __init mf_proc_init(void)
char name[2]; char name[2];
int i; int i;
if (!firmware_has_feature(FW_FEATURE_ISERIES))
return 0;
mf_proc_root = proc_mkdir("iSeries/mf", NULL); mf_proc_root = proc_mkdir("iSeries/mf", NULL);
if (!mf_proc_root) if (!mf_proc_root)
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment