Skip to content

Commit

Permalink
[POWERPC] iSeries: fix mf proc initialisation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Rothwell authored and Paul Mackerras committed Jan 9, 2007
1 parent 7232846 commit d9523aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/platforms/iseries/mf.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <asm/uaccess.h>
#include <asm/paca.h>
#include <asm/abs_addr.h>
#include <asm/firmware.h>
#include <asm/iseries/vio.h>
#include <asm/iseries/mf.h>
#include <asm/iseries/hv_lp_config.h>
Expand Down Expand Up @@ -1235,6 +1236,9 @@ static int __init mf_proc_init(void)
char name[2];
int i;

if (!firmware_has_feature(FW_FEATURE_ISERIES))
return 0;

mf_proc_root = proc_mkdir("iSeries/mf", NULL);
if (!mf_proc_root)
return 1;
Expand Down

0 comments on commit d9523aa

Please sign in to comment.