From: David Gibson <david@gibson.dropbear.id.au>
To: Sam Bobroff <sam.bobroff@au1.ibm.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, sjitindarsingh@gmail.com
Subject: Re: [Qemu-devel] [RFC PATCH v2 02/12] scripts/update-linux-headers.sh: refactor extra files
Date: Mon, 27 Feb 2017 17:24:01 +1100 [thread overview]
Message-ID: <20170227062401.GX17615@umbus.fritz.box> (raw)
In-Reply-To: <89c541d2bd6259c237900c3918ca0a3cfccccb90.1487829585.git.sam.bobroff@au1.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2804 bytes --]
On Thu, Feb 23, 2017 at 04:59:55PM +1100, Sam Bobroff wrote:
> 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 <sam.bobroff@au1.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> 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
>
> make -C "$linux" INSTALL_HDR_PATH="$tmpdir" ARCH=$arch headers_install
> + ARCH_EXTRA=
> + ARCH_STD_EXTRA=
> + case "$arch" in
> + powerpc) ARCH_EXTRA=epapr_hcalls.h ;;
> + s390) ARCH_STD_EXTRA="kvm_virtio.h virtio-ccw.h" ;;
> + x86) ARCH_EXTRA="unistd_32.h unistd_x32.h unistd_64.h" ARCH_STD_EXTRA="hyperv.h" ;;
> + esac
>
> 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 = powerpc ]; then
> - cp "$tmpdir/include/asm/epapr_hcalls.h" "$output/linux-headers/asm-powerpc/"
> - fi
>
> rm -rf "$output/include/standard-headers/asm-$arch"
> mkdir -p "$output/include/standard-headers/asm-$arch"
> - if [ $arch = s390 ]; then
> - cp_portable "$tmpdir/include/asm/kvm_virtio.h" "$output/include/standard-headers/asm-s390/"
> - cp_portable "$tmpdir/include/asm/virtio-ccw.h" "$output/include/standard-headers/asm-s390/"
> - fi
> - if [ $arch = x86 ]; then
> - cp_portable "$tmpdir/include/asm/hyperv.h" "$output/include/standard-headers/asm-x86/"
> - cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-x86/"
> - cp "$tmpdir/include/asm/unistd_x32.h" "$output/linux-headers/asm-x86/"
> - cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-x86/"
> - fi
> + for header in $ARCH_STD_EXTRA; do
> + cp_portable "$tmpdir/include/asm/$header" "$output/include/standard-headers/asm-$arch/"
> + done
> done
>
> rm -rf "$output/linux-headers/linux"
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-02-27 22:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 5:59 [Qemu-devel] [RFC PATCH v2 00/12] ISA 3.00 KVM guest support Sam Bobroff
2017-02-23 5:59 ` [Qemu-devel] [RFC PATCH v2 01/12] spapr: Small cleanup of PPC MMU enums Sam Bobroff
2017-02-27 6:22 ` David Gibson
2017-02-23 5:59 ` [Qemu-devel] [RFC PATCH v2 02/12] scripts/update-linux-headers.sh: refactor extra files Sam Bobroff
2017-02-27 6:24 ` David Gibson [this message]
2017-02-23 5:59 ` [Qemu-devel] [RFC PATCH v2 03/12] scripts/update-linux-headers.sh: add new files for ARM Sam Bobroff
2017-02-23 5:59 ` [Qemu-devel] [RFC PATCH v2 04/12] Move virtio_mmio.h to fix update-linux-headers.sh Sam Bobroff
2017-02-24 16:40 ` Michael S. Tsirkin
2017-02-24 16:47 ` Michael S. Tsirkin
2017-02-28 2:23 ` Sam Bobroff
2017-02-23 5:59 ` [Qemu-devel] [RFC PATCH v2 05/12] Update headers using update-linux-headers.sh Sam Bobroff
2017-02-23 5:59 ` [Qemu-devel] [RFC PATCH v2 06/12] spapr: Add ibm, processor-radix-AP-encodings to the device tree Sam Bobroff
2017-02-28 0:12 ` David Gibson
2017-02-28 2:27 ` Suraj Jitindar Singh
2017-02-23 6:00 ` [Qemu-devel] [RFC PATCH v2 07/12] target-ppc: support KVM_CAP_PPC_MMU_RADIX, KVM_CAP_PPC_MMU_HASH_V3 Sam Bobroff
2017-02-28 0:13 ` David Gibson
2017-02-23 6:00 ` [Qemu-devel] [RFC PATCH v2 08/12] spapr: Only setup HTP if necessary Sam Bobroff
2017-02-28 0:28 ` David Gibson
2017-02-28 2:25 ` Suraj Jitindar Singh
2017-02-28 3:19 ` David Gibson
2017-03-01 5:17 ` Suraj Jitindar Singh
2017-03-03 5:04 ` David Gibson
2017-02-23 6:00 ` [Qemu-devel] [RFC PATCH v2 09/12] spapr: Add h_register_process_table() hypercall Sam Bobroff
2017-02-23 6:00 ` [Qemu-devel] [RFC PATCH v2 10/12] spapr: move spapr_populate_pa_features() Sam Bobroff
2017-02-28 0:29 ` David Gibson
2017-02-23 6:00 ` [Qemu-devel] [RFC PATCH v2 11/12] spapr: Enable ISA 3.0 MMU mode selection via CAS Sam Bobroff
2017-02-23 6:00 ` [Qemu-devel] [RFC PATCH v2 12/12] spapr: Workaround for broken radix guests Sam Bobroff
2017-02-28 0:36 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170227062401.GX17615@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=sam.bobroff@au1.ibm.com \
--cc=sjitindarsingh@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).