From patchwork Mon Oct 22 11:54:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1625321 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C3DB8DF2F5 for ; Mon, 22 Oct 2012 11:54:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753504Ab2JVLyu (ORCPT ); Mon, 22 Oct 2012 07:54:50 -0400 Received: from 38.0.169.217.in-addr.arpa ([217.169.0.38]:34885 "EHLO mnementh.archaic.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752100Ab2JVLyt (ORCPT ); Mon, 22 Oct 2012 07:54:49 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TQGad-0008G4-7d; Mon, 22 Oct 2012 12:54:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org, Jan Kiszka Subject: [PATCH] update-linux-headers.sh: Handle new kernel uapi/ directories Date: Mon, 22 Oct 2012 12:54:39 +0100 Message-Id: <1350906879-31721-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Recent kernels have moved to keeping the userspace headers in uapi/ subdirectories. This breaks the detection of whether an architecture has KVM support in the kernel because kvm.h has moved in the kernel source tree. Update the check to support both the old and new locations. Signed-off-by: Peter Maydell --- This would otherwise cause us to ignore the architectures which have moved over to uapi/ (which for QEMU's purposes means "everything but x86"...) scripts/update-linux-headers.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 67be2ef..4c7b566 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -34,7 +34,8 @@ 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 + if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ] && + ! [ -e "$linux/arch/$arch/include/uapi/asm/kvm.h" ] ; then continue fi