From patchwork Fri Feb 5 08:56:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 61261 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp958444lbl; Fri, 5 Feb 2016 00:58:39 -0800 (PST) X-Received: by 10.107.2.215 with SMTP id 206mr8499955ioc.55.1454662719382; Fri, 05 Feb 2016 00:58:39 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e19si26014144ioe.101.2016.02.05.00.58.39; Fri, 05 Feb 2016 00:58:39 -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 B5F8E61945; Fri, 5 Feb 2016 08:58:38 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=GBwcyFxh; 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 9038561CD3; Fri, 5 Feb 2016 08:57:41 +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 9FF8861D25; Fri, 5 Feb 2016 08:57:37 +0000 (UTC) Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by lists.linaro.org (Postfix) with ESMTPS id 9226061D25 for ; Fri, 5 Feb 2016 08:57:04 +0000 (UTC) Received: by mail-pf0-f181.google.com with SMTP id o185so65503065pfb.1 for ; Fri, 05 Feb 2016 00:57:04 -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=V3Ojo8ucF54Z8ismnl+KPt+anna7JxUzwo0R+1pl8zA=; b=GBwcyFxhe9Jo+wjHAEtHdjokI95T3/a5qUyxFRcF2arFz9gm2QmreKTJHwbmEn2iOj E3/y/0LKEWMQXJzd8LjkU0FQ3yLkbfVAi/H8+rIzgyrAw06c1lVsHDGikPdyImgfTFAX MP621Hgy6FIaLfXR3Z9uR7qTPx8/te7mEE6RQ= 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=V3Ojo8ucF54Z8ismnl+KPt+anna7JxUzwo0R+1pl8zA=; b=Rc7Qbxe8ic8ODYv5NUhuTKhkA3IbkOp+C4fxooz05hqesOCXx7UBoExlxCLbejZ5Ni VwVmpLYKsal2dLXwhBmbHr348vTx6IVO0XGOPKmQ1IgP2xt/sNMw0+USKZbwi47cUOKM QFyYvUjYebcs2llCLiri3RrTxAQ08+8FAg1FadVvuPBdG3aPvdv9Bxb6jWVXz3qLT6Zy BvHqtWExMh8pErAdWfWgaromBzsRkJmJqe/U7C8ZtgXN9mS8jxI4ZAYFQIsWgxka4UDC S80OK+mzhbq7u8JJicgQMFEE+/YgI+DsL3P8SW+tYYMk21XZ9ipx+Bd/OkuUCJLPziOb dicA== X-Gm-Message-State: AG10YOQjamFtjvpWK6rqdss+BDsZy5aHDDpNW5+GvBoMBBGMLACJFSGtUWeoJSZNAPSy2dUkJ6Y= X-Received: by 10.98.75.143 with SMTP id d15mr18318923pfj.96.1454662623811; Fri, 05 Feb 2016 00:57:03 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id h89sm18321814pfj.52.2016.02.05.00.57.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Feb 2016 00:57:03 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 5 Feb 2016 16:56:45 +0800 Message-Id: <1454662607-28792-3-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454662607-28792-1-git-send-email-hongbo.zhang@linaro.org> References: <1454662607-28792-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v3 API-NEXT 2/4] linux-generic: separate MIPS 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 MIPS. Signed-off-by: Hongbo Zhang --- platform/linux-generic/arch/mips64/odp/cpu_arch.h | 16 ++++++++++++++++ platform/linux-generic/include/odp/align.h | 4 ---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/arch/mips64/odp/cpu_arch.h b/platform/linux-generic/arch/mips64/odp/cpu_arch.h index 3bfa0dc..303520b 100644 --- a/platform/linux-generic/arch/mips64/odp/cpu_arch.h +++ b/platform/linux-generic/arch/mips64/odp/cpu_arch.h @@ -11,6 +11,22 @@ extern "C" { #endif +/** @ingroup odp_compiler_optim + * @{ + */ + +/** + * @def ODP_CACHE_LINE_SIZE + * Cache line size + */ +#if defined __OCTEON__ +#define ODP_CACHE_LINE_SIZE 128 +#endif + +/** + * @} + */ + static inline void odp_cpu_pause(void) { __asm__ __volatile__ ("nop"); diff --git a/platform/linux-generic/include/odp/align.h b/platform/linux-generic/include/odp/align.h index 161a302..0f11569 100644 --- a/platform/linux-generic/include/odp/align.h +++ b/platform/linux-generic/include/odp/align.h @@ -35,10 +35,6 @@ extern "C" { #define ODP_CACHE_LINE_SIZE 64 -#elif defined __OCTEON__ - -#define ODP_CACHE_LINE_SIZE 128 - #elif defined __powerpc__ #define ODP_CACHE_LINE_SIZE 64