Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.3959);
	 Mon, 13 Oct 2008 12:03:18 -0700
Received: from dalesmta2-1.messageone.com ([129.41.169.249]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.3959);
	 Mon, 13 Oct 2008 12:03:17 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by dalesmta2-1.messageone.com (8.13.8/8.13.8) with ESMTP id m9DJ2ugO012609
	for <andy.sharp@onstor.com>; Mon, 13 Oct 2008 14:03:13 -0500
Received: from localhost.localdomain ([127.0.0.1]:62116 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S21408005AbYJMTCb (ORCPT <rfc822;andy.sharp@onstor.com>);
	Mon, 13 Oct 2008 20:02:31 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 13 Oct 2008 20:02:14 +0100 (BST)
Received: from mail.gmx.net ([213.165.64.20]:41369 "HELO mail.gmx.net")
	by ftp.linux-mips.org with SMTP id S21407998AbYJMTCM (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Mon, 13 Oct 2008 20:02:12 +0100
Received: (qmail invoked by alias); 13 Oct 2008 19:01:53 -0000
Received: from p548B3450.dip0.t-ipconnect.de (EHLO [192.168.120.26]) [84.139.52.80]
  by mail.gmx.net (mp058) with SMTP; 13 Oct 2008 21:01:53 +0200
X-Authenticated: #16080105
X-Provags-ID: V01U2FsdGVkX19K6D9YNBJKYKHuQdzs2gkBmnobrHXk7Z+GztPwbt
	V1sJHGmLwKNn9A
Message-ID: <48F39B18.9030601@gmx.de>
Date: 	Mon, 13 Oct 2008 21:01:44 +0200
From: Johannes Dickgreber <tanzy@gmx.de>
User-Agent: Thunderbird 2.0.0.17 (X11/20080922)
MIME-Version: 1.0
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
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.54
X-archive-position: 20732
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: tanzy@gmx.de
Precedence: bulk
X-list: 	linux-mips
X-MessageOne-Virus-Version: vendor=fsecure engine=4.65.7161:2.4.4,1.2.40,4.0.164 definitions=2008-10-13_10:2008-10-10,2008-10-13,2008-10-13 signatures=0
X-MessageOne-Virus-Scanned: Clean
X-MessageOne-Envelope-Sender: linux-mips-bounce@linux-mips.org
X-MessageOne-Spam-Details: rule=m773emszm_notspam policy=m773emszm score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0805090000 definitions=main-0810130163
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 13 Oct 2008 19:03:18.0075 (UTC) FILETIME=[5A3ED0B0:01C92D66]

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


