[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move
From: |
Richard Henderson |
Subject: |
Re: [qemu-s390x] [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories |
Date: |
Wed, 28 Mar 2018 13:56:19 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 03/24/2018 06:57 AM, Laurent Vivier wrote:
> Some files like signal.c are really hard to read
> because all architectures are mixed in the same
> file.
>
> This series moves from signal.c these parts to
> the architecture dedicated directories in linux-user.
> Moreover, this allows to compare easier functions
> between architectures (it helps to debug problems).
> Adding new functions for a new architecture will
> be facilitated too.
>
> checkpatch.pl is not happy... but I only want to
> move code from a file to another. I don't want
> to change the content of the parts I move.
>
> v2:
> - only move parts from signal.c
> - link them instead of including them
> - one patch by architecture
> - add a first patch to prepare the change.
>
> The first patch adds signal-common.h to define
> what is needed by the signal.c of the architectures.
> It adds a "do-nothing" signal.c in each arch
> directory and the rule needed to build them
> in Makefile.objs.
>
> Then the process is simple...
>
> for each architecture:
> - copy the arch specific code from signal.c
> to <arch>/signal.c
> - add includes (including signal-common.h)
> - export setup_rt_frame() and setup_frame()
> (remove static in <arch>/signal.c,
> add the declaration in <arch>/target_signal.h)
>
> When the arch has 32bit and 64bit architectures,
> it's a little bit more complicated:
> - ppc/ppc64: nothing special to do, all is in ppc/,
> there is no ppc64 directory,
> - arm/aarch64: one file for arm, one file for aarch64
> - i386/x86_64, sparc/sparc64, mips/mips64:
> update each target_signal.h,
> include the 32bit signal.c file into the 64bit signal.c file
> to avoid to duplicate code (and add a guard to not include
> the 32bit target_signal.h)
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [qemu-s390x] [PATCH for 2.13 v2 18/20] linux-user: move mips/mips64 signal.c parts to mips directory, (continued)
- [qemu-s390x] [PATCH for 2.13 v2 03/20] linux-user: move arm signal.c parts to arm directory, Laurent Vivier, 2018/03/23
- [qemu-s390x] [PATCH for 2.13 v2 19/20] linux-user: move ppc/ppc64 signal.c parts to ppc directory, Laurent Vivier, 2018/03/23
- [qemu-s390x] [PATCH for 2.13 v2 17/20] linux-user: move sparc/sparc64 signal.c parts to sparc directory, Laurent Vivier, 2018/03/23
- [qemu-s390x] [PATCH for 2.13 v2 20/20] linux-user: define TARGET_ARCH_HAS_SETUP_FRAME, Laurent Vivier, 2018/03/23
- [qemu-s390x] [PATCH for 2.13 v2 16/20] linux-user: move i386/x86_64 signal.c parts to i386 directory, Laurent Vivier, 2018/03/23
- Re: [qemu-s390x] [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories, no-reply, 2018/03/23
- Re: [qemu-s390x] [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories,
Richard Henderson <=
- Re: [qemu-s390x] [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories, Alex Bennée, 2018/03/28