From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id CA09E1041 for ; Mon, 10 Sep 2018 13:32:48 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id v16-v6so21509898wro.11 for ; Mon, 10 Sep 2018 04:32:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9POZDYJ/c3zmbC7O4K6wLp29q4A5Cw7eWYU/QguNRpA=; b=Sb6eScMp3Nmz8BBD/JpxnPpEMIbdkBy5ypHnUbXTaMg0VGVdXUa+b1A4nqTtGk6MUq xeJhU+JMOpdsH8AmxSI4UWlzi79uX3r1AjIPh4iF9QTvotYwNQbQtwrVSs7gQa9v7pJA AdaMecKUpwhx/xR13XZvOBJZYqLIQ1+iyXJd56BYkoe6LhGeon4BjA3lFoy+Mvle5sY0 HC3yiEUKPYIIxvVHKMPTIGLGyuX6UVRYZ9hvoNvI+Tl5+9Hn8l70ZJmDq8K7ltIGleFV NfKHQALdbeF+yoW9BBjrDKLQqkuHgmfTrAHlq81/SICpduRS5rvCTLAy8IalIhmgk1Zn FKNw== X-Gm-Message-State: APzg51AQTj8c8o+x1rs+AkA2asZx6dqlxm2WmEku8gdkSybN26Wo/32s gvhPuGeA2pIHLfUvIlK9VaoOoXiD X-Google-Smtp-Source: ANB0VdaM5oOAbJtQs/XljoejHzp/zl0Uv4lu+KWL/QClVm142acCL+RgUr87/htgTWRrSHJyefBd/w== X-Received: by 2002:adf:c98d:: with SMTP id f13-v6mr15093249wrh.148.1536579168062; Mon, 10 Sep 2018 04:32:48 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id f18-v6sm13250505wru.51.2018.09.10.04.32.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Sep 2018 04:32:46 -0700 (PDT) From: Luca Boccassi To: dev@dpdk.org Cc: chaozhu@linux.vnet.ibm.com, christian.ehrhardt@canonical.com, bruce.richardson@intel.com, thomas@monjalon.net Date: Mon, 10 Sep 2018 12:32:43 +0100 Message-Id: <20180910113243.18881-1-bluca@debian.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907183502.26164-1-bluca@debian.org> References: <20180907183502.26164-1-bluca@debian.org> Subject: [dpdk-dev] [PATCH v2] build: add PPC64 Meson build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2018 11:32:49 -0000 This has been only build-tested for now, on a native ppc64el POWER8E machine running Debian sid. Signed-off-by: Luca Boccassi --- v2: fix indentation, drop march_opt in ppc build file config/meson.build | 10 +++++++++- config/ppc_64/meson.build | 11 +++++++++++ lib/librte_eal/common/arch/ppc_64/meson.build | 5 +++++ .../common/include/arch/ppc_64/meson.build | 16 ++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 config/ppc_64/meson.build create mode 100644 lib/librte_eal/common/arch/ppc_64/meson.build create mode 100644 lib/librte_eal/common/include/arch/ppc_64/meson.build diff --git a/config/meson.build b/config/meson.build index 4d755323f4..6f9228c874 100644 --- a/config/meson.build +++ b/config/meson.build @@ -9,7 +9,13 @@ else endif dpdk_conf.set('RTE_MACHINE', machine) machine_args = [] -machine_args += '-march=' + machine +# ppc64 does not support -march=native +if host_machine.cpu_family().startswith('ppc') and machine == 'native' + machine_args += '-mcpu=' + machine + machine_args += '-mtune=' + machine +else + machine_args += '-march=' + machine +endif toolchain = cc.get_id() dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) @@ -84,6 +90,8 @@ if host_machine.cpu_family().startswith('x86') arch_subdir = 'x86' elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch') arch_subdir = 'arm' +elif host_machine.cpu_family().startswith('ppc') + arch_subdir = 'ppc_64' endif subdir(arch_subdir) dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags)) diff --git a/config/ppc_64/meson.build b/config/ppc_64/meson.build new file mode 100644 index 0000000000..e207c438bf --- /dev/null +++ b/config/ppc_64/meson.build @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi + +dpdk_conf.set('RTE_ARCH', 'ppc_64') +dpdk_conf.set('RTE_ARCH_PPC_64', 1) +dpdk_conf.set('RTE_ARCH_64', 1) + +# overrides specific to ppc64 +dpdk_conf.set('RTE_MAX_LCORE', 256) +dpdk_conf.set('RTE_MAX_NUMA_NODES', 32) +dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128) diff --git a/lib/librte_eal/common/arch/ppc_64/meson.build b/lib/librte_eal/common/arch/ppc_64/meson.build new file mode 100644 index 0000000000..40b3dc533a --- /dev/null +++ b/lib/librte_eal/common/arch/ppc_64/meson.build @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi + +eal_common_arch_sources = files('rte_cpuflags.c', + 'rte_cycles.c', 'rte_hypervisor.c') diff --git a/lib/librte_eal/common/include/arch/ppc_64/meson.build b/lib/librte_eal/common/include/arch/ppc_64/meson.build new file mode 100644 index 0000000000..00f9611768 --- /dev/null +++ b/lib/librte_eal/common/include/arch/ppc_64/meson.build @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi + +install_headers( + 'rte_atomic.h', + 'rte_byteorder.h', + 'rte_cpuflags.h', + 'rte_cycles.h', + 'rte_io.h', + 'rte_memcpy.h', + 'rte_pause.h', + 'rte_prefetch.h', + 'rte_rwlock.h', + 'rte_spinlock.h', + 'rte_vect.h', + subdir: get_option('include_subdir_arch')) -- 2.18.0