From patchwork Tue Feb 23 08:12:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 62673 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1702588lbl; Tue, 23 Feb 2016 00:15:17 -0800 (PST) X-Received: by 10.140.136.210 with SMTP id 201mr42198524qhi.6.1456215317294; Tue, 23 Feb 2016 00:15:17 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h49si22035298qgf.43.2016.02.23.00.15.17; Tue, 23 Feb 2016 00:15:17 -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 Received: by lists.linaro.org (Postfix, from userid 109) id DF23D62F22; Tue, 23 Feb 2016 08:15:16 +0000 (UTC) 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 DEA0A617F8; Tue, 23 Feb 2016 08:13:55 +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 A482562F0D; Tue, 23 Feb 2016 08:13:51 +0000 (UTC) Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by lists.linaro.org (Postfix) with ESMTPS id CD97B62D49 for ; Tue, 23 Feb 2016 08:13:19 +0000 (UTC) Received: by mail-pf0-f177.google.com with SMTP id e127so108429911pfe.3 for ; Tue, 23 Feb 2016 00:13:19 -0800 (PST) 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=LIEsrLPaKkey3PbtjZQQA6dD9kfD7G/crqcr7qB6qOs=; b=LNs6jISxYbZ99XN+d+a26zgo/wdXNUdiVxofUb3Du4d9CRN82khfU25kZEFG15wW1J Axk6+yaTBQe2ABUFgnGR2BqHMvYBhOjZ6we+2sKpY908/1lSWb9lxq3AER92zJ2AFE3W cI5vUysEUajU7yEOlk1OqcKgiteyXuxHwdYI6T0XKo9DmRXkket8qnpgYx3qpbTdV4Fn qAq2FwuG8XcHKlW1uvOsSh8sbClAyLfbGfYoR1EpxEq3V0Met7u55EldeP45W1RRNNJE 0g/63oNl+H6C/VMSRxkY7N9UgQuBDDfV5lujSU+GOyWPj3rmOX/PjUJ2rJbEBu5yccGc HdCg== X-Gm-Message-State: AG10YORBb7H3f5cef+4akB69egZh5MOyIEobDJT8tALygyCKHnVQvw7/OQPKYQFk7PPCtxtdZBE= X-Received: by 10.98.18.8 with SMTP id a8mr44565045pfj.41.1456215199208; Tue, 23 Feb 2016 00:13:19 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id 17sm41920352pfp.96.2016.02.23.00.13.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Feb 2016 00:13:18 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Tue, 23 Feb 2016 16:12:47 +0800 Message-Id: <1456215173-4456-3-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456215173-4456-1-git-send-email-hongbo.zhang@linaro.org> References: <1456215173-4456-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v4 2/8] 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 Reviewed-and-tested-by: Bill Fischofer --- platform/linux-generic/arch/mips64/odp/cpu_arch.h | 12 ++++++++++++ platform/linux-generic/include/odp/align.h | 4 ---- 2 files changed, 12 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..7b5bfd2 100644 --- a/platform/linux-generic/arch/mips64/odp/cpu_arch.h +++ b/platform/linux-generic/arch/mips64/odp/cpu_arch.h @@ -11,6 +11,18 @@ extern "C" { #endif +/** @ingroup odp_compiler_optim + * @{ + */ + +#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