From: Andrew Jones <andrew.jones@linux.dev>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: alexandru.elisei@arm.com, eric.auger@redhat.com,
kvmarm@lists.linux.dev, kvm@vger.kernel.org,
kvm-riscv@lists.infradead.org, vladimir.murzin@arm.com
Subject: Re: [kvm-unit-tests PATCH v2 2/5] configure: arm/arm64: Display the correct default processor
Date: Sat, 22 Mar 2025 12:07:55 +0100 [thread overview]
Message-ID: <20250322-0b1d267fc4717085047e1739@orel> (raw)
In-Reply-To: <20250314154904.3946484-4-jean-philippe@linaro.org>
On Fri, Mar 14, 2025 at 03:49:02PM +0000, Jean-Philippe Brucker wrote:
> From: Alexandru Elisei <alexandru.elisei@arm.com>
>
> The help text for the --processor option displays the architecture name as
> the default processor type. But the default for arm is cortex-a15, and for
> arm64 is cortex-a57. Teach configure to display the correct default
> processor type for these two architectures.
>
> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> ---
> configure | 30 ++++++++++++++++++++++--------
> 1 file changed, 22 insertions(+), 8 deletions(-)
>
> diff --git a/configure b/configure
> index dc3413fc..5306bad3 100755
> --- a/configure
> +++ b/configure
> @@ -5,6 +5,24 @@ if [ -z "${BASH_VERSINFO[0]}" ] || [ "${BASH_VERSINFO[0]}" -lt 4 ] ; then
> exit 1
> fi
>
> +function get_default_processor()
> +{
> + local arch="$1"
> +
> + case "$arch" in
> + "arm")
> + default_processor="cortex-a15"
> + ;;
> + "arm64")
> + default_processor="cortex-a57"
> + ;;
> + *)
> + default_processor=$arch
Missing ';;'
> + esac
> +
> + echo "$default_processor"
> +}
> +
> srcdir=$(cd "$(dirname "$0")"; pwd)
> prefix=/usr/local
> cc=gcc
> @@ -43,13 +61,14 @@ else
> fi
>
> usage() {
> + [ -z "$processor" ] && processor=$(get_default_processor $arch)
Seeing this convinces me that the additional arch=arm64 from the last
patch should be done here above this.
> cat <<-EOF
> Usage: $0 [options]
>
> Options include:
> --arch=ARCH architecture to compile for ($arch). ARCH can be one of:
> arm, arm64, i386, ppc64, riscv32, riscv64, s390x, x86_64
> - --processor=PROCESSOR processor to compile for ($arch)
> + --processor=PROCESSOR processor to compile for ($processor)
> --target=TARGET target platform that the tests will be running on (qemu or
> kvmtool, default is qemu) (arm/arm64 only)
> --cross-prefix=PREFIX cross compiler prefix
> @@ -319,13 +338,8 @@ if [ "$earlycon" ]; then
> fi
> fi
>
> -[ -z "$processor" ] && processor="$arch"
> -
> -if [ "$processor" = "arm64" ]; then
> - processor="cortex-a57"
> -elif [ "$processor" = "arm" ]; then
> - processor="cortex-a15"
> -fi
> +# $arch will have changed when cross-compiling.
> +[ -z "$processor" ] && processor=$(get_default_processor $arch)
>
> if [ "$arch" = "i386" ] || [ "$arch" = "x86_64" ]; then
> testdir=x86
> --
> 2.48.1
>
Otherwise,
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
next prev parent reply other threads:[~2025-03-22 11:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 15:49 [kvm-unit-tests PATCH v2 0/5] arm64: Change the default QEMU CPU type to "max" Jean-Philippe Brucker
2025-03-14 15:49 ` [kvm-unit-tests PATCH v2 1/5] configure: arm64: Don't display 'aarch64' as the default architecture Jean-Philippe Brucker
2025-03-17 8:19 ` Eric Auger
2025-03-17 8:27 ` Eric Auger
2025-03-24 15:48 ` Jean-Philippe Brucker
2025-03-22 11:04 ` Andrew Jones
2025-03-14 15:49 ` [kvm-unit-tests PATCH v2 2/5] configure: arm/arm64: Display the correct default processor Jean-Philippe Brucker
2025-03-17 8:30 ` Eric Auger
2025-03-22 11:07 ` Andrew Jones [this message]
2025-03-14 15:49 ` [kvm-unit-tests PATCH v2 3/5] arm64: Implement the ./configure --processor option Jean-Philippe Brucker
2025-03-17 8:34 ` Eric Auger
2025-03-14 15:49 ` [kvm-unit-tests PATCH v2 4/5] configure: Add --qemu-cpu option Jean-Philippe Brucker
2025-03-17 8:53 ` Eric Auger
2025-03-20 13:42 ` Alexandru Elisei
2025-03-22 11:25 ` Andrew Jones
2025-03-22 11:26 ` Andrew Jones
2025-03-23 11:16 ` Alexandru Elisei
2025-03-24 8:19 ` Andrew Jones
2025-03-24 10:41 ` Alexandru Elisei
2025-03-24 13:13 ` Andrew Jones
2025-03-24 15:52 ` Jean-Philippe Brucker
2025-03-14 15:49 ` [kvm-unit-tests PATCH v2 5/5] arm64: Use -cpu max as the default for TCG Jean-Philippe Brucker
2025-03-17 10:13 ` Eric Auger
2025-03-22 11:27 ` Andrew Jones
2025-03-24 15:50 ` Jean-Philippe Brucker
2025-03-24 16:33 ` Andrew Jones
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=20250322-0b1d267fc4717085047e1739@orel \
--to=andrew.jones@linux.dev \
--cc=alexandru.elisei@arm.com \
--cc=eric.auger@redhat.com \
--cc=jean-philippe@linaro.org \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=vladimir.murzin@arm.com \
/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