From patchwork Fri Jan 29 08:49:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60783 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp981536lbb; Fri, 29 Jan 2016 00:59:34 -0800 (PST) X-Received: by 10.140.221.70 with SMTP id r67mr9838713qhb.84.1454057973986; Fri, 29 Jan 2016 00:59:33 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l6si16686666qge.78.2016.01.29.00.59.33; Fri, 29 Jan 2016 00:59:33 -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 8307866715; Fri, 29 Jan 2016 08:59:33 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=i8aeXLcF; 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 A9E4166749; Fri, 29 Jan 2016 08:58:15 +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 077CA615DD; Fri, 29 Jan 2016 08:58:09 +0000 (UTC) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by lists.linaro.org (Postfix) with ESMTPS id 7D7DC6672A for ; Fri, 29 Jan 2016 08:57:40 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id cy9so38330009pac.0 for ; Fri, 29 Jan 2016 00:57:40 -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=i8aeXLcFfTzfqpBC92ctC3KQAJJXfuvCogCvsBGb+2G85QJknWGKUXYRxOCOdPva/N iZD0gQUlyi1fwURxzUdkB2M+6UOAA72cthT+N0UAGG+ogXeErgJ71EeIgSLl5h9jZARL PfjkJl69D8Vb3UliO3UtLj+WAIXkHWyGHVrzQ= 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=YbeJDVZ4xh4a+d1bdhOYmzhKn9kf4unOk8sV9gk2k+q0lCMVgl4LAKh+4NPp04gKDF 8tUe40taz/qO1YPb3q1xwzfbtsdMCwZPvxgCABW0t5NIo8hRgIaHDu4AMqf/9hp8k0nN WJ2BLULERQPgWzQ9ordVkoJy4gHUZFE+maZS1bqzjpNadOWJaBnDm6wfktQ71Cdn3Yx5 0t7t8cwkPB2Q1e2pAiQgsBFSn1tmMHpr2AEUf4XAuTM/kDU3s+BsP64KsFZoFY34Qf1b QNoEOoKgIAzdT5m/d++RgWb42x9Rjuu+niLJEkgMMuTQ2vkIYCKzCSdf5VWrsqVurMgW makg== X-Gm-Message-State: AG10YOT3SA/L0qe35RhINMticflgfgVq7LYeZiAy06BqybIwwUEYGRjXoQtgzkPTIUkVq5/K4oo= X-Received: by 10.66.237.66 with SMTP id va2mr11672994pac.87.1454057859883; Fri, 29 Jan 2016 00:57:39 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id 3sm5878868pfp.96.2016.01.29.00.57.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 00:57:39 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 29 Jan 2016 16:49:44 +0800 Message-Id: <1454057384-32620-5-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454057384-32620-1-git-send-email-hongbo.zhang@linaro.org> References: <1454057384-32620-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 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