diff mbox

sparc32, leon: Require separate snoop tags set to regard snooping to be enabled

Message ID 1372688167-16432-1-git-send-email-andreas@gaisler.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Andreas Larsson July 1, 2013, 2:16 p.m. UTC
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>
---
 arch/sparc/include/asm/leon.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller July 10, 2013, 8:42 p.m. UTC | #1
From: Andreas Larsson <andreas@gaisler.com>
Date: Mon,  1 Jul 2013 16:16:07 +0200

> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h
index b836e92..c2f6ff6 100644
--- a/arch/sparc/include/asm/leon.h
+++ b/arch/sparc/include/asm/leon.h
@@ -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)