From: lianglihao@huawei.com (lianglihao at huawei.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] rcutorture: Add basic ARM64 support to run scripts
Date: Fri, 8 Dec 2017 18:13:43 +0800 [thread overview]
Message-ID: <1512728023-37977-1-git-send-email-lianglihao@huawei.com> (raw)
From: Lihao Liang <lianglihao@huawei.com>
This commit adds support of the qemu command qemu-system-aarch64
to rcutorture. Use the following command to run:
./kvm.sh --qemu-cmd qemu-system-aarch64
Signed-off-by: Lihao Liang <lianglihao@huawei.com>
---
The max CPUs supported by qemu machine 'virt' is 8 so the value of
CONFIG_NR_CPUS in some test configuration files needs to be adjusted.
tools/testing/selftests/rcutorture/bin/functions.sh | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh
index 07a1377..5ffe4fe 100644
--- a/tools/testing/selftests/rcutorture/bin/functions.sh
+++ b/tools/testing/selftests/rcutorture/bin/functions.sh
@@ -136,6 +136,9 @@ identify_boot_image () {
qemu-system-x86_64|qemu-system-i386)
echo arch/x86/boot/bzImage
;;
+ qemu-system-aarch64)
+ echo arch/arm64/boot/Image
+ ;;
*)
echo vmlinux
;;
@@ -185,7 +188,14 @@ identify_qemu_append () {
then
echo root=/dev/sda
else
- echo console=ttyS0
+ case "$1" in
+ qemu-system-aarch64)
+ echo console=ttyAMA0
+ ;;
+ *)
+ echo console=ttyS0
+ ;;
+ esac
fi
}
@@ -197,6 +207,9 @@ identify_qemu_args () {
case "$1" in
qemu-system-x86_64|qemu-system-i386)
;;
+ qemu-system-aarch64)
+ echo -M virt -cpu host
+ ;;
qemu-system-ppc64)
echo -enable-kvm -M pseries -nodefaults
echo -device spapr-vscsi
@@ -257,6 +270,9 @@ specify_qemu_cpus () {
qemu-system-x86_64|qemu-system-i386)
echo $2 -smp $3
;;
+ qemu-system-aarch64)
+ echo $2 -smp $3
+ ;;
qemu-system-ppc64)
nt="`lscpu | grep '^NUMA node0' | sed -e 's/^[^,]*,\([0-9]*\),.*$/\1/'`"
echo $2 -smp cores=`expr \( $3 + $nt - 1 \) / $nt`,threads=$nt
--
2.7.4
next reply other threads:[~2017-12-08 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 10:13 lianglihao at huawei.com [this message]
2017-12-11 16:32 ` [PATCH] rcutorture: Add basic ARM64 support to run scripts Paul E. McKenney
2017-12-12 9:28 ` Lihao Liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1512728023-37977-1-git-send-email-lianglihao@huawei.com \
--to=lianglihao@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox