From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxHPd-00058R-RM for qemu-devel@nongnu.org; Fri, 03 Aug 2012 08:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxHPX-0007i9-TN for qemu-devel@nongnu.org; Fri, 03 Aug 2012 08:55:29 -0400 Received: from mail-gg0-f173.google.com ([209.85.161.173]:50471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxHPX-0007hz-Oy for qemu-devel@nongnu.org; Fri, 03 Aug 2012 08:55:23 -0400 Received: by ggnp1 with SMTP id p1so767089ggn.4 for ; Fri, 03 Aug 2012 05:55:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1342606269-12527-1-git-send-email-peter.maydell@linaro.org> References: <1342606269-12527-1-git-send-email-peter.maydell@linaro.org> Date: Fri, 3 Aug 2012 13:55:22 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka , Anthony Liguori , patches@linaro.org Ping? patchwork url: http://patchwork.ozlabs.org/patch/171628/ -- PMM On 18 July 2012 11: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 > --- > 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 > >