From patchwork Wed Jul 18 10:11:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 10113 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2C73524027 for ; Wed, 18 Jul 2012 10:11:15 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id CDDCAA18208 for ; Wed, 18 Jul 2012 10:11:14 +0000 (UTC) Received: by ghbz12 with SMTP id z12so1477750ghb.11 for ; Wed, 18 Jul 2012 03:11:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=soPfImj1c6NKv+hZB95cMEbxw9t2lTEgh7R4qnhouMI=; b=JJC+/S7+6b+bopjj2wfK2qDcy5fPpu33vq3nnSg1zUnzpSX7a24B1T4U+QOVl7adVj 9S/a6J26E1IYNiZRC24he0dMkr9Ows6VWiqGt2QC8/wVOSpFuIl+qwU+Tg5yGLS8GGKO KRxp8OslYNx1tEOCDJfrIhVnjJfCEE88sSbAPfQ8bNZwM+oxdYy2IncKLsIF8riZquif uWXWeEMLl+C30U8DyfHb16wPNUvmbXQulRBV3yVTj/AxzSFzhKZ2s8LI4QVgXdNBznOq 4k/GgUojSw533+VuqzgOI+TunJGNc7uCv4Oji7+5R49+bZEsu0AEnvYV6WezZ1pQkBg+ qC7g== Received: by 10.50.203.39 with SMTP id kn7mr1315864igc.53.1342606274119; Wed, 18 Jul 2012 03:11:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp29671ibb; Wed, 18 Jul 2012 03:11:13 -0700 (PDT) Received: by 10.180.92.7 with SMTP id ci7mr6712973wib.1.1342606272713; Wed, 18 Jul 2012 03:11:12 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id w8si36928871wiz.32.2012.07.18.03.11.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jul 2012 03:11:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1SrRDp-0003GU-5R; Wed, 18 Jul 2012 11:11:09 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Jan Kiszka Subject: [PATCH] update-linux-headers.sh: Don't hard code list of architectures Date: Wed, 18 Jul 2012 11:11:09 +0100 Message-Id: <1342606269-12527-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQn8Hiast5L9NBq8IBwRaDdtaoAXTrkmv7AgkedJ3tBtNT+fK3nkr12x9VL8cSZTITs1I8id 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 Acked-by: Jan Kiszka --- 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"