* [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures
@ 2012-08-03 12:51 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2012-08-03 12:51 UTC (permalink / raw)
To: kvm, qemu-devel
Cc: Alexander Graf, Avi Kivity, Marcelo Tosatti, Andreas Färber,
patches
The code creating the symlink from linux-headers/asm to the
architecture specific linux-headers/asm-$arch directory was
implicitly hardcoding a list of KVM supporting architectures.
Add a default case for the common "Linux architecture name and
QEMU CPU name match" case, so future architectures will only
need to add code if they've managed to get mismatched names.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
v1->v2 changes: conform to same indent rules as surrounding code
configure | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 9f071b7..eafb81f 100755
--- a/configure
+++ b/configure
@@ -3485,15 +3485,23 @@ if test "$linux" = "yes" ; then
mkdir -p linux-headers
case "$cpu" in
i386|x86_64)
- symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
+ linux_arch=x86
;;
ppcemb|ppc|ppc64)
- symlink "$source_path/linux-headers/asm-powerpc" linux-headers/asm
+ linux_arch=powerpc
;;
s390x)
- symlink "$source_path/linux-headers/asm-s390" linux-headers/asm
+ linux_arch=s390
+ ;;
+ *)
+ # For most CPUs the kernel architecture name and QEMU CPU name match.
+ linux_arch="$cpu"
;;
esac
+ # For non-KVM architectures we will not have asm headers
+ if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then
+ symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
+ fi
fi
for target in $target_list; do
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Qemu-devel] [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures
@ 2012-08-03 12:51 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2012-08-03 12:51 UTC (permalink / raw)
To: kvm, qemu-devel
Cc: Alexander Graf, Avi Kivity, Marcelo Tosatti, Andreas Färber,
patches
The code creating the symlink from linux-headers/asm to the
architecture specific linux-headers/asm-$arch directory was
implicitly hardcoding a list of KVM supporting architectures.
Add a default case for the common "Linux architecture name and
QEMU CPU name match" case, so future architectures will only
need to add code if they've managed to get mismatched names.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
v1->v2 changes: conform to same indent rules as surrounding code
configure | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 9f071b7..eafb81f 100755
--- a/configure
+++ b/configure
@@ -3485,15 +3485,23 @@ if test "$linux" = "yes" ; then
mkdir -p linux-headers
case "$cpu" in
i386|x86_64)
- symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
+ linux_arch=x86
;;
ppcemb|ppc|ppc64)
- symlink "$source_path/linux-headers/asm-powerpc" linux-headers/asm
+ linux_arch=powerpc
;;
s390x)
- symlink "$source_path/linux-headers/asm-s390" linux-headers/asm
+ linux_arch=s390
+ ;;
+ *)
+ # For most CPUs the kernel architecture name and QEMU CPU name match.
+ linux_arch="$cpu"
;;
esac
+ # For non-KVM architectures we will not have asm headers
+ if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then
+ symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
+ fi
fi
for target in $target_list; do
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures
2012-08-03 12:51 ` [Qemu-devel] " Peter Maydell
@ 2012-08-03 19:57 ` Marcelo Tosatti
-1 siblings, 0 replies; 6+ messages in thread
From: Marcelo Tosatti @ 2012-08-03 19:57 UTC (permalink / raw)
To: Peter Maydell
Cc: kvm, patches, Alexander Graf, qemu-devel, Avi Kivity,
Andreas Färber
On Fri, Aug 03, 2012 at 01:51:25PM +0100, Peter Maydell wrote:
> The code creating the symlink from linux-headers/asm to the
> architecture specific linux-headers/asm-$arch directory was
> implicitly hardcoding a list of KVM supporting architectures.
> Add a default case for the common "Linux architecture name and
> QEMU CPU name match" case, so future architectures will only
> need to add code if they've managed to get mismatched names.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> v1->v2 changes: conform to same indent rules as surrounding code
Applied to uq/master, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures
@ 2012-08-03 19:57 ` Marcelo Tosatti
0 siblings, 0 replies; 6+ messages in thread
From: Marcelo Tosatti @ 2012-08-03 19:57 UTC (permalink / raw)
To: Peter Maydell
Cc: kvm, patches, Alexander Graf, qemu-devel, Avi Kivity,
Andreas Färber
On Fri, Aug 03, 2012 at 01:51:25PM +0100, Peter Maydell wrote:
> The code creating the symlink from linux-headers/asm to the
> architecture specific linux-headers/asm-$arch directory was
> implicitly hardcoding a list of KVM supporting architectures.
> Add a default case for the common "Linux architecture name and
> QEMU CPU name match" case, so future architectures will only
> need to add code if they've managed to get mismatched names.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> v1->v2 changes: conform to same indent rules as surrounding code
Applied to uq/master, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures
2012-08-03 12:51 ` [Qemu-devel] " Peter Maydell
@ 2012-08-04 15:29 ` Andreas Färber
-1 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2012-08-04 15:29 UTC (permalink / raw)
To: Peter Maydell
Cc: kvm, qemu-devel, Alexander Graf, Avi Kivity, Marcelo Tosatti,
patches
Am 03.08.2012 14:51, schrieb Peter Maydell:
> The code creating the symlink from linux-headers/asm to the
> architecture specific linux-headers/asm-$arch directory was
> implicitly hardcoding a list of KVM supporting architectures.
> Add a default case for the common "Linux architecture name and
> QEMU CPU name match" case, so future architectures will only
> need to add code if they've managed to get mismatched names.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> v1->v2 changes: conform to same indent rules as surrounding code
Did you send the wrong patch? ;)
Andreas
>
> configure | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 9f071b7..eafb81f 100755
> --- a/configure
> +++ b/configure
> @@ -3485,15 +3485,23 @@ if test "$linux" = "yes" ; then
> mkdir -p linux-headers
> case "$cpu" in
> i386|x86_64)
> - symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
> + linux_arch=x86
> ;;
> ppcemb|ppc|ppc64)
> - symlink "$source_path/linux-headers/asm-powerpc" linux-headers/asm
> + linux_arch=powerpc
> ;;
> s390x)
> - symlink "$source_path/linux-headers/asm-s390" linux-headers/asm
> + linux_arch=s390
> + ;;
> + *)
> + # For most CPUs the kernel architecture name and QEMU CPU name match.
> + linux_arch="$cpu"
> ;;
> esac
> + # For non-KVM architectures we will not have asm headers
> + if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then
> + symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
> + fi
> fi
>
> for target in $target_list; do
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures
@ 2012-08-04 15:29 ` Andreas Färber
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2012-08-04 15:29 UTC (permalink / raw)
To: Peter Maydell
Cc: kvm, patches, Marcelo Tosatti, qemu-devel, Alexander Graf,
Avi Kivity
Am 03.08.2012 14:51, schrieb Peter Maydell:
> The code creating the symlink from linux-headers/asm to the
> architecture specific linux-headers/asm-$arch directory was
> implicitly hardcoding a list of KVM supporting architectures.
> Add a default case for the common "Linux architecture name and
> QEMU CPU name match" case, so future architectures will only
> need to add code if they've managed to get mismatched names.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> v1->v2 changes: conform to same indent rules as surrounding code
Did you send the wrong patch? ;)
Andreas
>
> configure | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 9f071b7..eafb81f 100755
> --- a/configure
> +++ b/configure
> @@ -3485,15 +3485,23 @@ if test "$linux" = "yes" ; then
> mkdir -p linux-headers
> case "$cpu" in
> i386|x86_64)
> - symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
> + linux_arch=x86
> ;;
> ppcemb|ppc|ppc64)
> - symlink "$source_path/linux-headers/asm-powerpc" linux-headers/asm
> + linux_arch=powerpc
> ;;
> s390x)
> - symlink "$source_path/linux-headers/asm-s390" linux-headers/asm
> + linux_arch=s390
> + ;;
> + *)
> + # For most CPUs the kernel architecture name and QEMU CPU name match.
> + linux_arch="$cpu"
> ;;
> esac
> + # For non-KVM architectures we will not have asm headers
> + if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then
> + symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
> + fi
> fi
>
> for target in $target_list; do
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-04 15:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 12:51 [PATCH v2] configure: Don't implicitly hardcode list of KVM architectures Peter Maydell
2012-08-03 12:51 ` [Qemu-devel] " Peter Maydell
2012-08-03 19:57 ` Marcelo Tosatti
2012-08-03 19:57 ` [Qemu-devel] " Marcelo Tosatti
2012-08-04 15:29 ` Andreas Färber
2012-08-04 15:29 ` Andreas Färber
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.