Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rcutorture: Add basic ARM64 support to run scripts

This commit adds support of the qemu command qemu-system-aarch64
to rcutorture.

Signed-off-by: Lihao Liang <lianglihao@huawei.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

authored by

Lihao Liang and committed by
Paul E. McKenney
67ad71dd db92ca3a

+15 -2
+15 -2
tools/testing/selftests/rcutorture/bin/functions.sh
··· 136 136 qemu-system-x86_64|qemu-system-i386) 137 137 echo arch/x86/boot/bzImage 138 138 ;; 139 + qemu-system-aarch64) 140 + echo arch/arm64/boot/Image 141 + ;; 139 142 *) 140 143 echo vmlinux 141 144 ;; ··· 161 158 elif echo $u | grep -q "Intel 80386" 162 159 then 163 160 echo qemu-system-i386 161 + elif echo $u | grep -q aarch64 162 + then 163 + echo qemu-system-aarch64 164 164 elif uname -a | grep -q ppc64 165 165 then 166 166 echo qemu-system-ppc64 ··· 182 176 # Output arguments for the qemu "-append" string based on CPU type 183 177 # and the TORTURE_QEMU_INTERACTIVE environment variable. 184 178 identify_qemu_append () { 179 + local console=ttyS0 185 180 case "$1" in 186 181 qemu-system-x86_64|qemu-system-i386) 187 182 echo noapic selinux=0 initcall_debug debug 183 + ;; 184 + qemu-system-aarch64) 185 + console=ttyAMA0 188 186 ;; 189 187 esac 190 188 if test -n "$TORTURE_QEMU_INTERACTIVE" 191 189 then 192 190 echo root=/dev/sda 193 191 else 194 - echo console=ttyS0 192 + echo console=$console 195 193 fi 196 194 } 197 195 ··· 206 196 identify_qemu_args () { 207 197 case "$1" in 208 198 qemu-system-x86_64|qemu-system-i386) 199 + ;; 200 + qemu-system-aarch64) 201 + echo -machine virt,gic-version=host -cpu host 209 202 ;; 210 203 qemu-system-ppc64) 211 204 echo -enable-kvm -M pseries -nodefaults ··· 267 254 echo $2 268 255 else 269 256 case "$1" in 270 - qemu-system-x86_64|qemu-system-i386) 257 + qemu-system-x86_64|qemu-system-i386|qemu-system-aarch64) 271 258 echo $2 -smp $3 272 259 ;; 273 260 qemu-system-ppc64)