From patchwork Fri Jan 29 11:22:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60786 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1054147lbb; Fri, 29 Jan 2016 03:32:19 -0800 (PST) X-Received: by 10.50.124.72 with SMTP id mg8mr8702794igb.22.1454067139504; Fri, 29 Jan 2016 03:32:19 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u8si10175434igz.30.2016.01.29.03.32.19; Fri, 29 Jan 2016 03:32:19 -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 CD74061617; Fri, 29 Jan 2016 11:32:18 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=Rs/w+2q2; 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 1CA3561D6F; Fri, 29 Jan 2016 11:30:16 +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 314896171F; Fri, 29 Jan 2016 11:30:13 +0000 (UTC) Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by lists.linaro.org (Postfix) with ESMTPS id 034F36171F for ; Fri, 29 Jan 2016 11:30:03 +0000 (UTC) Received: by mail-pf0-f171.google.com with SMTP id n128so40639870pfn.3 for ; Fri, 29 Jan 2016 03:30:02 -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=s7wsfa9HwNjo4DeCQ1j3IVJkDsVKz4IB8O9/lTmQiGQ=; b=Rs/w+2q2jBK8jsZzbd5z3H2InsE3u6/BvoE6oW22g4yccW7Ik2cEvsINP9jqCiOZn+ RqPJqb81Rkh6TjEjP9XPpiharkktcZSAGPhPHOTE2Ft0MF4n3UvpphdKXgNoIs7bfDcN S1r/IXhHE09mbAelbxvotpxMKXeuWYKwOyYWE= 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=s7wsfa9HwNjo4DeCQ1j3IVJkDsVKz4IB8O9/lTmQiGQ=; b=Q4N3Pu3SZr2icqyHQ/p+/VpN6JOPEV6hzR4KELh5mmM3X7Q9t3uMtIrYjO5dbSskeG MEuJYzqZSlsSH3BZuNAdPp7nHu+krtXwyX7tvyHPSY7Z7gnZ8ocKcgeG1ocoikYVHK8q ROJ24jt8TBv91KCjORKcGU0wAGX6vV4PW4810aefxXg0g8xS4iI+ha6oh5FWu8R3BWfG MVXMPbH+X4z8nc0bWJW2wNP4jFddyw0+avLo3W0Zrsgm5JI8WtIH+IG6IobMXa9FlhP8 WdgAZPVSWHoSCXsIdCjuWDBlf2NUQ+xF2IYfdnJb1Wiqj4bxkYlISCsCkq1g+JYilAQs 4ptA== X-Gm-Message-State: AG10YOTZdUJXPQy2NIy7gGYTHux2DBF55hWnuK/w3X8Zo+O42aPg/fy6epUZlOipqFKkBt2FWsE= X-Received: by 10.98.71.73 with SMTP id u70mr12583744pfa.130.1454067002420; Fri, 29 Jan 2016 03:30:02 -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.30.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 03:30:01 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 29 Jan 2016 19:22:13 +0800 Message-Id: <1454066534-32694-4-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 3/4] 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 --- platform/linux-generic/arch/powerpc/odp/cpu_arch.h | 25 +++++++++++++++++++++- platform/linux-generic/include/odp/align.h | 4 ---- 2 files changed, 24 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..e56523f --- /dev/null +++ b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h @@ -0,0 +1,24 @@ +/* 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 + +#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 6aba925..75c02ae 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