Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / asm-sparc64 / ide.h
index 6b32740..c393f81 100644 (file)
@@ -13,8 +13,9 @@
 #include <linux/config.h>
 #include <asm/pgalloc.h>
 #include <asm/io.h>
-#include <asm/page.h>
 #include <asm/spitfire.h>
+#include <asm/cacheflush.h>
+#include <asm/page.h>
 
 #ifndef MAX_HWIFS
 # ifdef CONFIG_BLK_DEV_IDEPCI
@@ -51,7 +52,7 @@ static inline unsigned int inw_be(void __iomem *addr)
 
 static inline void __ide_insw(void __iomem *port, void *dst, u32 count)
 {
-#if (L1DCACHE_SIZE > PAGE_SIZE)                /* is there D$ aliasing problem */
+#ifdef DCACHE_ALIASING_POSSIBLE
        unsigned long end = (unsigned long)dst + (count << 1);
 #endif
        u16 *ps = dst;
@@ -74,7 +75,7 @@ static inline void __ide_insw(void __iomem *port, void *dst, u32 count)
        if(count)
                *ps++ = inw_be(port);
 
-#if (L1DCACHE_SIZE > PAGE_SIZE)                /* is there D$ aliasing problem */
+#ifdef DCACHE_ALIASING_POSSIBLE
        __flush_dcache_range((unsigned long)dst, end);
 #endif
 }
@@ -88,7 +89,7 @@ static inline void outw_be(unsigned short w, void __iomem *addr)
 
 static inline void __ide_outsw(void __iomem *port, void *src, u32 count)
 {
-#if (L1DCACHE_SIZE > PAGE_SIZE)                /* is there D$ aliasing problem */
+#ifdef DCACHE_ALIASING_POSSIBLE
        unsigned long end = (unsigned long)src + (count << 1);
 #endif
        const u16 *ps = src;
@@ -111,7 +112,7 @@ static inline void __ide_outsw(void __iomem *port, void *src, u32 count)
        if(count)
                outw_be(*ps, port);
 
-#if (L1DCACHE_SIZE > PAGE_SIZE)                /* is there D$ aliasing problem */
+#ifdef DCACHE_ALIASING_POSSIBLE
        __flush_dcache_range((unsigned long)src, end);
 #endif
 }