From patchwork Thu Aug 28 16:54:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 36250 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D2D17202DD for ; Thu, 28 Aug 2014 16:54:50 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wn1sf9015395obc.6 for ; Thu, 28 Aug 2014 09:54:50 -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=PiX6MCBd4MFRiL7y56YaU1KFD/qTmjKeGLFxkXDO1Co=; b=hhkfb82Q+dz8NYaUcrYkmyw2/pIgyVlt4ocPNVxpz5/UN4lPGm0t9cwhLVzdKpigVX 2AHJKZmT1qLIPIPrvGM41z+8lalpGG26Mcb+jSI47uSipMLfZ1Q/ZkJQ2SCqi03b0fh9 q+Z5Vj09lyB8SGhIXzAentQeDFasBYHNNrJ46tEMvsKP/DEaY1bnNOiXI5AVdZKNwT/H rZl4ber+Kmfat8VVG2wK4ABPvapvw0uPZFlyVgb7Z2Mo/psdUiTaXU48racXaUkUCY7c 5KczmMDpb4eO3LqLyS9+5pRHJ/YqX9UXhFnvOTvmTTtNzj3v11g4QMRDJxFwF0VD+DEu Oqnw== X-Gm-Message-State: ALoCoQl4t7rE30ZXnOgirab/Pb9Iod/kva1oNgG9SnkI62YuxwqsdRAVQqs9wf/Cr3WfKWoXHBpa X-Received: by 10.50.80.111 with SMTP id q15mr3375878igx.0.1409244890458; Thu, 28 Aug 2014 09:54:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.10 with SMTP id u10ls729312qgu.64.gmail; Thu, 28 Aug 2014 09:54:50 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr2194131vcq.50.1409244890304; Thu, 28 Aug 2014 09:54:50 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id lr17si4264490vdb.24.2014.08.28.09.54.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 09:54:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id id10so1151272vcb.16 for ; Thu, 28 Aug 2014 09:54:50 -0700 (PDT) X-Received: by 10.221.5.137 with SMTP id og9mr4779746vcb.18.1409244890229; Thu, 28 Aug 2014 09:54:50 -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 uj3csp267385vcb; Thu, 28 Aug 2014 09:54:49 -0700 (PDT) X-Received: by 10.224.115.12 with SMTP id g12mr8349058qaq.3.1409244889764; Thu, 28 Aug 2014 09:54:49 -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 c30si6337280qgf.66.2014.08.28.09.54.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 28 Aug 2014 09:54:49 -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 1XN2yF-0001NY-Cv; Thu, 28 Aug 2014 16:54:47 +0000 Received: from mail-la0-f42.google.com ([209.85.215.42]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XN2y9-0001Io-Tj for lng-odp@lists.linaro.org; Thu, 28 Aug 2014 16:54:42 +0000 Received: by mail-la0-f42.google.com with SMTP id mc6so1310376lab.29 for ; Thu, 28 Aug 2014 09:54:35 -0700 (PDT) X-Received: by 10.112.202.106 with SMTP id kh10mr5443277lbc.66.1409244874993; Thu, 28 Aug 2014 09:54:34 -0700 (PDT) Received: from localhost.localdomain ([37.190.71.193]) by mx.google.com with ESMTPSA id y5sm2708556laa.20.2014.08.28.09.54.32 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 09:54:33 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 28 Aug 2014 20:54:16 +0400 Message-Id: <1409244856-10157-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] [PATCH] 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.171 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. CC: Yao Zhao Signed-off-by: Maxim Uvarov --- Hi Yao, Can you please test this patch? Thank you, Maxim. 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..89bd307 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__