From patchwork Wed Oct 21 07:12:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 533611 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 1A26C1409F8 for ; Wed, 21 Oct 2015 18:12:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D1918D2B3; Wed, 21 Oct 2015 07:12:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BnqfwQwvwgkQ; Wed, 21 Oct 2015 07:12:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 346EE8D120; Wed, 21 Oct 2015 07:12:53 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id ABC1C1BFBF9 for ; Wed, 21 Oct 2015 07:12:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A61E18AEB4 for ; Wed, 21 Oct 2015 07:12:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wHSx-XKHyoKX for ; Wed, 21 Oct 2015 07:12:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.47.9]) by hemlock.osuosl.org (Postfix) with ESMTPS id EECE98AEB3 for ; Wed, 21 Oct 2015 07:12:50 +0000 (UTC) Received: from dc8secmta1.synopsys.com (dc8secmta1.synopsys.com [10.13.218.200]) by smtprelay.synopsys.com (Postfix) with ESMTP id 42CB524E0D48; Wed, 21 Oct 2015 00:12:50 -0700 (PDT) Received: from dc8secmta1.internal.synopsys.com (dc8secmta1.internal.synopsys.com [127.0.0.1]) by dc8secmta1.internal.synopsys.com (Service) with ESMTP id 3707C27113; Wed, 21 Oct 2015 00:12:50 -0700 (PDT) Received: from mailhost.synopsys.com (unknown [10.13.184.66]) by dc8secmta1.internal.synopsys.com (Service) with ESMTP id 17D8327102; Wed, 21 Oct 2015 00:12:50 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 0B5BD9C6; Wed, 21 Oct 2015 00:12:50 -0700 (PDT) Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id 026F29C5; Wed, 21 Oct 2015 00:12:50 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Oct 2015 00:12:49 -0700 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Oct 2015 12:42:47 +0530 Received: from vineetg-E7440.internal.synopsys.com (10.12.197.182) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Oct 2015 12:42:46 +0530 From: Vineet Gupta To: , Subject: [PATCH 1/3] NPTL/ARCv2: Implement full memory barrier for NPTL Date: Wed, 21 Oct 2015 12:42:23 +0530 Message-ID: <1445411545-14538-2-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445411545-14538-1-git-send-email-vgupta@synopsys.com> References: <1445411545-14538-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 X-Originating-IP: [10.12.197.182] Cc: Vineet Gupta X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" Signed-off-by: Vineet Gupta --- libc/sysdeps/linux/arc/bits/atomic.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libc/sysdeps/linux/arc/bits/atomic.h b/libc/sysdeps/linux/arc/bits/atomic.h index d4abf4eb7896..1fdc83f70f6b 100644 --- a/libc/sysdeps/linux/arc/bits/atomic.h +++ b/libc/sysdeps/linux/arc/bits/atomic.h @@ -24,8 +24,11 @@ typedef uintmax_t uatomic_max_t; void __arc_link_error (void); -#define atomic_full_barrier() \ - __asm__ __volatile__("": : :"memory") +#ifdef __A7__ +#define atomic_full_barrier() __asm__ __volatile__("": : :"memory") +#else +#define atomic_full_barrier() __asm__ __volatile__("dmb 3": : :"memory") +#endif /* Atomic compare and exchange. */