]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] Fix for trivial fix for 2.6.11 raid6 compilation on ppc w/ Altivec
authorolof@austin.ibm.com <olof@austin.ibm.com>
Thu, 3 Mar 2005 23:14:35 +0000 (15:14 -0800)
committerGreg KH <gregkh@suse.de>
Thu, 12 May 2005 17:00:05 +0000 (10:00 -0700)
Here's a patch that will work for both PPC and PPC64. The proper way to
fix this in mainline is to merge -mm's cpu_has_feature patch, but for
the stable 2.6.11-series, this much less intrusive (i.e. just the pure
bugfix, not the cleanup part).

Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/raid6altivec.uc

index 3c1fd5425650e4f3711009e1134817bb35122d44..f4ff6441df0a2df9fd82b22fbe1db71f0f52b2c6 100644 (file)
@@ -108,7 +108,11 @@ int raid6_have_altivec(void);
 int raid6_have_altivec(void)
 {
        /* This assumes either all CPUs have Altivec or none does */
+#ifdef CONFIG_PPC64
+       return cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC;
+#else
        return cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC;
+#endif
 }
 #endif