From patchwork Fri May 2 19:47:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 29589 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9536C202E7 for ; Fri, 2 May 2014 19:48:36 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id r5sf16265738qcx.9 for ; Fri, 02 May 2014 12:48:36 -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=OIi3zn5HcRBAEXXYj6IzQbqxdhG88teGdxS50VsLIXU=; b=hILjnpkpCJGp12rVixJpPqtE9iGzP3pVLXQwcSWckKBFQUJ5yLT3rqByFgLh75CKyq ubmSJZgOdghPJWqQhYneFmP3X+FIWj6N1kHHmOATcH3U79Axmcxw/Cw5zwfxTZ49gSG/ PsUd2K35Dv7GLZfbhBIB2//NlFcjeaKKj/5jRYwiv90HVFLqOAuPaeD1DSDcs7y7Alg9 BqtlyO4eWviETMpibcjU9kbDolCSzjE1YT8CTesDppmnOUfzakp1Dv9hS8rCf5jZrev8 +NMWf/sfC1OJefRAPFR2aDX5Zx6q13St/IXRfMQcYwpRnNXtbJ/zQXMi5ME2Ox6XGagD a5nw== X-Gm-Message-State: ALoCoQk3r3yM2vfR/PLrI3d2NMmWvPKGmsa7jDPSzeDtDEcOJPGZ7oiGvcDpnYChKBP4qalxTsN5 X-Received: by 10.236.45.41 with SMTP id o29mr9023774yhb.13.1399060116304; Fri, 02 May 2014 12:48:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.87 with SMTP id v81ls1914634qge.0.gmail; Fri, 02 May 2014 12:48:36 -0700 (PDT) X-Received: by 10.52.12.36 with SMTP id v4mr12390774vdb.20.1399060116176; Fri, 02 May 2014 12:48:36 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id ls10si6944025vec.64.2014.05.02.12.48.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 12:48:36 -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.181; Received: by mail-vc0-f181.google.com with SMTP id hy4so5977064vcb.12 for ; Fri, 02 May 2014 12:48:36 -0700 (PDT) X-Received: by 10.221.30.14 with SMTP id sa14mr1076254vcb.44.1399060116045; Fri, 02 May 2014 12:48:36 -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 ib8csp127508vcb; Fri, 2 May 2014 12:48:34 -0700 (PDT) X-Received: by 10.224.24.66 with SMTP id u2mr7446751qab.84.1399060114544; Fri, 02 May 2014 12:48:34 -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 t1si14679609qga.22.2014.05.02.12.48.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 02 May 2014 12:48:34 -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 1WgJR9-0006ov-7u; Fri, 02 May 2014 19:47:59 +0000 Received: from mail-lb0-f174.google.com ([209.85.217.174]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WgJQu-0006nW-1p for lng-odp@lists.linaro.org; Fri, 02 May 2014 19:47:44 +0000 Received: by mail-lb0-f174.google.com with SMTP id n15so1621845lbi.33 for ; Fri, 02 May 2014 12:48:12 -0700 (PDT) X-Received: by 10.112.137.5 with SMTP id qe5mr13705027lbb.16.1399060092232; Fri, 02 May 2014 12:48:12 -0700 (PDT) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id q4sm34804983lbh.20.2014.05.02.12.48.06 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 02 May 2014 12:48:07 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Fri, 2 May 2014 21:47:47 +0200 Message-Id: <1399060067-22104-5-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1399060067-22104-1-git-send-email-anders.roxell@linaro.org> References: <1399060067-22104-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 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;