linux-mips
[Top] [All Lists]

Questions for CONFIG_WEAK_ORDERING and CONFIG_WEAK_REORDERING_BEYOND_LL

To: ralf Baechle <ralf@linux-mips.org>, Linux MIPS List <linux-mips@linux-mips.org>
Subject: Questions for CONFIG_WEAK_ORDERING and CONFIG_WEAK_REORDERING_BEYOND_LLSC
From: Johannes Dickgreber <tanzy@gmx.de>
Date: Mon, 13 Oct 2008 21:01:44 +0200
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.17 (X11/20080922)
If a cpu is WEAK_ORDERING schouldn't it do a sync independent of CONFIG_SMP ?

And if it is a SMP system schouldn't it do a sync independent of 
CONFIG_WEAK_ORDERING ?

And if a cpu has no sync with LLSC schouldn't it do a sync independent of 
CONFIG_SMP ?

All together, is the following the right thing to do ?
---
 arch/mips/include/asm/barrier.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h
index 8e9ac31..46b2364 100644
--- a/arch/mips/include/asm/barrier.h
+++ b/arch/mips/include/asm/barrier.h
@@ -130,12 +130,13 @@
 
 #endif /* !CONFIG_CPU_HAS_WB */
 
-#if defined(CONFIG_WEAK_ORDERING) && defined(CONFIG_SMP)
+#if defined(CONFIG_WEAK_ORDERING) || defined(CONFIG_SMP)
 #define __WEAK_ORDERING_MB     "       sync    \n"
 #else
 #define __WEAK_ORDERING_MB     "               \n"
 #endif
-#if defined(CONFIG_WEAK_REORDERING_BEYOND_LLSC) && defined(CONFIG_SMP)
+
+#if defined(CONFIG_WEAK_REORDERING_BEYOND_LLSC)
 #define __WEAK_LLSC_MB         "       sync    \n"
 #else
 #define __WEAK_LLSC_MB         "               \n"
-- 
1.6.0.2


<Prev in Thread] Current Thread [Next in Thread>