From nobody Mon Feb 9 10:34:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487829812676674.666161904293; Wed, 22 Feb 2017 22:03:32 -0800 (PST) Received: from localhost ([::1]:56781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgmUy-0001Nx-Kw for importer@patchew.org; Thu, 23 Feb 2017 01:03:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgmSo-0008GH-GC for qemu-devel@nongnu.org; Thu, 23 Feb 2017 01:01:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgmSl-0001eC-LB for qemu-devel@nongnu.org; Thu, 23 Feb 2017 01:01:14 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55652) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgmSl-0001d0-CG for qemu-devel@nongnu.org; Thu, 23 Feb 2017 01:01:11 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1N5resZ020415 for ; Thu, 23 Feb 2017 01:01:08 -0500 Received: from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143]) by mx0a-001b2d01.pphosted.com with ESMTP id 28sp4hr3v1-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 23 Feb 2017 01:01:08 -0500 Received: from localhost by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Feb 2017 16:01:06 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp01.au.ibm.com (202.81.31.207) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 23 Feb 2017 16:01:03 +1000 Received: from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id D52A52BB005E; Thu, 23 Feb 2017 17:01:02 +1100 (EST) Received: from d23av06.au.ibm.com (d23av06.au.ibm.com [9.190.235.151]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1N60s7m39977204; Thu, 23 Feb 2017 17:01:02 +1100 Received: from d23av06.au.ibm.com (localhost [127.0.0.1]) by d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v1N60UJG026813; Thu, 23 Feb 2017 17:00:30 +1100 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v1N60UsB025870; Thu, 23 Feb 2017 17:00:30 +1100 Received: from tungsten.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 00F5BA0274; Thu, 23 Feb 2017 17:00:06 +1100 (AEDT) From: Sam Bobroff To: qemu-ppc@nongnu.org Date: Thu, 23 Feb 2017 16:59:55 +1100 X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022306-1617-0000-0000-000001ABE8CE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022306-1618-0000-0000-000047C9EDA7 Message-Id: <89c541d2bd6259c237900c3918ca0a3cfccccb90.1487829585.git.sam.bobroff@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-23_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702230057 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [RFC PATCH v2 02/12] scripts/update-linux-headers.sh: refactor extra files X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, sjitindarsingh@gmail.com, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Refactor the architecture specific code to make it easier to add new special case files. There should be no change in functionality. Signed-off-by: Sam Bobroff Reviewed-by: David Gibson --- v2: I've factored the script to make it easier to add new files. scripts/update-linux-headers.sh | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers= .sh index ef11a8ab42..c75c30da1b 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -76,28 +76,25 @@ for arch in $ARCHLIST; do fi =20 make -C "$linux" INSTALL_HDR_PATH=3D"$tmpdir" ARCH=3D$arch headers_ins= tall + ARCH_EXTRA=3D + ARCH_STD_EXTRA=3D + case "$arch" in + powerpc) ARCH_EXTRA=3Depapr_hcalls.h ;; + s390) ARCH_STD_EXTRA=3D"kvm_virtio.h virtio-ccw.h" ;; + x86) ARCH_EXTRA=3D"unistd_32.h unistd_x32.h unistd_64.h" ARCH_STD_= EXTRA=3D"hyperv.h" ;; + esac =20 rm -rf "$output/linux-headers/asm-$arch" mkdir -p "$output/linux-headers/asm-$arch" - for header in kvm.h kvm_para.h unistd.h; do + for header in kvm.h kvm_para.h unistd.h $ARCH_EXTRA; do cp "$tmpdir/include/asm/$header" "$output/linux-headers/asm-$arch" done - if [ $arch =3D powerpc ]; then - cp "$tmpdir/include/asm/epapr_hcalls.h" "$output/linux-headers/asm= -powerpc/" - fi =20 rm -rf "$output/include/standard-headers/asm-$arch" mkdir -p "$output/include/standard-headers/asm-$arch" - if [ $arch =3D s390 ]; then - cp_portable "$tmpdir/include/asm/kvm_virtio.h" "$output/include/st= andard-headers/asm-s390/" - cp_portable "$tmpdir/include/asm/virtio-ccw.h" "$output/include/st= andard-headers/asm-s390/" - fi - if [ $arch =3D x86 ]; then - cp_portable "$tmpdir/include/asm/hyperv.h" "$output/include/standa= rd-headers/asm-x86/" - cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-x8= 6/" - cp "$tmpdir/include/asm/unistd_x32.h" "$output/linux-headers/asm-x= 86/" - cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-x8= 6/" - fi + for header in $ARCH_STD_EXTRA; do + cp_portable "$tmpdir/include/asm/$header" "$output/include/standar= d-headers/asm-$arch/" + done done =20 rm -rf "$output/linux-headers/linux" --=20 2.11.0