From patchwork Fri Jan 29 08:49:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60780 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp981061lbb; Fri, 29 Jan 2016 00:58:12 -0800 (PST) X-Received: by 10.140.238.88 with SMTP id j85mr9650748qhc.88.1454057892789; Fri, 29 Jan 2016 00:58:12 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i66si12893644qhd.31.2016.01.29.00.58.12; Fri, 29 Jan 2016 00:58:12 -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 52CC966746; Fri, 29 Jan 2016 08:58:12 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=casDC/dL; 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 BD17766734; Fri, 29 Jan 2016 08:57:42 +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 B363366715; Fri, 29 Jan 2016 08:57:34 +0000 (UTC) Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by lists.linaro.org (Postfix) with ESMTPS id 6E6E8611F3 for ; Fri, 29 Jan 2016 08:57:33 +0000 (UTC) Received: by mail-pf0-f178.google.com with SMTP id n128so38699839pfn.3 for ; Fri, 29 Jan 2016 00:57:33 -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=casDC/dLNAB/cBUOl9QU842Cnncu+bHsgAyZ3I4e0wvUDBiJyapTPRwODKyu01teJs 8rhFGYCgcLv6HBEalolq8yCjYcFcO1isRwjvtW9U5bhnonjlgHjLLcHvC0hLU0PNeqB6 Vkqzqbfr7rMuXQV3sM/+Xva130I1Tyvmt48KY= 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=Re7R/N/MO+dKXSAIDVASXD/VwakQfA7fjfoBgPqMDrCSWYEKChdQ3EzFmUgC/rzYuF PjOxLorxOa7fQ9Jcx2F7v8talhA9Xg1tYglqn/pED2q1OY7lydk5bNS+ZMoNUHIT44wl 0rJMHsQ+bl4W+qXa0uBoLSq8j4P0+PO0rYWkTee/J1xLxRFtILuRgIpivVTrLRCie21I CY8R15PEb8hj/W++2XjdofD6PbpVX5wUlc/tHFoOaMX1pEjEHiOXWSXowd09OS0mDy4c xlpVDa9drZ0K1hDk6WCan5sQ/uV65OgypiLwbp/bS84utpiKEFSIHk/SkhGtxZYgtkkp cK4g== X-Gm-Message-State: AG10YORpYZZUGe+uzSdLEDde7WtWdv5XUyBB/fdAbEarGVlbYl/YeqvhIpEdhsLjdOmdCd+HZB8= X-Received: by 10.98.43.73 with SMTP id r70mr11735177pfr.4.1454057852785; Fri, 29 Jan 2016 00:57:32 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id 3sm5878868pfp.96.2016.01.29.00.57.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 00:57:32 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 29 Jan 2016 16:49:41 +0800 Message-Id: <1454057384-32620-2-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454057384-32620-1-git-send-email-hongbo.zhang@linaro.org> References: <1454057384-32620-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH 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 * @{