From patchwork Fri Jan 29 11:22:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60787 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1054377lbb; Fri, 29 Jan 2016 03:32:47 -0800 (PST) X-Received: by 10.107.3.88 with SMTP id 85mr9211944iod.101.1454067167823; Fri, 29 Jan 2016 03:32:47 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k13si25774872iod.72.2016.01.29.03.32.47; Fri, 29 Jan 2016 03:32:47 -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 EBA4161D49; Fri, 29 Jan 2016 11:32:46 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=GXZ+IbwG; 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 2D3D6619EC; Fri, 29 Jan 2016 11:31:12 +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 E337D61A07; Fri, 29 Jan 2016 11:31:06 +0000 (UTC) Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by lists.linaro.org (Postfix) with ESMTPS id 63109616CA for ; Fri, 29 Jan 2016 11:30:05 +0000 (UTC) Received: by mail-pf0-f174.google.com with SMTP id x125so41201111pfb.0 for ; Fri, 29 Jan 2016 03:30:05 -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=twvamtqgZobXk01cadRljBAmx5PrYUhKfJVDHOvrQ3k=; b=GXZ+IbwGA5MoM+M+RBJ3eYgepGt2NHyEdPIFPstsru9JuQ6S9RFYGN3TzulWEQlJCA NVJ0HrqwXOHAXRuHRXRT4J9yz1gAs1GyNm+NqtFglCT093Wq+M7IwNKmXhLYwDwbXpzI G2+cjRTYidhdqNLINnV1WOjFMBuyUuUZuGXLE= 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=twvamtqgZobXk01cadRljBAmx5PrYUhKfJVDHOvrQ3k=; b=PlKQpk5/dF4/w7bYb8GxBkwKfoxi1SBEj7VnY2g6XXCaNx8Xf6xCwesVrcei5AqAZL xPR/ZUq1CgLEA7dzjwQqcJwl6H6JHHvpnPvDlVar40SBEkWBs00mNNN/LjhE96dI0sHe JcFFh05oHMioJFWZMKLit5mV2QycOhUiGXHOTj4yy+C3lFhFtiGweBwsMTPeihKLaGWI yWSYjl6UG8gn9XJSGZ4gMxVDeEi8i2vWicKKOgxFohB7KELoo02hIOO0wx8Yf1uXLxF7 pymigdThL8cn8MUUjB5zn2nZdYO7g0oNok4hY3p4VxHpkc/GhhgWq5fHSL8WFcg5vVAg mkSw== X-Gm-Message-State: AG10YOT9x5oF+g003EhANk4wp73tLrOz9yF9iTHe7dWYTfgXyM/NThKmwRxySUZI8pBE7L8P7LM= X-Received: by 10.98.71.147 with SMTP id p19mr9689137pfi.165.1454067004754; Fri, 29 Jan 2016 03:30:04 -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.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 03:30:04 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 29 Jan 2016 19:22:14 +0800 Message-Id: <1454066534-32694-5-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: patch Subject: [lng-odp] [PATCH v2 API-NEXT 4/4] linux-generic: create ARM files and move ARM ODP_CACHE_LINE_SIZE in it 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. And in the legacy codes there was no ARM architecture directory, so this patch create it, the odp_cpu_arch.c and odp_sysinfo_parse.c are still symlink to the general default ones under arch/linux/, and a real file arm/odp/cpu_arch.h is created from the linux/odp/cpu_arch.h, and then the ODP_CACHE_LINE_SIZE for ARM is moved to this arch specific file. Signed-off-by: Hongbo Zhang --- configure.ac | 1 + platform/linux-generic/Makefile.am | 2 ++ platform/linux-generic/arch/arm/odp/cpu_arch.h | 24 ++++++++++++++++++++++ platform/linux-generic/arch/arm/odp_cpu_arch.c | 1 + .../linux-generic/arch/arm/odp_sysinfo_parse.c | 1 + platform/linux-generic/include/odp/align.h | 6 ------ 6 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 platform/linux-generic/arch/arm/odp/cpu_arch.h create mode 120000 platform/linux-generic/arch/arm/odp_cpu_arch.c create mode 120000 platform/linux-generic/arch/arm/odp_sysinfo_parse.c diff --git a/configure.ac b/configure.ac index 14a025e..555523f 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,7 @@ AX_VALGRIND_CHECK ########################################################################## AS_CASE([$host], [x86*], [ARCH=x86], + [arm*], [ARCH=arm], [mips64*], [ARCH=mips64], [powerpc*], [ARCH=powerpc], [ARCH=linux] diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index fded462..435d776 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -167,6 +167,8 @@ __LIB__libodp_la_SOURCES = \ EXTRA_DIST = \ arch/linux/odp_cpu_arch.c \ arch/linux/odp_sysinfo_parse.c \ + arch/arm/odp_cpu_arch.c \ + arch/arm/odp_sysinfo_parse.c \ arch/mips64/odp_cpu_arch.c \ arch/mips64/odp_sysinfo_parse.c \ arch/powerpc/odp_cpu_arch.c \ diff --git a/platform/linux-generic/arch/arm/odp/cpu_arch.h b/platform/linux-generic/arch/arm/odp/cpu_arch.h new file mode 100644 index 0000000..e56523f --- /dev/null +++ b/platform/linux-generic/arch/arm/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/arch/arm/odp_cpu_arch.c b/platform/linux-generic/arch/arm/odp_cpu_arch.c new file mode 120000 index 0000000..c5fe400 --- /dev/null +++ b/platform/linux-generic/arch/arm/odp_cpu_arch.c @@ -0,0 +1 @@ +../linux/odp_cpu_arch.c \ No newline at end of file diff --git a/platform/linux-generic/arch/arm/odp_sysinfo_parse.c b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c new file mode 120000 index 0000000..2f368af --- /dev/null +++ b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c @@ -0,0 +1 @@ +../linux/odp_sysinfo_parse.c \ No newline at end of file diff --git a/platform/linux-generic/include/odp/align.h b/platform/linux-generic/include/odp/align.h index 75c02ae..81ef20f 100644 --- a/platform/linux-generic/include/odp/align.h +++ b/platform/linux-generic/include/odp/align.h @@ -31,12 +31,6 @@ extern "C" { #define ODP_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member) -#if defined __arm__ || defined __aarch64__ - -#define ODP_CACHE_LINE_SIZE 64 - -#endif - #else #error Non-gcc compatible compiler #endif