config: remap flags used for Arm platforms
authorRuifeng Wang <ruifeng.wang@arm.com>
Fri, 11 Sep 2020 15:39:59 +0000 (23:39 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 13 Oct 2020 14:35:48 +0000 (16:35 +0200)
commite9b9739264063bb856965070cb9ca7726d2c4238
treeeb1b88ca480385577c992520de5ecbe9477caca8
parent36029fd6b14f6d3063d8cabc834fb1ff740a32a8
config: remap flags used for Arm platforms

RTE_ARCH_xx flags are used to distinguish platform architectures.
These flags can be used to pick different code paths for different
architectures at compile time.
For Arm platforms, there are 3 flags in use: RTE_ARCH_ARM,
RTE_ARCH_ARMv7 and RTE_ARCH_ARM64.
RTE_ARCH_ARM64 is for 64-bit aarch64 platforms,
and RTE_ARCH_ARM & RTE_ARCH_ARMv7 are for 32-bit platforms.
RTE_ARCH_ARMv7 is for ARMv7 platforms as its name suggested.

The issue is meaning of RTE_ARCH_ARM is not clear enough.
Because no info about platform word length is included in the name.
To make the flag names more clear, a naming scheme is proposed.

RTE_ARCH_ARM (all Arm platforms)
    |
    +----RTE_ARCH_32 (New. 32-bit platforms of all architectures)
    |        |
    |        +----RTE_ARCH_ARMv7 (ARMv7 platforms)
    |        |
    |        +----RTE_ARCH_ARMv8_AARCH32 (aarch32 state on aarch64 machine)
    |
    +----RTE_ARCH_64 (64-bit platforms of all architectures)
             |
             +----RTE_ARCH_ARM64 (64-bit Arm platforms)

RTE_ARCH_32 will be explicitly defined for 32-bit platforms.

To fit into the new naming scheme, current usage of RTE_ARCH_ARM in
project is mapped to (RTE_ARCH_ARM && RTE_ARCH_32).

Matching flags for other architectures are:
RTE_ARCH_X86
    |
    +----RTE_ARCH_32
    |        |
    |        +----RTE_ARCH_I686
    |        |
    |        +----RTE_ARCH_X86_X32
    |
    +----RTE_ARCH_64
             |
             +----RTE_ARCH_X86_64

RTE_ARCH_PPC_64 ---- RTE_ARCH_64

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
13 files changed:
app/test/test_cpuflags.c
app/test/test_xmmt_ops.h
config/arm/meson.build
config/meson.build
drivers/bus/fslmc/qbman/qbman_sys_decl.h
drivers/common/dpaax/compat.h
drivers/net/ixgbe/ixgbe_rxtx.h
drivers/net/virtio/virtio_ethdev.c
lib/librte_acl/meson.build
lib/librte_acl/rte_acl.c
lib/librte_eal/arm/include/rte_vect.h
lib/librte_eal/common/eal_internal_cfg.h
lib/librte_lpm/rte_lpm.h