[RFC,01/12] mk: introduce s390x architecture
diff mbox series

Message ID 20190409190630.31975-2-vivkong@ca.ibm.com
State New
Delegated to: Thomas Monjalon
Headers show
Series
  • introduce s390x architecture
Related show

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Vivian Kong April 9, 2019, 7:06 p.m. UTC
Add config and mk files to build DPDK on Linux on IBM Z (s390x).

Signed-off-by: Vivian Kong <vivkong@ca.ibm.com>
---
 config/defconfig_s390x-native-linux-gcc    |  1 +
 config/defconfig_s390x-native-linuxapp-gcc | 33 ++++++++++++++++++++++
 mk/arch/s390x/rte.vars.mk                  | 16 +++++++++++
 mk/rte.cpuflags.mk                         |  5 ++++
 4 files changed, 55 insertions(+)
 create mode 120000 config/defconfig_s390x-native-linux-gcc
 create mode 100644 config/defconfig_s390x-native-linuxapp-gcc
 create mode 100644 mk/arch/s390x/rte.vars.mk

Comments

Luca Boccassi April 9, 2019, 7:38 p.m. UTC | #1
On Tue, 2019-04-09 at 15:06 -0400, Vivian Kong wrote:
> Add config and mk files to build DPDK on Linux on IBM Z (s390x).
> 
> Signed-off-by: Vivian Kong <
> vivkong@ca.ibm.com
> >
> ---
>  config/defconfig_s390x-native-linux-gcc    |  1 +
>  config/defconfig_s390x-native-linuxapp-gcc | 33
> ++++++++++++++++++++++
>  mk/arch/s390x/rte.vars.mk                  | 16 +++++++++++
>  mk/rte.cpuflags.mk                         |  5 ++++
>  4 files changed, 55 insertions(+)
>  create mode 120000 config/defconfig_s390x-native-linux-gcc
>  create mode 100644 config/defconfig_s390x-native-linuxapp-gcc
>  create mode 100644 mk/arch/s390x/rte.vars.mk

Hi,

Please look into adding support for Meson as well. Thanks!
Vivian Kong April 10, 2019, 4:50 p.m. UTC | #2
I'll look into adding that.  Thanks.

Regards,

Vivian Kong
Linux on IBM Z Open Source Ecosystem
IBM Canada Toronto Lab

Luca Boccassi <bluca@debian.org> wrote on 2019/04/09 03:38:45 PM:

> From: Luca Boccassi <bluca@debian.org>
> To: vivkong@ca.ibm.com, dev@dpdk.org
> Date: 2019/04/09 03:38 PM
> Subject: Re: [dpdk-dev] [RFC 01/12] mk: introduce s390x architecture
>
> On Tue, 2019-04-09 at 15:06 -0400, Vivian Kong wrote:
> > Add config and mk files to build DPDK on Linux on IBM Z (s390x).
> >
> > Signed-off-by: Vivian Kong <
> > vivkong@ca.ibm.com
> > >
> > ---
> >  config/defconfig_s390x-native-linux-gcc    |  1 +
> >  config/defconfig_s390x-native-linuxapp-gcc | 33
> > ++++++++++++++++++++++
> >  mk/arch/s390x/rte.vars.mk                  | 16 +++++++++++
> >  mk/rte.cpuflags.mk                         |  5 ++++
> >  4 files changed, 55 insertions(+)
> >  create mode 120000 config/defconfig_s390x-native-linux-gcc
> >  create mode 100644 config/defconfig_s390x-native-linuxapp-gcc
> >  create mode 100644 mk/arch/s390x/rte.vars.mk
>
> Hi,
>
> Please look into adding support for Meson as well. Thanks!
>
> --
> Kind regards,
> Luca Boccassi
>

Patch
diff mbox series

diff --git a/config/defconfig_s390x-native-linux-gcc b/config/defconfig_s390x-native-linux-gcc
new file mode 120000
index 000000000..28b9275cf
--- /dev/null
+++ b/config/defconfig_s390x-native-linux-gcc
@@ -0,0 +1 @@ 
+defconfig_s390x-native-linuxapp-gcc
\ No newline at end of file
diff --git a/config/defconfig_s390x-native-linuxapp-gcc b/config/defconfig_s390x-native-linuxapp-gcc
new file mode 100644
index 000000000..1241157d9
--- /dev/null
+++ b/config/defconfig_s390x-native-linuxapp-gcc
@@ -0,0 +1,33 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# (c) Copyright IBM Corp. 2018, 2019
+
+#include "common_linux"
+
+CONFIG_RTE_MACHINE="z13"
+
+CONFIG_RTE_ARCH="s390x"
+CONFIG_RTE_ARCH_64=y
+CONFIG_RTE_ARCH_S390X=y
+
+#CONFIG_RTE_MAX_LCORE=256
+#CONFIG_RTE_MAX_NUMA_NODES=32
+#CONFIG_RTE_CACHE_LINE_SIZE=128
+
+CONFIG_RTE_TOOLCHAIN="gcc"
+CONFIG_RTE_TOOLCHAIN_GCC=y
+CONFIG_RTE_FORCE_INTRINSICS=y
+# Note: Power doesn't have this support
+CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=n
+
+# Note: Initially, all of the PMD drivers compilation are turned off on s390x
+# Will turn on them only after the successful testing on s390x
+CONFIG_RTE_LIBRTE_IXGBE_PMD=n
+CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
+CONFIG_RTE_LIBRTE_VMXNET3_PMD=n
+CONFIG_RTE_LIBRTE_ENIC_PMD=n
+CONFIG_RTE_LIBRTE_FM10K_PMD=n
+CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n
+CONFIG_RTE_LIBRTE_AVP_PMD=n
+CONFIG_RTE_LIBRTE_BNXT_PMD=n
+CONFIG_RTE_LIBRTE_ENETC_PMD=n
diff --git a/mk/arch/s390x/rte.vars.mk b/mk/arch/s390x/rte.vars.mk
new file mode 100644
index 000000000..9740c5684
--- /dev/null
+++ b/mk/arch/s390x/rte.vars.mk
@@ -0,0 +1,16 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# (c) Copyright IBM Corp. 2018, 2019
+
+ARCH  ?= s390
+CROSS ?=
+
+CPU_CFLAGS  ?= -m64
+CPU_LDFLAGS ?=
+CPU_ASFLAGS ?= -felf64
+
+export ARCH CROSS CPU_CFLAGS CPU_LDFLAGS CPU_ASFLAGS
+
+RTE_OBJCOPY_TARGET = elf64-s390
+RTE_OBJCOPY_ARCH = s390
+
+export RTE_OBJCOPY_TARGET RTE_OBJCOPY_ARCH
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index 541211c61..195022926 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -93,6 +93,11 @@  ifneq ($(filter $(AUTO_CPUFLAGS),__builtin_vsx_xvnmaddadp),)
 CPUFLAGS += VSX
 endif
 
+# s390x
+ifneq ($(filter $(AUTO_CPUFLAGS),__s390x__),)
+CPUFLAGS += ZARCH
+endif
+
 # ARM flags
 ifneq ($(filter __ARM_NEON __aarch64__,$(AUTO_CPUFLAGS)),)
 CPUFLAGS += NEON