All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures
@ 2012-07-17 16:41 Peter Maydell
  2012-07-17 17:03 ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2012-07-17 16:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, patches

Rather than hardcoding the list of architectures in the kernel
header update script, just import headers for every architecture
which supports KVM. This reduces the number of QEMU files which
need to be updated to add support for a new KVM architecture.
It also means we won't break if the kernel drops support for
an architecture in the future.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I'd like this for ARM, obviously. NB that this change will mean we'll
pick up the ia64 kvm headers next time somebody does a kernel header
update; this seems harmless (and perhaps even useful?). ia64 'make
headers_install' is a bit noisy as of 3.5-rc5 but succeeds anyway.

 scripts/update-linux-headers.sh |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index 9d2a4bc..2c76685 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -28,7 +28,16 @@ if [ -z "$output" ]; then
     output="$PWD"
 fi
 
-for arch in x86 powerpc s390; do
+# This will pick up non-directories too (eg "Kconfig") but we will
+# ignore them in the next loop.
+ARCHLIST=$(cd "$linux/arch" && echo *)
+
+for arch in $ARCHLIST; do
+    # Discard anything which isn't a KVM-supporting architecture
+    if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then
+        continue
+    fi
+
     make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch headers_install
 
     rm -rf "$output/linux-headers/asm-$arch"
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures
  2012-07-17 16:41 [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures Peter Maydell
@ 2012-07-17 17:03 ` Jan Kiszka
  2012-07-17 17:34   ` Peter Maydell
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2012-07-17 17:03 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, patches

On 2012-07-17 18:41, Peter Maydell wrote:
> Rather than hardcoding the list of architectures in the kernel
> header update script, just import headers for every architecture
> which supports KVM. This reduces the number of QEMU files which
> need to be updated to add support for a new KVM architecture.
> It also means we won't break if the kernel drops support for
> an architecture in the future.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I'd like this for ARM, obviously. NB that this change will mean we'll
> pick up the ia64 kvm headers next time somebody does a kernel header
> update; this seems harmless (and perhaps even useful?). ia64 'make
> headers_install' is a bit noisy as of 3.5-rc5 but succeeds anyway.

IA64 KVM support is dead and may be removed at some point from the
kernel. What about blacklisting it here already to avoid that noise?

> 
>  scripts/update-linux-headers.sh |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
> index 9d2a4bc..2c76685 100755
> --- a/scripts/update-linux-headers.sh
> +++ b/scripts/update-linux-headers.sh
> @@ -28,7 +28,16 @@ if [ -z "$output" ]; then
>      output="$PWD"
>  fi
>  
> -for arch in x86 powerpc s390; do
> +# This will pick up non-directories too (eg "Kconfig") but we will
> +# ignore them in the next loop.
> +ARCHLIST=$(cd "$linux/arch" && echo *)
> +
> +for arch in $ARCHLIST; do
> +    # Discard anything which isn't a KVM-supporting architecture
> +    if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then
> +        continue
> +    fi
> +
>      make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch headers_install
>  
>      rm -rf "$output/linux-headers/asm-$arch"
> 

Looks good otherwise. Clearly better than a hardcoded list.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures
  2012-07-17 17:03 ` Jan Kiszka
@ 2012-07-17 17:34   ` Peter Maydell
  2012-07-17 18:30     ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2012-07-17 17:34 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, patches

On 17 July 2012 18:03, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 2012-07-17 18:41, Peter Maydell wrote:
>> Rather than hardcoding the list of architectures in the kernel
>> header update script, just import headers for every architecture
>> which supports KVM. This reduces the number of QEMU files which
>> need to be updated to add support for a new KVM architecture.
>> It also means we won't break if the kernel drops support for
>> an architecture in the future.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> I'd like this for ARM, obviously. NB that this change will mean we'll
>> pick up the ia64 kvm headers next time somebody does a kernel header
>> update; this seems harmless (and perhaps even useful?). ia64 'make
>> headers_install' is a bit noisy as of 3.5-rc5 but succeeds anyway.
>
> IA64 KVM support is dead and may be removed at some point from the
> kernel. What about blacklisting it here already to avoid that noise?

It's only noisy for the developer who runs the script, and if
we blacklist it then we'll have to update the script again to
remove it from the blacklist when it finally dies.

I don't feel very strongly about it, though, so I can add an

   # Blacklist architectures which have KVM headers but are actually dead
   if [ "$arch" = "ia64" ]; then
       continue
   fi

to the patch if you want.

-- PMM

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures
  2012-07-17 17:34   ` Peter Maydell
@ 2012-07-17 18:30     ` Jan Kiszka
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2012-07-17 18:30 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, patches

On 2012-07-17 19:34, Peter Maydell wrote:
> On 17 July 2012 18:03, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> On 2012-07-17 18:41, Peter Maydell wrote:
>>> Rather than hardcoding the list of architectures in the kernel
>>> header update script, just import headers for every architecture
>>> which supports KVM. This reduces the number of QEMU files which
>>> need to be updated to add support for a new KVM architecture.
>>> It also means we won't break if the kernel drops support for
>>> an architecture in the future.
>>>
>>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>> ---
>>> I'd like this for ARM, obviously. NB that this change will mean we'll
>>> pick up the ia64 kvm headers next time somebody does a kernel header
>>> update; this seems harmless (and perhaps even useful?). ia64 'make
>>> headers_install' is a bit noisy as of 3.5-rc5 but succeeds anyway.
>>
>> IA64 KVM support is dead and may be removed at some point from the
>> kernel. What about blacklisting it here already to avoid that noise?
> 
> It's only noisy for the developer who runs the script, and if

Developers are also human that may hate seeing this mess. :)

> we blacklist it then we'll have to update the script again to
> remove it from the blacklist when it finally dies.

We /can/ clean this up then, but there will be no urgent need.

> 
> I don't feel very strongly about it, though, so I can add an
> 
>    # Blacklist architectures which have KVM headers but are actually dead
>    if [ "$arch" = "ia64" ]; then
>        continue
>    fi
> 
> to the patch if you want.

Yes, I would prefer doing this.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures
  2012-08-03 12:55 ` Peter Maydell
@ 2012-08-13  9:23   ` Peter Maydell
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2012-08-13  9:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, Anthony Liguori, patches

Ping^2?

On 3 August 2012 13:55, Peter Maydell <peter.maydell@linaro.org> wrote:
> Ping?
>
> patchwork url: http://patchwork.ozlabs.org/patch/171628/
>
> -- PMM
>
> On 18 July 2012 11:11, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Rather than hardcoding the list of architectures in the kernel
>> header update script, just import headers for every architecture
>> which supports KVM (with a blacklist exception for ia64 which
>> has KVM headers but is dead). This reduces the number of QEMU
>> files which need to be updated to add support for a new KVM
>> architecture.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> Changes v1->v2:
>>  * added a blacklist for ia64, to avoid noise and importing
>>    a pointless set of headers that will get dropped later
>>
>>  scripts/update-linux-headers.sh |   16 +++++++++++++++-
>>  1 files changed, 15 insertions(+), 1 deletions(-)
>>
>> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
>> index 9d2a4bc..57ce69f 100755
>> --- a/scripts/update-linux-headers.sh
>> +++ b/scripts/update-linux-headers.sh
>> @@ -28,7 +28,21 @@ if [ -z "$output" ]; then
>>      output="$PWD"
>>  fi
>>
>> -for arch in x86 powerpc s390; do
>> +# This will pick up non-directories too (eg "Kconfig") but we will
>> +# ignore them in the next loop.
>> +ARCHLIST=$(cd "$linux/arch" && echo *)
>> +
>> +for arch in $ARCHLIST; do
>> +    # Discard anything which isn't a KVM-supporting architecture
>> +    if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then
>> +        continue
>> +    fi
>> +
>> +    # Blacklist architectures which have KVM headers but are actually dead
>> +    if [ "$arch" = "ia64" ]; then
>> +        continue
>> +    fi
>> +
>>      make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch headers_install
>>
>>      rm -rf "$output/linux-headers/asm-$arch"
>> --
>> 1.7.5.4
>>
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures
  2012-07-18 10:11 Peter Maydell
  2012-07-18 10:18 ` Jan Kiszka
@ 2012-08-03 12:55 ` Peter Maydell
  2012-08-13  9:23   ` Peter Maydell
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2012-08-03 12:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, Anthony Liguori, patches

Ping?

patchwork url: http://patchwork.ozlabs.org/patch/171628/

-- PMM

On 18 July 2012 11:11, Peter Maydell <peter.maydell@linaro.org> wrote:
> Rather than hardcoding the list of architectures in the kernel
> header update script, just import headers for every architecture
> which supports KVM (with a blacklist exception for ia64 which
> has KVM headers but is dead). This reduces the number of QEMU
> files which need to be updated to add support for a new KVM
> architecture.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Changes v1->v2:
>  * added a blacklist for ia64, to avoid noise and importing
>    a pointless set of headers that will get dropped later
>
>  scripts/update-linux-headers.sh |   16 +++++++++++++++-
>  1 files changed, 15 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
> index 9d2a4bc..57ce69f 100755
> --- a/scripts/update-linux-headers.sh
> +++ b/scripts/update-linux-headers.sh
> @@ -28,7 +28,21 @@ if [ -z "$output" ]; then
>      output="$PWD"
>  fi
>
> -for arch in x86 powerpc s390; do
> +# This will pick up non-directories too (eg "Kconfig") but we will
> +# ignore them in the next loop.
> +ARCHLIST=$(cd "$linux/arch" && echo *)
> +
> +for arch in $ARCHLIST; do
> +    # Discard anything which isn't a KVM-supporting architecture
> +    if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then
> +        continue
> +    fi
> +
> +    # Blacklist architectures which have KVM headers but are actually dead
> +    if [ "$arch" = "ia64" ]; then
> +        continue
> +    fi
> +
>      make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch headers_install
>
>      rm -rf "$output/linux-headers/asm-$arch"
> --
> 1.7.5.4
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures
  2012-07-18 10:11 Peter Maydell
@ 2012-07-18 10:18 ` Jan Kiszka
  2012-08-03 12:55 ` Peter Maydell
  1 sibling, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2012-07-18 10:18 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, patches

On 2012-07-18 12:11, Peter Maydell wrote:
> Rather than hardcoding the list of architectures in the kernel
> header update script, just import headers for every architecture
> which supports KVM (with a blacklist exception for ia64 which
> has KVM headers but is dead). This reduces the number of QEMU
> files which need to be updated to add support for a new KVM
> architecture.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Acked-by: Jan Kiszka <jan.kiszka@siemens.com>

> ---
> Changes v1->v2:
>  * added a blacklist for ia64, to avoid noise and importing
>    a pointless set of headers that will get dropped later
> 
>  scripts/update-linux-headers.sh |   16 +++++++++++++++-
>  1 files changed, 15 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
> index 9d2a4bc..57ce69f 100755
> --- a/scripts/update-linux-headers.sh
> +++ b/scripts/update-linux-headers.sh
> @@ -28,7 +28,21 @@ if [ -z "$output" ]; then
>      output="$PWD"
>  fi
>  
> -for arch in x86 powerpc s390; do
> +# This will pick up non-directories too (eg "Kconfig") but we will
> +# ignore them in the next loop.
> +ARCHLIST=$(cd "$linux/arch" && echo *)
> +
> +for arch in $ARCHLIST; do
> +    # Discard anything which isn't a KVM-supporting architecture
> +    if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then
> +        continue
> +    fi
> +
> +    # Blacklist architectures which have KVM headers but are actually dead
> +    if [ "$arch" = "ia64" ]; then
> +        continue
> +    fi
> +
>      make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch headers_install
>  
>      rm -rf "$output/linux-headers/asm-$arch"
> 


-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures
@ 2012-07-18 10:11 Peter Maydell
  2012-07-18 10:18 ` Jan Kiszka
  2012-08-03 12:55 ` Peter Maydell
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Maydell @ 2012-07-18 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, patches

Rather than hardcoding the list of architectures in the kernel
header update script, just import headers for every architecture
which supports KVM (with a blacklist exception for ia64 which
has KVM headers but is dead). This reduces the number of QEMU
files which need to be updated to add support for a new KVM
architecture.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Changes v1->v2:
 * added a blacklist for ia64, to avoid noise and importing
   a pointless set of headers that will get dropped later

 scripts/update-linux-headers.sh |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index 9d2a4bc..57ce69f 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -28,7 +28,21 @@ if [ -z "$output" ]; then
     output="$PWD"
 fi
 
-for arch in x86 powerpc s390; do
+# This will pick up non-directories too (eg "Kconfig") but we will
+# ignore them in the next loop.
+ARCHLIST=$(cd "$linux/arch" && echo *)
+
+for arch in $ARCHLIST; do
+    # Discard anything which isn't a KVM-supporting architecture
+    if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then
+        continue
+    fi
+
+    # Blacklist architectures which have KVM headers but are actually dead
+    if [ "$arch" = "ia64" ]; then
+        continue
+    fi
+
     make -C "$linux" INSTALL_HDR_PATH="$tmpdir" SRCARCH=$arch headers_install
 
     rm -rf "$output/linux-headers/asm-$arch"
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-08-13  9:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 16:41 [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures Peter Maydell
2012-07-17 17:03 ` Jan Kiszka
2012-07-17 17:34   ` Peter Maydell
2012-07-17 18:30     ` Jan Kiszka
2012-07-18 10:11 Peter Maydell
2012-07-18 10:18 ` Jan Kiszka
2012-08-03 12:55 ` Peter Maydell
2012-08-13  9:23   ` Peter Maydell

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.