From: Stephen Rothwell Date: Thu, 4 Jan 2007 06:01:51 +0000 (+1100) Subject: [POWERPC] iSeries: fix mf proc initialisation X-Git-Tag: v2.6.20-rc5~35^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9523aa157e9fbb93467dcd0d1bed9604153bf7f;p=platform%2Fkernel%2Flinux-exynos.git [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 Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index cff15ae..1ad0e4a 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -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;