From patchwork Wed Mar 2 19:29:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 63411 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2559145lbc; Wed, 2 Mar 2016 11:31:51 -0800 (PST) X-Received: by 10.140.92.56 with SMTP id a53mr3853285qge.10.1456947111225; Wed, 02 Mar 2016 11:31:51 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v8si10808283qhb.5.2016.03.02.11.31.50; Wed, 02 Mar 2016 11:31:51 -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 C135462F1D; Wed, 2 Mar 2016 19:31:50 +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 22A6762FC4; Wed, 2 Mar 2016 19:30:53 +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 7C3FC650ED; Wed, 2 Mar 2016 19:30:45 +0000 (UTC) Received: from mail-qg0-f49.google.com (mail-qg0-f49.google.com [209.85.192.49]) by lists.linaro.org (Postfix) with ESMTPS id C641262297 for ; Wed, 2 Mar 2016 19:30:18 +0000 (UTC) Received: by mail-qg0-f49.google.com with SMTP id u110so48572958qge.3 for ; Wed, 02 Mar 2016 11:30:18 -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=q4n8UVfuqe/lFBGn495pfSV4HaaaxFOXQXDUM1vqVdA=; b=WDm4EZkQjoJ+uu8IGdKmCUmMrP2rOtniaY42gleWxuNtblzw4eRCvY4552OPBgWpzl fiDDifUA8nYqMmj6QiuA0JX4DzrhzrOZSBP3MlFjshIi/uQqjYR3KuzDV2A/WLRzRraU F62b/XaVjgvBUTuLcqHzyQ1kjDVJKBJHvOmExL/NLVA29l705S5y0UEXVdfrBOKnjYml 1rKSarR5F3MgqHpZgbP8zY3jKzPxq7Bs2f3Fps5shzRn+fxdAHYgSJ2T5qJdJ6kNw0Xm wUh0STsRhMlUoumJDMifaH66z1+7m1BGEMKwBACFI5nE8Sz/Qyz1HMEhTmLzYCRD65xe GL6g== X-Gm-Message-State: AD7BkJKwxVNwXYn3rnomAxZYqA8QT8zP8lJg58EaryPhdu24HrdJXLlngum+R28DEsOxzUdIStY= X-Received: by 10.140.162.2 with SMTP id i2mr37622875qhi.44.1456947018463; Wed, 02 Mar 2016 11:30:18 -0800 (PST) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id a129sm15527538qkb.45.2016.03.02.11.30.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Mar 2016 11:30:18 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 2 Mar 2016 14:29:47 -0500 Message-Id: <1456946992-19251-4-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456946992-19251-1-git-send-email-mike.holmes@linaro.org> References: <1456946992-19251-1-git-send-email-mike.holmes@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v5 3/8] linux-generic: separate PowerPC 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 PowerPC. The previous arch/powerpc/odp/cpu_arch.h was a symlink to the generic arch/linux/odp/cpu_arch.h, but now this PowerPC header file has more specific content than the generic one, so a real file is created and the ODP_CACHE_LINE_SIZE is added to it. Signed-off-by: Hongbo Zhang Reviewed-and-tested-by: Bill Fischofer --- platform/linux-generic/arch/powerpc/odp/cpu_arch.h | 33 +++++++++++++++++++++- platform/linux-generic/include/odp/align.h | 4 --- 2 files changed, 32 insertions(+), 5 deletions(-) mode change 120000 => 100644 platform/linux-generic/arch/powerpc/odp/cpu_arch.h diff --git a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h deleted file mode 120000 index 0617d7f..0000000 --- a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h +++ /dev/null @@ -1 +0,0 @@ -../../linux/odp/cpu_arch.h \ No newline at end of file diff --git a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h new file mode 100644 index 0000000..29f8889 --- /dev/null +++ b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h @@ -0,0 +1,32 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_PLAT_CPU_ARCH_H_ +#define ODP_PLAT_CPU_ARCH_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @ingroup odp_compiler_optim + * @{ + */ + +#define ODP_CACHE_LINE_SIZE 64 + +/** + * @} + */ + +static inline void odp_cpu_pause(void) +{ +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/include/odp/align.h b/platform/linux-generic/include/odp/align.h index 0f11569..46b30dc 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 __powerpc__ - -#define ODP_CACHE_LINE_SIZE 64 - #endif #else