Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlof Johansson <olof@austin.ibm.com>2005-03-02 23:14:35 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-03-02 23:14:35 -0800
commite190b25ce10aaaaf73c4f9010902b6111eb75969 (patch)
treeaad5437828d56fe443952364c91e1020b6d0140e
parentc60af94e8da2653319282f6390ba546ff9f03db5 (diff)
[PATCH] Fix for trivial fix for 2.6.11 raid6 compilation on ppc w/ Altivec
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>
-rw-r--r--drivers/md/raid6altivec.uc4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/raid6altivec.uc b/drivers/md/raid6altivec.uc
index 3c1fd5425650..f4ff6441df0a 100644
--- a/drivers/md/raid6altivec.uc
+++ b/drivers/md/raid6altivec.uc
@@ -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