]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sparc32, leon: Require separate snoop tags set to regard snooping to be enabled
authorAndreas Larsson <andreas@gaisler.com>
Mon, 1 Jul 2013 14:16:07 +0000 (16:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jul 2013 20:35:52 +0000 (13:35 -0700)
Even if data snooping is enabled, without separate snoop tags snooping will not
work when the MMU is enabled.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/leon.h

index b836e9297f2a71c3084df4cd695109474856d72d..c2f6ff6d7a35aa041507a25d75b4dcc5c1c8ce20 100644 (file)
@@ -108,7 +108,7 @@ static inline int sparc_leon3_snooping_enabled(void)
 {
        u32 cctrl;
        __asm__ __volatile__("lda [%%g0] 2, %0\n\t" : "=r"(cctrl));
-        return (cctrl >> 23) & 1;
+       return ((cctrl >> 23) & 1) && ((cctrl >> 17) & 1);
 };
 
 static inline void sparc_leon3_disable_cache(void)