From patchwork Thu Aug 28 20:05:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 36260 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 63542202DD for ; Thu, 28 Aug 2014 20:06:03 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf24681842pab.4 for ; Thu, 28 Aug 2014 13:06:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=8DE+3ewWx6ofxUmI5NcEyNX/LrOILph35bpNTSu3Vt0=; b=a1/yZlzJZVQyvPtuu6xPQS5FU3Yj7MK8unKi9Wao5s7HjTQPCAYM173qaxnYbELoji zGozkoBZuMskytKKpSdQjN3x4RmncjDRpHEamoAjTyQr6PoyW75QRZG/Jx7xODCpXJPy xKLsiIHvB8AZiNSEoWH+B98w0Wg6Wg7vaKPYMQ6DijSpnl+RDdc4PVryMa/8zyOw5jA6 gMtx5QUdQ38wk9u+u5wpBBwtrs7E51AN1FWQLX/UPa9ypsV4kqb9FYfbK2dVrE52rtuv 7vB9we3ERPGGWlGH1xliPD4IDBpL9BcF/uAMs12E6j6RSRjSiPCdJK5M3+w99dSbihTV CDig== X-Gm-Message-State: ALoCoQnUz68F82kMAJhQpkIchS67113enc4bqwmsukqMVQqj8ryx3o05G4tkbd1OBb/wdUZiio3N X-Received: by 10.66.150.197 with SMTP id uk5mr272912pab.41.1409256362307; Thu, 28 Aug 2014 13:06:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.112 with SMTP id 103ls766694qga.9.gmail; Thu, 28 Aug 2014 13:06:02 -0700 (PDT) X-Received: by 10.52.249.66 with SMTP id ys2mr3197982vdc.41.1409256362192; Thu, 28 Aug 2014 13:06:02 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id qg7si5068420vcb.18.2014.08.28.13.06.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 13:06:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id lf12so1475554vcb.11 for ; Thu, 28 Aug 2014 13:06:02 -0700 (PDT) X-Received: by 10.52.119.229 with SMTP id kx5mr3183540vdb.40.1409256362121; Thu, 28 Aug 2014 13:06:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp290161vcb; Thu, 28 Aug 2014 13:06:01 -0700 (PDT) X-Received: by 10.140.101.86 with SMTP id t80mr9514143qge.91.1409256361547; Thu, 28 Aug 2014 13:06:01 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id r3si7173695qac.40.2014.08.28.13.06.00 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 28 Aug 2014 13:06:01 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XN5xH-0007gN-Io; Thu, 28 Aug 2014 20:05:59 +0000 Received: from mail-lb0-f170.google.com ([209.85.217.170]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XN5xB-0007gI-R1 for lng-odp@lists.linaro.org; Thu, 28 Aug 2014 20:05:53 +0000 Received: by mail-lb0-f170.google.com with SMTP id w7so1518935lbi.1 for ; Thu, 28 Aug 2014 13:05:47 -0700 (PDT) X-Received: by 10.152.4.39 with SMTP id h7mr6808557lah.49.1409256347658; Thu, 28 Aug 2014 13:05:47 -0700 (PDT) Received: from localhost.localdomain ([37.190.71.193]) by mx.google.com with ESMTPSA id ai1sm7516027lbd.12.2014.08.28.13.05.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 13:05:46 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 29 Aug 2014 00:05:40 +0400 Message-Id: <1409256340-12104-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 X-Topics: patch Subject: [lng-odp] [PATCHv2] arm: do not use dmb for armv5 X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Original bug: https://bugs.linaro.org/show_bug.cgi?id=355 Armv5 fails on compilation dmb instuction. Use the same thing like linux kernel does. Signed-off-by: Maxim Uvarov Reviewed-and-Tested-by: Yao Zhao --- v2: add missing ; platform/linux-generic/include/api/odp_sync.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/include/api/odp_sync.h b/platform/linux-generic/include/api/odp_sync.h index 9cf4d46..fbf9abd 100644 --- a/platform/linux-generic/include/api/odp_sync.h +++ b/platform/linux-generic/include/api/odp_sync.h @@ -31,9 +31,16 @@ static inline void odp_sync_stores(void) __asm__ __volatile__ ("sfence\n" : : : "memory"); -#elif defined __arm__ || defined __aarch64__ +#elif defined(__arm__) +#if __ARM_ARCH == 6 + __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ + : : "r" (0) : "memory"); +#elif __ARM_ARCH >= 7 || defined __aarch64__ __asm__ __volatile__ ("dmb st" : : : "memory"); +#else + __asm__ __volatile__ ("" : : : "memory"); +#endif #elif defined __OCTEON__