[RFC PATCH v2 7/7] powerpc/selftest: reuse ppc-opcode macros to avoid redundancy
Naveen N. Rao
naveen.n.rao at linux.vnet.ibm.com
Wed Apr 29 02:14:03 AEST 2020
Balamuruhan S wrote:
> Avoid redefining macros to encode ppc instructions instead reuse it from
> ppc-opcode.h, Makefile changes are necessary to compile memcmp_64.S with
> __ASSEMBLY__ defined from selftests.
>
> Signed-off-by: Balamuruhan S <bala24 at linux.ibm.com>
> ---
> .../selftests/powerpc/stringloops/Makefile | 34 ++++++++++++++----
> .../powerpc/stringloops/asm/asm-const.h | 1 +
> .../powerpc/stringloops/asm/ppc-opcode.h | 36 +------------------
> 3 files changed, 29 insertions(+), 42 deletions(-)
> create mode 120000 tools/testing/selftests/powerpc/stringloops/asm/asm-const.h
> mode change 100644 => 120000 tools/testing/selftests/powerpc/stringloops/asm/ppc-opcode.h
>
> diff --git a/tools/testing/selftests/powerpc/stringloops/Makefile b/tools/testing/selftests/powerpc/stringloops/Makefile
> index 7fc0623d85c3..efe76c5a5b94 100644
> --- a/tools/testing/selftests/powerpc/stringloops/Makefile
> +++ b/tools/testing/selftests/powerpc/stringloops/Makefile
> @@ -1,26 +1,44 @@
> # SPDX-License-Identifier: GPL-2.0
> # The loops are all 64-bit code
> -CFLAGS += -I$(CURDIR)
> +GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown")
> +CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR) -I$(CURDIR)/../include
I'm not sure why there are some extra flags added here. Not sure if it
is required for this change, or if they are separate changes. Trying to
build this from 'tools/testing/selftests/powerpc/' with 'make
stringloops' shows slightly different compile flags being used.
- Naveen
More information about the Linuxppc-dev
mailing list