CodeSamples: Add arm64 support
cover CodeSamples: Add arm64 support
From 1908602500df34619ec496c787546d5584d01221 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Wed, 12 Jul 2017 00:01:30 +0900
Subject: [PATCH 0/2] CodeSamples: Add arm64 support
Hi Paul,
So, this patch set adds arm64 support for CodeSamples.
Patch 1 is a followup of the previous patch set. I missed the dependency to the custom header file.
Patch 2 is the addition of arm64 support. It is based on arm support files. I appended an "ish" operand to "dmb" in the definition of smp_mp(). Looks like the same change is necessary in arch-arm/arch-arm.h, but this patch doesn't touch it.
Also, I rewrote the definition of get_timestamp() by using clock_gettime() instead of gettimeofday(). For arm64 host, we can expect clock_gettime() is supported.
In Makefile.arch, I chose the flags -mcpu=native and -mtune=native, since this Makefile is intended for native build.
This is compile tested on an ARMv8 host. I didn't have enough time to run all the programs. I tested a few under count/ and defer/ sub-directories.
Thanks. Akira
--
Akira Yokosawa (2):
advsync: Add dependency to $(CUSTOM_HEADER)
CodeSamples: Add arm64 support
CodeSamples/advsync/herd/Makefile | 2 +- CodeSamples/arch-arm64/Makefile.arch | 2 ++ CodeSamples/arch-arm64/arch-arm64.h | 61 ++++++++++++++++++++++++++++++++++++ CodeSamples/depends.mk | 5 +++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 CodeSamples/arch-arm64/Makefile.arch create mode 100644 CodeSamples/arch-arm64/arch-arm64.h
Signature · 1 line
2.7.4
PATCH 1/2 advsync: Add dependency to $(CUSTOM_HEADER)
From 69493e126b70589656c3331d34865d2a57b5cf36 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 9 Jul 2017 12:18:19 +0900
Subject: [PATCH 1/2] advsync: Add dependency to $(CUSTOM_HEADER)
--- CodeSamples/advsync/herd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
CodeSamples/advsync/herd/Makefile +1 -1
@@ -8,7 +8,7 @@ CUSTOM_HEADER := $(wildcard *.h) all: $(LITMUS_OUT) -%.litmus.out: %.litmus +%.litmus.out: %.litmus $(CUSTOM_HEADER) litmus7 -r 1000 -carch X86 -ccopts "$(CCOPTS)" $< > $@ 2>&1 cross-x86: TARGET = X86
Signature · 1 line
2.7.4
PATCH 2/2 CodeSamples: Add arm64 support
In reply to Akira YokosawaFrom 1908602500df34619ec496c787546d5584d01221 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Mon, 10 Jul 2017 23:46:32 +0900
Subject: [PATCH 2/2] CodeSamples: Add arm64 support
--- CodeSamples/arch-arm64/Makefile.arch | 2 ++ CodeSamples/arch-arm64/arch-arm64.h | 61 ++++++++++++++++++++++++++++++++++++ CodeSamples/depends.mk | 5 +++ 3 files changed, 68 insertions(+) create mode 100644 CodeSamples/arch-arm64/Makefile.arch create mode 100644 CodeSamples/arch-arm64/arch-arm64.h
CodeSamples/arch-arm64/Makefile.arch new file +2 -0
@@ -0,0 +1,2 @@ +# http://www.ibm.com/developerworks/wikis/display/hpccentral/Tuning+options+to+consider+with+gcc#Tuningoptionstoconsiderwithgcc-mcpuandmtune +GCC_ARGS=-g -O3 -Wall -mcpu=native -mtune=native
CodeSamples/arch-arm64/arch-arm64.h new file +61 -0
61 lines not on this page · raw message
CodeSamples/depends.mk +5 -0
@@ -10,6 +10,8 @@ else ifeq ($(arch),ppc64) target := ppc64 else ifeq ($(arch),ppc64le) target := ppc64 +else ifeq ($(arch),aarch64) +target := arm64 else ifneq (,$(findstring arm,$(arch))) target := arm else
@@ -27,6 +29,9 @@ arch_depend := $(top)/arch-ppc64/Makefile.arch else ifeq ($(target),arm) api_depend := $(top)/arch-arm/arch-arm.h arch_depend := $(top)/arch-arm/Makefile.arch +else ifeq ($(target),arm64) +api_depend := $(top)/arch-arm64/arch-arm64.h +arch_depend := $(top)/arch-arm64/Makefile.arch else api_depend := arch_depend :=
Signature · 1 line
2.7.4
Paul E. McKenney
AppliedQuoted 9 lines · Akira Yokosawa
Quoted 1 line
From
1908602500df34619ec496c787546d5584d01221Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Wed, 12 Jul 2017 00:01:30 +0900
Subject: [PATCH 0/2] CodeSamples: Add arm64 supportHi Paul,
So, this patch set adds arm64 support for CodeSamples.
Quoted 13 lines
Patch 1 is a followup of the previous patch set. I missed the dependency to the custom header file.
Patch 2 is the addition of arm64 support. It is based on arm support files. I appended an "ish" operand to "dmb" in the definition ofsmp_mp(). Looks like the same change is necessary inarch-arm/arch-arm.h, but this patch doesn't touch it.
Also, I rewrote the definition ofget_timestamp()by usingclock_gettime()instead ofgettimeofday(). For arm64 host, we can expectclock_gettime()is supported.
In Makefile.arch, I chose the flags -mcpu=native and -mtune=native, since thisMakefileis intended for native build.
This is compile tested on an ARMv8 host. I didn't have enough time to run all the programs. I tested a few under count/ and defer/ sub-directories.
I queued and pushed these, thank you! If bugs appear, we will fix them.
Thanx, Paul
Quoted 17 lines
Thanks. Akira
--
Akira Yokosawa (2):
advsync: Add dependency to $(CUSTOM_HEADER)
CodeSamples: Add arm64 supportCodeSamples/advsync/herd/Makefile | 2 +- CodeSamples/arch-arm64/Makefile.arch | 2 ++ CodeSamples/arch-arm64/arch-arm64.h | 61 ++++++++++++++++++++++++++++++++++++ CodeSamples/depends.mk | 5 +++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 CodeSamples/arch-arm64/Makefile.arch create mode 100644 CodeSamples/arch-arm64/arch-arm64.hSignature · 1 line
2.7.4