From patchwork Fri Apr 25 12:14:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 29066 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 88A5F203AC for ; Fri, 25 Apr 2014 12:15:51 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id pa12sf14237368veb.4 for ; Fri, 25 Apr 2014 05:15:51 -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:in-reply-to :references: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=2xIRHMtpWowgXM8vmzGyrlugWhfuFyDzbxONr5rEbmA=; b=DEW+M0tXJT3r/5EWs4VvuH5cRvt8O3xdKtNYZlYA/0nCJKD9MQlfQ8UKP8yxJEx9Yw /H6hCVbChZ1sqm1xsLbWwzhawbXIu+/UISyoJWX1O0AwCsCS8sYVpV8CtAg4Gj8LYZXv C3grtFbZHxV9IvgjRWX+8hQ0GZLdOSYjynulJKf6h9gjLcgfOpKhNkC+OzILDJwkjUAf yD+YmCQLMi5Big6CAlokw0nnSE1b/00RQSMQ/dbKt523rijN2X5rdTRDELGN+SLpgoB4 dQGWt3TSGAlv6bJTQQGa2dDF8QsUaZ+NrYZIL9RxjRgv/Xt2nMC6om5d7O3qWmumCzc2 SLVw== X-Gm-Message-State: ALoCoQnT4Fh9/Gj7YMtp/He0eDhTG7FKXR0lUxtOQsmgYdhCWxvZXtwJDrd0up0hTNDm9xb6K2I/ X-Received: by 10.224.6.198 with SMTP id a6mr4227555qaa.6.1398428151245; Fri, 25 Apr 2014 05:15:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.180 with SMTP id w49ls1586092qge.3.gmail; Fri, 25 Apr 2014 05:15:51 -0700 (PDT) X-Received: by 10.58.195.202 with SMTP id ig10mr312937vec.33.1398428151110; Fri, 25 Apr 2014 05:15:51 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id sq9si1654268vdc.17.2014.04.25.05.15.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Apr 2014 05:15:51 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ld13so4558453vcb.19 for ; Fri, 25 Apr 2014 05:15:51 -0700 (PDT) X-Received: by 10.52.126.107 with SMTP id mx11mr142440vdb.41.1398428151034; Fri, 25 Apr 2014 05:15:51 -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.220.221.72 with SMTP id ib8csp93010vcb; Fri, 25 Apr 2014 05:15:50 -0700 (PDT) X-Received: by 10.140.93.198 with SMTP id d64mr10401118qge.1.1398428150668; Fri, 25 Apr 2014 05:15:50 -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 v10si3696580qat.231.2014.04.25.05.15.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 25 Apr 2014 05:15:50 -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 1Wdf2M-0006hV-0T; Fri, 25 Apr 2014 12:15:26 +0000 Received: from mail-la0-f54.google.com ([209.85.215.54]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wdf23-0006d7-45 for lng-odp@lists.linaro.org; Fri, 25 Apr 2014 12:15:07 +0000 Received: by mail-la0-f54.google.com with SMTP id e16so2739859lan.13 for ; Fri, 25 Apr 2014 05:15:24 -0700 (PDT) X-Received: by 10.152.6.194 with SMTP id d2mr221685laa.54.1398428124866; Fri, 25 Apr 2014 05:15:24 -0700 (PDT) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id rd5sm7972427lbb.0.2014.04.25.05.15.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Apr 2014 05:15:24 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Fri, 25 Apr 2014 14:14:37 +0200 Message-Id: <1398428077-32199-5-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398428077-32199-1-git-send-email-anders.roxell@linaro.org> References: <1398428077-32199-1-git-send-email-anders.roxell@linaro.org> Subject: [lng-odp] [PATCH 4/4] linux-generic: asm comatible with -std=c99 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: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 Signed-off-by: Anders Roxell --- platform/linux-generic/include/odp_spin_internal.h | 30 +++++++++++----------- platform/linux-generic/source/odp_time.c | 4 +-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/platform/linux-generic/include/odp_spin_internal.h b/platform/linux-generic/include/odp_spin_internal.h index 1061e52..ec04e3c 100644 --- a/platform/linux-generic/include/odp_spin_internal.h +++ b/platform/linux-generic/include/odp_spin_internal.h @@ -19,7 +19,7 @@ extern "C" { */ static inline void odp_mem_barrier(void) { - asm __volatile__ ("" : : : "memory"); + __asm__ __volatile__ ("" : : : "memory"); } @@ -31,30 +31,30 @@ static inline void odp_spin(void) #if defined __x86_64__ || defined __i386__ #ifdef __SSE2__ - asm __volatile__ ("pause"); + __asm__ __volatile__ ("pause"); #else - asm __volatile__ ("rep; nop"); + __asm__ __volatile__ ("rep; nop"); #endif #elif defined __arm__ #if __ARM_ARCH == 7 - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); #endif #elif defined __OCTEON__ - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); - asm __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); #endif } diff --git a/platform/linux-generic/source/odp_time.c b/platform/linux-generic/source/odp_time.c index 4f5e507..181294a 100644 --- a/platform/linux-generic/source/odp_time.c +++ b/platform/linux-generic/source/odp_time.c @@ -23,7 +23,7 @@ uint64_t odp_time_get_cycles(void) }; } tsc; - asm volatile("rdtsc" : + __asm__ __volatile__ ("rdtsc" : "=a" (tsc.lo_32), "=d" (tsc.hi_32) : : "memory"); @@ -39,7 +39,7 @@ uint64_t odp_time_get_cycles(void) #define CVMX_TMP_STR2(x) #x uint64_t cycle; - asm __volatile__ ("rdhwr %[rt],$" CVMX_TMP_STR(31) : + __asm__ __volatile__ ("rdhwr %[rt],$" CVMX_TMP_STR(31) : [rt] "=d" (cycle) : : "memory"); return cycle;