From patchwork Fri Jan 29 11:22:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60784 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1053397lbb; Fri, 29 Jan 2016 03:30:43 -0800 (PST) X-Received: by 10.50.155.102 with SMTP id vv6mr9666871igb.0.1454067043258; Fri, 29 Jan 2016 03:30:43 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u8si10167291igz.30.2016.01.29.03.30.41; Fri, 29 Jan 2016 03:30:43 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 03CC066739; Fri, 29 Jan 2016 11:30:41 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=f1MaBsHS; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CD71161A0A; Fri, 29 Jan 2016 11:30:03 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id F35D0619EC; Fri, 29 Jan 2016 11:29:59 +0000 (UTC) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by lists.linaro.org (Postfix) with ESMTPS id 9D6EC616CA for ; Fri, 29 Jan 2016 11:29:58 +0000 (UTC) Received: by mail-pa0-f48.google.com with SMTP id ho8so40201578pac.2 for ; Fri, 29 Jan 2016 03:29:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WuEsb3fnHsvtNrJbDxcTT9LwHp6wHXS5mciukRns/N8=; b=f1MaBsHSDTw1uvBKXAnZ/nWBTYP2cUwrWZT2cqkdvHnshLbn583H7gNxqOCZVRS1us kVAdSEXeebm5HHAvK2o7uUh0GQ5Kvp7knkFLYjst6FtubjVUyDGBHLQx+BREMo+mEXaN uBqOs1385+v2xnsPWo7N+g7469PruM/eqV2qc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WuEsb3fnHsvtNrJbDxcTT9LwHp6wHXS5mciukRns/N8=; b=CHRWJnYFAQ1i4QrOR/v0zCQcBIOSCVMxgtejQ5R37meGz+zIQ6Z3SwXlKctieAksi1 QtaM0kqMrE1KWw9ud3RqbGfQc6ZnoizcIu9OwnGCHb5g50Y0ovnpG1Zkg2XqDwwyAl/L 3n2q/JlZpCnmZukLMHWqCj9l8YzpjurBvBRbdIRJhQcL+amCe7uM3chrEWp5ZBw5N6gX zzsSjIZt3B3BcCLrY4vZGqJZVC8wP6xQkaz0+KH+uWIMt2ZCf8o4HtdFBkBKkCMVm+Oy A5nTbURJyawSNY48O9fu/Nyuxhkb5pw9RvhutIP0MyTRKKvmfMP6HYNtEBUKUgvKb210 YC0g== X-Gm-Message-State: AG10YOSV+51I2/8YkSjyBJeXMN3172vgB8dMSYArmhM585A4IKZxKC47BDe6vDTglQCRoI5PYgM= X-Received: by 10.66.124.200 with SMTP id mk8mr12521229pab.43.1454066998043; Fri, 29 Jan 2016 03:29:58 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id n8sm22957133pfj.46.2016.01.29.03.29.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 03:29:57 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 29 Jan 2016 19:22:11 +0800 Message-Id: <1454066534-32694-2-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454066534-32694-1-git-send-email-hongbo.zhang@linaro.org> References: <1454066534-32694-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v2 API-NEXT 1/4] linux-generic: separate x86 ODP_CACHE_LINE_SIZE to its arch file X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" From: Hongbo Zhang Currently all ODP_CACHE_LINE_SIZE macros for different architectures are held in one header file, they should be moved to their own arch file. This patch moves ODP_CACHE_LINE_SIZE for x86. Signed-off-by: Hongbo Zhang --- platform/linux-generic/arch/x86/odp/cpu_arch.h | 2 ++ platform/linux-generic/include/odp/align.h | 8 +------- platform/linux-generic/include/odp_align_internal.h | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/platform/linux-generic/arch/x86/odp/cpu_arch.h b/platform/linux-generic/arch/x86/odp/cpu_arch.h index 997a954..24903ac 100644 --- a/platform/linux-generic/arch/x86/odp/cpu_arch.h +++ b/platform/linux-generic/arch/x86/odp/cpu_arch.h @@ -11,6 +11,8 @@ extern "C" { #endif +#define ODP_CACHE_LINE_SIZE 64 + static inline void odp_cpu_pause(void) { #ifdef __SSE2__ diff --git a/platform/linux-generic/include/odp/align.h b/platform/linux-generic/include/odp/align.h index be8c9ae..4e045c6 100644 --- a/platform/linux-generic/include/odp/align.h +++ b/platform/linux-generic/include/odp/align.h @@ -31,11 +31,7 @@ extern "C" { #define ODP_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member) -#if defined __x86_64__ || defined __i386__ - -#define ODP_CACHE_LINE_SIZE 64 - -#elif defined __arm__ || defined __aarch64__ +#if defined __arm__ || defined __aarch64__ #define ODP_CACHE_LINE_SIZE 64 @@ -47,8 +43,6 @@ extern "C" { #define ODP_CACHE_LINE_SIZE 64 -#else -#error GCC target not found #endif #else diff --git a/platform/linux-generic/include/odp_align_internal.h b/platform/linux-generic/include/odp_align_internal.h index 4ca5ceb..99788e3 100644 --- a/platform/linux-generic/include/odp_align_internal.h +++ b/platform/linux-generic/include/odp_align_internal.h @@ -18,6 +18,7 @@ extern "C" { #endif #include +#include /** @addtogroup odp_compiler_optim * @{