[Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories

Laurent Vivier posted 20 patches 6 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180323225739.17329-1-laurent@vivier.eu
Test checkpatch failed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 failed
Test s390x passed
There is a newer version of this series
linux-user/Makefile.objs              |    2 +-
linux-user/aarch64/signal.c           |  579 +++
linux-user/aarch64/target_signal.h    |    6 +
linux-user/alpha/signal.c             |  280 ++
linux-user/alpha/target_signal.h      |    6 +
linux-user/arm/signal.c               |  772 ++++
linux-user/arm/target_signal.h        |    7 +-
linux-user/cris/signal.c              |  189 +
linux-user/cris/target_signal.h       |    7 +-
linux-user/hppa/signal.c              |  210 ++
linux-user/hppa/target_signal.h       |    3 +
linux-user/i386/signal.c              |  602 +++
linux-user/i386/target_signal.h       |    6 +
linux-user/m68k/signal.c              |  428 +++
linux-user/m68k/target_signal.h       |    7 +-
linux-user/microblaze/signal.c        |  248 ++
linux-user/microblaze/target_signal.h |    7 +-
linux-user/mips/signal.c              |  400 ++
linux-user/mips/target_signal.h       |   10 +-
linux-user/mips64/signal.c            |   20 +
linux-user/mips64/target_signal.h     |    4 +-
linux-user/nios2/signal.c             |  254 ++
linux-user/nios2/target_signal.h      |    4 +
linux-user/openrisc/signal.c          |  231 ++
linux-user/openrisc/target_signal.h   |    4 +-
linux-user/ppc/signal.c               |  689 ++++
linux-user/ppc/target_signal.h        |    9 +-
linux-user/riscv/signal.c             |  218 ++
linux-user/riscv/target_signal.h      |    3 +
linux-user/s390x/signal.c             |  327 ++
linux-user/s390x/target_signal.h      |    7 +-
linux-user/sh4/signal.c               |  350 ++
linux-user/sh4/target_signal.h        |    6 +
linux-user/signal-common.h            |   50 +
linux-user/signal.c                   | 6654 +--------------------------------
linux-user/sparc/signal.c             |  624 ++++
linux-user/sparc/target_signal.h      |    7 +-
linux-user/sparc64/signal.c           |   20 +
linux-user/sparc64/target_signal.h    |    7 +-
linux-user/tilegx/signal.c            |  186 +
linux-user/tilegx/target_signal.h     |    4 +-
linux-user/x86_64/signal.c            |   20 +
linux-user/x86_64/target_signal.h     |    3 +
linux-user/xtensa/signal.c            |  275 ++
linux-user/xtensa/target_signal.h     |    3 +
45 files changed, 7155 insertions(+), 6593 deletions(-)
create mode 100644 linux-user/aarch64/signal.c
create mode 100644 linux-user/alpha/signal.c
create mode 100644 linux-user/arm/signal.c
create mode 100644 linux-user/cris/signal.c
create mode 100644 linux-user/hppa/signal.c
create mode 100644 linux-user/i386/signal.c
create mode 100644 linux-user/m68k/signal.c
create mode 100644 linux-user/microblaze/signal.c
create mode 100644 linux-user/mips/signal.c
create mode 100644 linux-user/mips64/signal.c
create mode 100644 linux-user/nios2/signal.c
create mode 100644 linux-user/openrisc/signal.c
create mode 100644 linux-user/ppc/signal.c
create mode 100644 linux-user/riscv/signal.c
create mode 100644 linux-user/s390x/signal.c
create mode 100644 linux-user/sh4/signal.c
create mode 100644 linux-user/signal-common.h
create mode 100644 linux-user/sparc/signal.c
create mode 100644 linux-user/sparc64/signal.c
create mode 100644 linux-user/tilegx/signal.c
create mode 100644 linux-user/x86_64/signal.c
create mode 100644 linux-user/xtensa/signal.c
[Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories
Posted by Laurent Vivier 6 years, 1 month ago
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)

Laurent Vivier (20):
  linux-user: create a dummy per arch signal.c
  linux-user: move aarch64 signal.c parts to aarch64 directory
  linux-user: move arm signal.c parts to arm directory
  linux-user: move sh4 signal.c parts to sh4 directory
  linux-user: move microblaze signal.c parts to microblaze directory
  linux-user: move cris signal.c parts to cris directory
  linux-user: move nios2 signal.c parts to nios2 directory
  linux-user: move openrisc signal.c parts to openrisc directory
  linux-user: move s390x signal.c parts to s390x directory
  linux-user: move m68k signal.c parts to m68k directory
  linux-user: move alpha signal.c parts to alpha directory
  linux-user: move tilegx signal.c parts to tilegx directory
  linux-user: move riscv signal.c parts to riscv directory
  linux-user: move hppa signal.c parts to hppa directory
  linux-user: move xtensa signal.c parts to xtensa directory
  linux-user: move i386/x86_64 signal.c parts to i386 directory
  linux-user: move sparc/sparc64 signal.c parts to sparc directory
  linux-user: move mips/mips64 signal.c parts to mips directory
  linux-user: move ppc/ppc64 signal.c parts to ppc directory
  linux-user: define TARGET_ARCH_HAS_SETUP_FRAME

 linux-user/Makefile.objs              |    2 +-
 linux-user/aarch64/signal.c           |  579 +++
 linux-user/aarch64/target_signal.h    |    6 +
 linux-user/alpha/signal.c             |  280 ++
 linux-user/alpha/target_signal.h      |    6 +
 linux-user/arm/signal.c               |  772 ++++
 linux-user/arm/target_signal.h        |    7 +-
 linux-user/cris/signal.c              |  189 +
 linux-user/cris/target_signal.h       |    7 +-
 linux-user/hppa/signal.c              |  210 ++
 linux-user/hppa/target_signal.h       |    3 +
 linux-user/i386/signal.c              |  602 +++
 linux-user/i386/target_signal.h       |    6 +
 linux-user/m68k/signal.c              |  428 +++
 linux-user/m68k/target_signal.h       |    7 +-
 linux-user/microblaze/signal.c        |  248 ++
 linux-user/microblaze/target_signal.h |    7 +-
 linux-user/mips/signal.c              |  400 ++
 linux-user/mips/target_signal.h       |   10 +-
 linux-user/mips64/signal.c            |   20 +
 linux-user/mips64/target_signal.h     |    4 +-
 linux-user/nios2/signal.c             |  254 ++
 linux-user/nios2/target_signal.h      |    4 +
 linux-user/openrisc/signal.c          |  231 ++
 linux-user/openrisc/target_signal.h   |    4 +-
 linux-user/ppc/signal.c               |  689 ++++
 linux-user/ppc/target_signal.h        |    9 +-
 linux-user/riscv/signal.c             |  218 ++
 linux-user/riscv/target_signal.h      |    3 +
 linux-user/s390x/signal.c             |  327 ++
 linux-user/s390x/target_signal.h      |    7 +-
 linux-user/sh4/signal.c               |  350 ++
 linux-user/sh4/target_signal.h        |    6 +
 linux-user/signal-common.h            |   50 +
 linux-user/signal.c                   | 6654 +--------------------------------
 linux-user/sparc/signal.c             |  624 ++++
 linux-user/sparc/target_signal.h      |    7 +-
 linux-user/sparc64/signal.c           |   20 +
 linux-user/sparc64/target_signal.h    |    7 +-
 linux-user/tilegx/signal.c            |  186 +
 linux-user/tilegx/target_signal.h     |    4 +-
 linux-user/x86_64/signal.c            |   20 +
 linux-user/x86_64/target_signal.h     |    3 +
 linux-user/xtensa/signal.c            |  275 ++
 linux-user/xtensa/target_signal.h     |    3 +
 45 files changed, 7155 insertions(+), 6593 deletions(-)
 create mode 100644 linux-user/aarch64/signal.c
 create mode 100644 linux-user/alpha/signal.c
 create mode 100644 linux-user/arm/signal.c
 create mode 100644 linux-user/cris/signal.c
 create mode 100644 linux-user/hppa/signal.c
 create mode 100644 linux-user/i386/signal.c
 create mode 100644 linux-user/m68k/signal.c
 create mode 100644 linux-user/microblaze/signal.c
 create mode 100644 linux-user/mips/signal.c
 create mode 100644 linux-user/mips64/signal.c
 create mode 100644 linux-user/nios2/signal.c
 create mode 100644 linux-user/openrisc/signal.c
 create mode 100644 linux-user/ppc/signal.c
 create mode 100644 linux-user/riscv/signal.c
 create mode 100644 linux-user/s390x/signal.c
 create mode 100644 linux-user/sh4/signal.c
 create mode 100644 linux-user/signal-common.h
 create mode 100644 linux-user/sparc/signal.c
 create mode 100644 linux-user/sparc64/signal.c
 create mode 100644 linux-user/tilegx/signal.c
 create mode 100644 linux-user/x86_64/signal.c
 create mode 100644 linux-user/xtensa/signal.c

-- 
2.14.3


Re: [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories
Posted by no-reply@patchew.org 6 years, 1 month ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180323225739.17329-1-laurent@vivier.eu
Subject: [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/20180323143202.28879-1-lvivier@redhat.com -> patchew/20180323143202.28879-1-lvivier@redhat.com
Switched to a new branch 'test'
bb1319bea2 linux-user: define TARGET_ARCH_HAS_SETUP_FRAME
ff0583233e linux-user: move ppc/ppc64 signal.c parts to ppc directory
4a8c3d4710 linux-user: move mips/mips64 signal.c parts to mips directory
0ff2f04a27 linux-user: move sparc/sparc64 signal.c parts to sparc directory
fab8e89a70 linux-user: move i386/x86_64 signal.c parts to i386 directory
8cc1e91532 linux-user: move xtensa signal.c parts to xtensa directory
5b115cad37 linux-user: move hppa signal.c parts to hppa directory
36f5b41ffe linux-user: move riscv signal.c parts to riscv directory
6a80a43af1 linux-user: move tilegx signal.c parts to tilegx directory
181024100a linux-user: move alpha signal.c parts to alpha directory
39e9c6232d linux-user: move m68k signal.c parts to m68k directory
a391cbe695 linux-user: move s390x signal.c parts to s390x directory
dcf5c95a12 linux-user: move openrisc signal.c parts to openrisc directory
a5f2b7f1a8 linux-user: move nios2 signal.c parts to nios2 directory
2425d319f0 linux-user: move cris signal.c parts to cris directory
ef64e581c1 linux-user: move microblaze signal.c parts to microblaze directory
d8d4bb7833 linux-user: move sh4 signal.c parts to sh4 directory
95d132be33 linux-user: move arm signal.c parts to arm directory
1eb8c39442 linux-user: move aarch64 signal.c parts to aarch64 directory
c45a643767 linux-user: create a dummy per arch signal.c

=== OUTPUT BEGIN ===
Checking PATCH 1/20: linux-user: create a dummy per arch signal.c...
Checking PATCH 2/20: linux-user: move aarch64 signal.c parts to aarch64 directory...
Checking PATCH 3/20: linux-user: move arm signal.c parts to arm directory...
ERROR: code indent should never use tabs
#56: FILE: linux-user/arm/signal.c:54:
+    target_sigset_t  tuc_sigmask;^I/* mask last for extensibility */$

ERROR: code indent should never use tabs
#64: FILE: linux-user/arm/signal.c:62:
+    target_sigset_t  tuc_sigmask;^I/* mask last for extensibility */$

ERROR: open brace '{' following struct go on the same line
#104: FILE: linux-user/arm/signal.c:102:
+struct sigframe_v1
+{

ERROR: spaces required around that '-' (ctx:VxV)
#106: FILE: linux-user/arm/signal.c:104:
+    abi_ulong extramask[TARGET_NSIG_WORDS-1];
                                          ^

ERROR: open brace '{' following struct go on the same line
#111: FILE: linux-user/arm/signal.c:109:
+struct sigframe_v2
+{

ERROR: open brace '{' following struct go on the same line
#117: FILE: linux-user/arm/signal.c:115:
+struct rt_sigframe_v1
+{

ERROR: open brace '{' following struct go on the same line
#126: FILE: linux-user/arm/signal.c:124:
+struct rt_sigframe_v2
+{

WARNING: line over 80 characters
#137: FILE: linux-user/arm/signal.c:135:
+#define SWI_SYS_SIGRETURN	(0xef000000|(TARGET_NR_sigreturn + ARM_SYSCALL_BASE))

ERROR: code indent should never use tabs
#137: FILE: linux-user/arm/signal.c:135:
+#define SWI_SYS_SIGRETURN^I(0xef000000|(TARGET_NR_sigreturn + ARM_SYSCALL_BASE))$

ERROR: spaces required around that '|' (ctx:VxV)
#137: FILE: linux-user/arm/signal.c:135:
+#define SWI_SYS_SIGRETURN	(0xef000000|(TARGET_NR_sigreturn + ARM_SYSCALL_BASE))
                          	           ^

WARNING: line over 80 characters
#138: FILE: linux-user/arm/signal.c:136:
+#define SWI_SYS_RT_SIGRETURN	(0xef000000|(TARGET_NR_rt_sigreturn + ARM_SYSCALL_BASE))

ERROR: code indent should never use tabs
#138: FILE: linux-user/arm/signal.c:136:
+#define SWI_SYS_RT_SIGRETURN^I(0xef000000|(TARGET_NR_rt_sigreturn + ARM_SYSCALL_BASE))$

ERROR: spaces required around that '|' (ctx:VxV)
#138: FILE: linux-user/arm/signal.c:136:
+#define SWI_SYS_RT_SIGRETURN	(0xef000000|(TARGET_NR_rt_sigreturn + ARM_SYSCALL_BASE))
                             	           ^

ERROR: code indent should never use tabs
#144: FILE: linux-user/arm/signal.c:142:
+#define SWI_THUMB_SIGRETURN^I(0xdf00 << 16 | 0x2700 | (TARGET_NR_sigreturn))$

WARNING: line over 80 characters
#145: FILE: linux-user/arm/signal.c:143:
+#define SWI_THUMB_RT_SIGRETURN	(0xdf00 << 16 | 0x2700 | (TARGET_NR_rt_sigreturn))

ERROR: code indent should never use tabs
#145: FILE: linux-user/arm/signal.c:143:
+#define SWI_THUMB_RT_SIGRETURN^I(0xdf00 << 16 | 0x2700 | (TARGET_NR_rt_sigreturn))$

ERROR: code indent should never use tabs
#148: FILE: linux-user/arm/signal.c:146:
+^ISWI_SYS_SIGRETURN,^ISWI_THUMB_SIGRETURN,$

ERROR: code indent should never use tabs
#149: FILE: linux-user/arm/signal.c:147:
+^ISWI_SYS_RT_SIGRETURN,^ISWI_THUMB_RT_SIGRETURN$

ERROR: "(foo*)" should be "(foo *)"
#256: FILE: linux-user/arm/signal.c:254:
+    return (abi_ulong*)(vfpframe+1);

ERROR: spaces required around that '+' (ctx:VxV)
#256: FILE: linux-user/arm/signal.c:254:
+    return (abi_ulong*)(vfpframe+1);
                                 ^

ERROR: "(foo*)" should be "(foo *)"
#276: FILE: linux-user/arm/signal.c:274:
+    return (abi_ulong*)(iwmmxtframe+1);

ERROR: spaces required around that '+' (ctx:VxV)
#276: FILE: linux-user/arm/signal.c:274:
+    return (abi_ulong*)(iwmmxtframe+1);
                                    ^

ERROR: space required before the open parenthesis '('
#308: FILE: linux-user/arm/signal.c:306:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: space required before the open parenthesis '('
#328: FILE: linux-user/arm/signal.c:326:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: space required before the open parenthesis '('
#405: FILE: linux-user/arm/signal.c:403:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: space required before the open parenthesis '('
#519: FILE: linux-user/arm/signal.c:517:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: if this code is redundant consider removing it
#530: FILE: linux-user/arm/signal.c:528:
+#if 0

ERROR: braces {} are necessary for all arms of this statement
#532: FILE: linux-user/arm/signal.c:530:
+    if (ptrace_cancel_bpt(current))
[...]

ERROR: "(foo*)" should be "(foo *)"
#570: FILE: linux-user/arm/signal.c:568:
+    return (abi_ulong*)(vfpframe + 1);

ERROR: "(foo*)" should be "(foo *)"
#595: FILE: linux-user/arm/signal.c:593:
+    return (abi_ulong*)(iwmmxtframe + 1);

ERROR: braces {} are necessary for all arms of this statement
#608: FILE: linux-user/arm/signal.c:606:
+    if (restore_sigcontext(env, &uc->tuc_mcontext))
[...]

ERROR: if this code is redundant consider removing it
#632: FILE: linux-user/arm/signal.c:630:
+#if 0

ERROR: braces {} are necessary for all arms of this statement
#634: FILE: linux-user/arm/signal.c:632:
+    if (ptrace_cancel_bpt(current))
[...]

ERROR: line over 90 characters
#714: FILE: linux-user/arm/signal.c:712:
+    if (do_sigaltstack(frame_addr + offsetof(struct rt_sigframe_v1, uc.tuc_stack), 0, get_sp_from_cpustate(env)) == -EFAULT)

ERROR: braces {} are necessary for all arms of this statement
#714: FILE: linux-user/arm/signal.c:712:
+    if (do_sigaltstack(frame_addr + offsetof(struct rt_sigframe_v1, uc.tuc_stack), 0, get_sp_from_cpustate(env)) == -EFAULT)
[...]

ERROR: if this code is redundant consider removing it
#717: FILE: linux-user/arm/signal.c:715:
+#if 0

ERROR: braces {} are necessary for all arms of this statement
#719: FILE: linux-user/arm/signal.c:717:
+    if (ptrace_cancel_bpt(current))
[...]

total: 34 errors, 3 warnings, 1524 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 4/20: linux-user: move sh4 signal.c parts to sh4 directory...
ERROR: open brace '{' following struct go on the same line
#54: FILE: linux-user/sh4/signal.c:52:
+struct target_sigframe
+{

ERROR: spaces required around that '-' (ctx:VxV)
#56: FILE: linux-user/sh4/signal.c:54:
+    target_ulong extramask[TARGET_NSIG_WORDS-1];
                                             ^

ERROR: code indent should never use tabs
#66: FILE: linux-user/sh4/signal.c:64:
+    target_sigset_t tuc_sigmask;^I/* mask last for extensibility */$

ERROR: open brace '{' following struct go on the same line
#70: FILE: linux-user/sh4/signal.c:68:
+struct target_rt_sigframe
+{

ERROR: spaces required around that '|' (ctx:VxV)
#77: FILE: linux-user/sh4/signal.c:75:
+#define MOVW(n)  (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */
                         ^

ERROR: spaces required around that '-' (ctx:VxV)
#77: FILE: linux-user/sh4/signal.c:75:
+#define MOVW(n)  (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */
                              ^

ERROR: spaces required around that '=' (ctx:VxV)
#133: FILE: linux-user/sh4/signal.c:131:
+    for (i=0; i<16; i++) {
           ^

ERROR: spaces required around that '<' (ctx:VxV)
#133: FILE: linux-user/sh4/signal.c:131:
+    for (i=0; i<16; i++) {
                ^

ERROR: spaces required around that '=' (ctx:VxV)
#161: FILE: linux-user/sh4/signal.c:159:
+    for (i=0; i<16; i++) {
           ^

ERROR: spaces required around that '<' (ctx:VxV)
#161: FILE: linux-user/sh4/signal.c:159:
+    for (i=0; i<16; i++) {
                ^

ERROR: space required before the open parenthesis '('
#251: FILE: linux-user/sh4/signal.c:249:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: space required before the open parenthesis '('
#301: FILE: linux-user/sh4/signal.c:299:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: braces {} are necessary for all arms of this statement
#305: FILE: linux-user/sh4/signal.c:303:
+    if (err)
[...]

total: 13 errors, 0 warnings, 679 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 5/20: linux-user: move microblaze signal.c parts to microblaze directory...
ERROR: return is not a function, parentheses are not required
#143: FILE: linux-user/microblaze/signal.c:140:
+    return ((sp - frame_size) & -8UL);

ERROR: braces {} are necessary for all arms of this statement
#155: FILE: linux-user/microblaze/signal.c:152:
+    if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0))
[...]

ERROR: space required before the open parenthesis '('
#161: FILE: linux-user/microblaze/signal.c:158:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: spaces required around that '-' (ctx:VxV)
#171: FILE: linux-user/microblaze/signal.c:168:
+        env->regs[15] = ((unsigned long)ka->sa_restorer)-8;
                                                         ^

ERROR: braces {} are necessary for all arms of this statement
#223: FILE: linux-user/microblaze/signal.c:220:
+    if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 1))
[...]

ERROR: space required before the open parenthesis '('
#228: FILE: linux-user/microblaze/signal.c:225:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

total: 6 errors, 0 warnings, 476 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 6/20: linux-user: move cris signal.c parts to cris directory...
ERROR: braces {} are necessary for all arms of this statement
#111: FILE: linux-user/cris/signal.c:109:
+    if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0))
[...]

ERROR: spaces required around that '+' (ctx:VxV)
#121: FILE: linux-user/cris/signal.c:119:
+    __put_user(0x9c5f, frame->retcode+0);
                                      ^

ERROR: space required before the open parenthesis '('
#129: FILE: linux-user/cris/signal.c:127:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: space required before the open parenthesis '('
#172: FILE: linux-user/cris/signal.c:170:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

total: 4 errors, 0 warnings, 358 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 7/20: linux-user: move nios2 signal.c parts to nios2 directory...
Checking PATCH 8/20: linux-user: move openrisc signal.c parts to openrisc directory...
ERROR: if this code is redundant consider removing it
#52: FILE: linux-user/openrisc/signal.c:49:
+#if 0

total: 1 errors, 0 warnings, 441 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 9/20: linux-user: move s390x signal.c parts to s390x directory...
ERROR: spaces required around that '*' (ctx:VxV)
#37: FILE: linux-user/s390x/signal.c:35:
+#define _SIGMASK_COPY_SIZE    (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
                                                     ^

WARNING: line over 80 characters
#38: FILE: linux-user/s390x/signal.c:36:
+#define PSW_ADDR_AMODE            0x0000000000000000UL /* 0x80000000UL for 31-bit */

ERROR: do not use C99 // comments
#114: FILE: linux-user/s390x/signal.c:112:
+    //save_access_regs(current->thread.acrs); FIXME

ERROR: do not use C99 // comments
#130: FILE: linux-user/s390x/signal.c:128:
+    //save_fp_regs(&current->thread.fp_regs); FIXME

ERROR: do not use C99 // comments
#174: FILE: linux-user/s390x/signal.c:172:
+    env->regs[2] = sig; //map_signal(sig);

ERROR: do not use C99 // comments
#179: FILE: linux-user/s390x/signal.c:177:
+    env->regs[4] = 0; // FIXME: no clue... current->thread.trap_no;

ERROR: do not use C99 // comments
#180: FILE: linux-user/s390x/signal.c:178:
+    env->regs[5] = 0; // FIXME: no clue... current->thread.prot_addr;

ERROR: do not use C99 // comments
#237: FILE: linux-user/s390x/signal.c:235:
+    env->regs[2] = sig; //map_signal(sig);

total: 7 errors, 1 warnings, 634 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 10/20: linux-user: move m68k signal.c parts to m68k directory...
ERROR: open brace '{' following struct go on the same line
#39: FILE: linux-user/m68k/signal.c:37:
+struct target_sigframe
+{

ERROR: spaces required around that '-' (ctx:VxV)
#45: FILE: linux-user/m68k/signal.c:43:
+    abi_ulong extramask[TARGET_NSIG_WORDS-1];
                                          ^

ERROR: spaces required around that '*' (ctx:VxV)
#55: FILE: linux-user/m68k/signal.c:53:
+    int f_fpregs[8*3];
                   ^

ERROR: open brace '{' following struct go on the same line
#76: FILE: linux-user/m68k/signal.c:74:
+struct target_rt_sigframe
+{

ERROR: space prohibited between function name and open parenthesis '('
#127: FILE: linux-user/m68k/signal.c:125:
+    if ((ka->sa_flags & TARGET_SA_ONSTACK) && (sas_ss_flags (sp) == 0)) {

ERROR: return is not a function, parentheses are not required
#131: FILE: linux-user/m68k/signal.c:129:
+    return ((sp - frame_size) & -8UL);

ERROR: space required before the open parenthesis '('
#156: FILE: linux-user/m68k/signal.c:154:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: braces {} are necessary for all arms of this statement
#259: FILE: linux-user/m68k/signal.c:257:
+    if (temp != TARGET_MCONTEXT_VERSION)
[...]

ERROR: braces {} are necessary for all arms of this statement
#331: FILE: linux-user/m68k/signal.c:329:
+    if (err)
[...]

ERROR: space required before the open parenthesis '('
#334: FILE: linux-user/m68k/signal.c:332:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: braces {} are necessary for all arms of this statement
#349: FILE: linux-user/m68k/signal.c:347:
+    if (err)
[...]

ERROR: braces {} are necessary for all arms of this statement
#374: FILE: linux-user/m68k/signal.c:372:
+    if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
[...]

ERROR: space required before the open parenthesis '('
#381: FILE: linux-user/m68k/signal.c:379:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: braces {} are necessary for all arms of this statement
#407: FILE: linux-user/m68k/signal.c:405:
+    if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
[...]

ERROR: braces {} are necessary for all arms of this statement
#415: FILE: linux-user/m68k/signal.c:413:
+    if (target_rt_restore_ucontext(env, &frame->uc))
[...]

ERROR: braces {} are necessary for all arms of this statement
#418: FILE: linux-user/m68k/signal.c:416:
+    if (do_sigaltstack(frame_addr +
[...]

total: 16 errors, 0 warnings, 836 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 11/20: linux-user: move alpha signal.c parts to alpha directory...
Checking PATCH 12/20: linux-user: move tilegx signal.c parts to tilegx directory...
Checking PATCH 13/20: linux-user: move riscv signal.c parts to riscv directory...
Checking PATCH 14/20: linux-user: move hppa signal.c parts to hppa directory...
Checking PATCH 15/20: linux-user: move xtensa signal.c parts to xtensa directory...
Checking PATCH 16/20: linux-user: move i386/x86_64 signal.c parts to i386 directory...
ERROR: spaces required around that '-' (ctx:VxV)
#171: FILE: linux-user/i386/signal.c:167:
+    abi_ulong extramask[TARGET_NSIG_WORDS-1];
                                          ^

WARNING: line over 80 characters
#298: FILE: linux-user/i386/signal.c:294:
+            esp = target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size;

ERROR: braces {} are necessary for all arms of this statement
#330: FILE: linux-user/i386/signal.c:326:
+    if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0))
[...]

ERROR: space required before the open parenthesis '('
#338: FILE: linux-user/i386/signal.c:334:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: spaces required around that '+' (ctx:VxV)
#353: FILE: linux-user/i386/signal.c:349:
+        __put_user(val16, (uint16_t *)(frame->retcode+0));
                                                      ^

ERROR: spaces required around that '+' (ctx:VxV)
#354: FILE: linux-user/i386/signal.c:350:
+        __put_user(TARGET_NR_sigreturn, (int *)(frame->retcode+2));
                                                               ^

ERROR: spaces required around that '+' (ctx:VxV)
#356: FILE: linux-user/i386/signal.c:352:
+        __put_user(val16, (uint16_t *)(frame->retcode+6));
                                                      ^

ERROR: braces {} are necessary for all arms of this statement
#393: FILE: linux-user/i386/signal.c:389:
+    if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0))
[...]

ERROR: space required before the open parenthesis '('
#419: FILE: linux-user/i386/signal.c:415:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: spaces required around that '+' (ctx:VxV)
#433: FILE: linux-user/i386/signal.c:429:
+        __put_user(0xb8, (char *)(frame->retcode+0));
                                                 ^

ERROR: spaces required around that '+' (ctx:VxV)
#434: FILE: linux-user/i386/signal.c:430:
+        __put_user(TARGET_NR_rt_sigreturn, (int *)(frame->retcode+1));
                                                                  ^

ERROR: spaces required around that '+' (ctx:VxV)
#436: FILE: linux-user/i386/signal.c:432:
+        __put_user(val16, (uint16_t *)(frame->retcode+5));
                                                      ^

ERROR: code indent should never use tabs
#523: FILE: linux-user/i386/signal.c:519:
+    //^I^Iregs->orig_eax = -1;^I^I/* disable syscall checks */$

ERROR: do not use C99 // comments
#523: FILE: linux-user/i386/signal.c:519:
+    //		regs->orig_eax = -1;		/* disable syscall checks */

ERROR: braces {} are necessary for all arms of this statement
#527: FILE: linux-user/i386/signal.c:523:
+        if (!access_ok(VERIFY_READ, fpstate_addr,
[...]

ERROR: braces {} are necessary for all arms of this statement
#553: FILE: linux-user/i386/signal.c:549:
+    if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
[...]

ERROR: space required before the open parenthesis '('
#557: FILE: linux-user/i386/signal.c:553:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: braces {} are necessary for all arms of this statement
#565: FILE: linux-user/i386/signal.c:561:
+    if (restore_sigcontext(env, &frame->sc))
[...]

ERROR: braces {} are necessary for all arms of this statement
#585: FILE: linux-user/i386/signal.c:581:
+    if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
[...]

WARNING: line over 80 characters
#594: FILE: linux-user/i386/signal.c:590:
+    if (do_sigaltstack(frame_addr + offsetof(struct rt_sigframe, uc.tuc_stack), 0,

total: 18 errors, 2 warnings, 1196 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 17/20: linux-user: move sparc/sparc64 signal.c parts to sparc directory...
ERROR: space prohibited before open square bracket '['
#703: FILE: linux-user/sparc/signal.c:83:
+    } si_fpqueue [16];

ERROR: space prohibited between function name and open parenthesis '('
#711: FILE: linux-user/sparc/signal.c:91:
+    abi_ulong           insns[2] __attribute__ ((aligned (8)));

ERROR: code indent should never use tabs
#738: FILE: linux-user/sparc/signal.c:118:
+#define UREG_L0^I       8$

ERROR: trailing whitespace
#742: FILE: linux-user/sparc/signal.c:122:
+static inline abi_ulong get_sigframe(struct target_sigaction *sa, $

ERROR: line over 90 characters
#753: FILE: linux-user/sparc/signal.c:133:
+                && !((target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size) & 7)) {

WARNING: line over 80 characters
#754: FILE: linux-user/sparc/signal.c:134:
+            sp = target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size;

ERROR: spaces required around that '=' (ctx:VxV)
#769: FILE: linux-user/sparc/signal.c:149:
+    for (i=0; i < 8; i++) {
           ^

ERROR: spaces required around that '=' (ctx:VxV)
#772: FILE: linux-user/sparc/signal.c:152:
+    for (i=0; i < 8; i++) {
           ^

ERROR: spaces required around that '+' (ctx:VxV)
#773: FILE: linux-user/sparc/signal.c:153:
+        __put_user(env->regwptr[UREG_I0 + i], &si->si_regs.u_regs[i+8]);
                                                                    ^

ERROR: if this code is redundant consider removing it
#779: FILE: linux-user/sparc/signal.c:159:
+#if 0

ERROR: do not use C99 // comments
#807: FILE: linux-user/sparc/signal.c:187:
+    //synchronize_user_stack();

ERROR: if this code is redundant consider removing it
#818: FILE: linux-user/sparc/signal.c:198:
+#if 0

ERROR: braces {} are necessary for all arms of this statement
#819: FILE: linux-user/sparc/signal.c:199:
+    if (invalid_frame_pointer(sf, sigframe_size))
[...]

ERROR: do not use C99 // comments
#826: FILE: linux-user/sparc/signal.c:206:
+    //save_fpu_state(regs, &sf->fpu_state);

ERROR: do not use C99 // comments
#827: FILE: linux-user/sparc/signal.c:207:
+    //__put_user(&sf->fpu_state, &sf->fpu_save);

ERROR: braces {} are necessary for all arms of this statement
#840: FILE: linux-user/sparc/signal.c:220:
+    if (err)
[...]

ERROR: braces {} are necessary for all arms of this statement
#870: FILE: linux-user/sparc/signal.c:250:
+        if (err)
[...]

ERROR: do not use C99 // comments
#874: FILE: linux-user/sparc/signal.c:254:
+        // flush_sig_insns(current->mm, (unsigned long) &(sf->insns[0]));

ERROR: do not use C99 // comments
#875: FILE: linux-user/sparc/signal.c:255:
+        // tb_flush(env);

ERROR: if this code is redundant consider removing it
#879: FILE: linux-user/sparc/signal.c:259:
+#if 0

ERROR: spaces required around that '=' (ctx:VxV)
#902: FILE: linux-user/sparc/signal.c:282:
+    int err=0, i;
            ^

ERROR: braces {} are necessary for all arms of this statement
#912: FILE: linux-user/sparc/signal.c:292:
+    if (sf_addr & 3)
[...]

ERROR: spaces required around that '=' (ctx:VxV)
#932: FILE: linux-user/sparc/signal.c:312:
+    for (i=0; i < 8; i++) {
           ^

ERROR: spaces required around that '=' (ctx:VxV)
#935: FILE: linux-user/sparc/signal.c:315:
+    for (i=0; i < 8; i++) {
           ^

ERROR: spaces required around that '+' (ctx:VxV)
#936: FILE: linux-user/sparc/signal.c:316:
+        __get_user(env->regwptr[i + UREG_I0], &sf->info.si_regs.u_regs[i+8]);
                                                                         ^

ERROR: space required before the open parenthesis '('
#949: FILE: linux-user/sparc/signal.c:329:
+    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

ERROR: do not use C99 // comments
#1009: FILE: linux-user/sparc/signal.c:389:
+        //uint128_t qregs[16];

ERROR: spaces required around that '+' (ctx:VxV)
#1106: FILE: linux-user/sparc/signal.c:486:
+    w_addr = TARGET_STACK_BIAS+env->regwptr[UREG_I6];
                               ^

ERROR: spaces required around that '/' (ctx:VxV)
#1125: FILE: linux-user/sparc/signal.c:505:
+                __get_user(env->fpr[i/2].l.lower, src);
                                      ^

ERROR: spaces required around that '/' (ctx:VxV)
#1127: FILE: linux-user/sparc/signal.c:507:
+                __get_user(env->fpr[i/2].l.upper, src);
                                      ^

ERROR: trailing whitespace
#1158: FILE: linux-user/sparc/signal.c:538:
+    $

ERROR: braces {} are necessary for all arms of this statement
#1184: FILE: linux-user/sparc/signal.c:564:
+        if (err)
[...]

ERROR: do not use C99 // comments
#1189: FILE: linux-user/sparc/signal.c:569:
+    //    __put_user(env->tstate, &((*grp)[SPARC_MC_TSTATE]));

ERROR: spaces required around that '+' (ctx:VxV)
#1209: FILE: linux-user/sparc/signal.c:589:
+    w_addr = TARGET_STACK_BIAS+env->regwptr[UREG_I6];
                               ^

ERROR: spaces required around that '/' (ctx:VxV)
#1226: FILE: linux-user/sparc/signal.c:606:
+                __put_user(env->fpr[i/2].l.lower, dst);
                                      ^

ERROR: spaces required around that '/' (ctx:VxV)
#1228: FILE: linux-user/sparc/signal.c:608:
+                __put_user(env->fpr[i/2].l.upper, dst);
                                      ^

ERROR: braces {} are necessary for all arms of this statement
#1236: FILE: linux-user/sparc/signal.c:616:
+    if (err)
[...]

total: 36 errors, 1 warnings, 1244 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 18/20: linux-user: move mips/mips64 signal.c parts to mips directory...
ERROR: code indent should never use tabs
#72: FILE: linux-user/mips/signal.c:68:
+    uint32_t sf_ass[4];^I^I^I/* argument save space for o32 */$

ERROR: code indent should never use tabs
#73: FILE: linux-user/mips/signal.c:69:
+    uint32_t sf_code[2];^I^I^I/* signal trampoline */$

ERROR: space prohibited between function name and open parenthesis '('
#197: FILE: linux-user/mips/signal.c:193:
+    if ((ka->sa_flags & TARGET_SA_ONSTACK) && (sas_ss_flags (sp) == 0)) {

ERROR: "foo * bar" should be "foo *bar"
#215: FILE: linux-user/mips/signal.c:211:
+void setup_frame(int sig, struct target_sigaction * ka,

ERROR: space required before the open parenthesis '('
#232: FILE: linux-user/mips/signal.c:228:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: space prohibited after that open square bracket '['
#246: FILE: linux-user/mips/signal.c:242:
+    regs->active_tc.gpr[ 4] = sig;

ERROR: space prohibited after that open square bracket '['
#247: FILE: linux-user/mips/signal.c:243:
+    regs->active_tc.gpr[ 5] = 0;

ERROR: space prohibited after that open square bracket '['
#248: FILE: linux-user/mips/signal.c:244:
+    regs->active_tc.gpr[ 6] = frame_addr + offsetof(struct sigframe, sf_sc);

ERROR: braces {} are necessary for all arms of this statement
#273: FILE: linux-user/mips/signal.c:269:
+    if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
[...]

ERROR: space required before the open parenthesis '('
#276: FILE: linux-user/mips/signal.c:272:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: if this code is redundant consider removing it
#285: FILE: linux-user/mips/signal.c:281:
+#if 0

ERROR: code indent should never use tabs
#290: FILE: linux-user/mips/signal.c:286:
+   ^I"move\t$29, %0\n\t"$

ERROR: code indent should never use tabs
#291: FILE: linux-user/mips/signal.c:287:
+   ^I"j\tsyscall_exit"$

ERROR: code indent should never use tabs
#292: FILE: linux-user/mips/signal.c:288:
+   ^I:/* no outputs */$

ERROR: code indent should never use tabs
#293: FILE: linux-user/mips/signal.c:289:
+   ^I:"r" (&regs));$

ERROR: spaces required around that ':' (ctx:ExV)
#293: FILE: linux-user/mips/signal.c:289:
+   	:"r" (&regs));
    	^

WARNING: line over 80 characters
#331: FILE: linux-user/mips/signal.c:327:
+    __put_user(target_sigaltstack_used.ss_size, &frame->rs_uc.tuc_stack.ss_size);

ERROR: space required before the open parenthesis '('
#337: FILE: linux-user/mips/signal.c:333:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: space prohibited after that open square bracket '['
#351: FILE: linux-user/mips/signal.c:347:
+    env->active_tc.gpr[ 4] = sig;

ERROR: space prohibited after that open square bracket '['
#352: FILE: linux-user/mips/signal.c:348:
+    env->active_tc.gpr[ 5] = frame_addr

ERROR: space prohibited after that open square bracket '['
#354: FILE: linux-user/mips/signal.c:350:
+    env->active_tc.gpr[ 6] = frame_addr

ERROR: braces {} are necessary for all arms of this statement
#389: FILE: linux-user/mips/signal.c:385:
+    if (do_sigaltstack(frame_addr +
[...]

ERROR: "foo * bar" should be "foo *bar"
#416: FILE: linux-user/mips/target_signal.h:31:
+void setup_frame(int sig, struct target_sigaction * ka,

total: 22 errors, 1 warnings, 798 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 19/20: linux-user: move ppc/ppc64 signal.c parts to ppc directory...
ERROR: braces {} are necessary for all arms of this statement
#370: FILE: linux-user/ppc/signal.c:368:
+    if (sig)
[...]

ERROR: braces {} are necessary for all arms of this statement
#449: FILE: linux-user/ppc/signal.c:447:
+    if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 1))
[...]

ERROR: braces {} are necessary for all arms of this statement
#476: FILE: linux-user/ppc/signal.c:474:
+    if (err)
[...]

ERROR: braces {} are necessary for all arms of this statement
#513: FILE: linux-user/ppc/signal.c:511:
+    if (!lock_user_struct(VERIFY_WRITE, rt_sf, rt_sf_addr, 1))
[...]

ERROR: space prohibited between function name and open parenthesis '('
#527: FILE: linux-user/ppc/signal.c:525:
+    __put_user(h2g (&rt_sf->uc.tuc_mcontext),

ERROR: space required before the open parenthesis '('
#530: FILE: linux-user/ppc/signal.c:528:
+    for(i = 0; i < TARGET_NSIG_WORDS; i++) {

ERROR: braces {} are necessary for all arms of this statement
#560: FILE: linux-user/ppc/signal.c:558:
+    if (err)
[...]

ERROR: braces {} are necessary for all arms of this statement
#609: FILE: linux-user/ppc/signal.c:607:
+    if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1))
[...]

ERROR: braces {} are necessary for all arms of this statement
#622: FILE: linux-user/ppc/signal.c:620:
+    if (!lock_user_struct(VERIFY_READ, sr, sr_addr, 1))
[...]

WARNING: line over 80 characters
#646: FILE: linux-user/ppc/signal.c:644:
+    if (copy_from_user(&set, h2g(ucp) + offsetof(struct target_ucontext, tuc_sigmask),

ERROR: braces {} are necessary for all arms of this statement
#646: FILE: linux-user/ppc/signal.c:644:
+    if (copy_from_user(&set, h2g(ucp) + offsetof(struct target_ucontext, tuc_sigmask),
[...]

ERROR: space prohibited between function name and open parenthesis '('
#647: FILE: linux-user/ppc/signal.c:645:
+                       sizeof (set)))

ERROR: braces {} are necessary for all arms of this statement
#657: FILE: linux-user/ppc/signal.c:655:
+    if (!lock_user_struct(VERIFY_READ, mcp, mcp_addr, 1))
[...]

ERROR: braces {} are necessary for all arms of this statement
#674: FILE: linux-user/ppc/signal.c:672:
+    if (!lock_user_struct(VERIFY_READ, rt_sf, rt_sf_addr, 1))
[...]

ERROR: braces {} are necessary for all arms of this statement
#677: FILE: linux-user/ppc/signal.c:675:
+    if (do_setcontext(&rt_sf->uc, env, 1))
[...]

total: 14 errors, 1 warnings, 1362 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 20/20: linux-user: define TARGET_ARCH_HAS_SETUP_FRAME...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories
Posted by Alex Bennée 6 years ago
Laurent Vivier <laurent@vivier.eu> writes:

> 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.

I think de-tabifying is worth it as it's a whitespace fix. Sure you can
leave everything else.

Anyway for the rest of the series it looks good to me (although I only
tested ARM).

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


>
> 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)
>
> Laurent Vivier (20):
>   linux-user: create a dummy per arch signal.c
>   linux-user: move aarch64 signal.c parts to aarch64 directory
>   linux-user: move arm signal.c parts to arm directory
>   linux-user: move sh4 signal.c parts to sh4 directory
>   linux-user: move microblaze signal.c parts to microblaze directory
>   linux-user: move cris signal.c parts to cris directory
>   linux-user: move nios2 signal.c parts to nios2 directory
>   linux-user: move openrisc signal.c parts to openrisc directory
>   linux-user: move s390x signal.c parts to s390x directory
>   linux-user: move m68k signal.c parts to m68k directory
>   linux-user: move alpha signal.c parts to alpha directory
>   linux-user: move tilegx signal.c parts to tilegx directory
>   linux-user: move riscv signal.c parts to riscv directory
>   linux-user: move hppa signal.c parts to hppa directory
>   linux-user: move xtensa signal.c parts to xtensa directory
>   linux-user: move i386/x86_64 signal.c parts to i386 directory
>   linux-user: move sparc/sparc64 signal.c parts to sparc directory
>   linux-user: move mips/mips64 signal.c parts to mips directory
>   linux-user: move ppc/ppc64 signal.c parts to ppc directory
>   linux-user: define TARGET_ARCH_HAS_SETUP_FRAME
>
>  linux-user/Makefile.objs              |    2 +-
>  linux-user/aarch64/signal.c           |  579 +++
>  linux-user/aarch64/target_signal.h    |    6 +
>  linux-user/alpha/signal.c             |  280 ++
>  linux-user/alpha/target_signal.h      |    6 +
>  linux-user/arm/signal.c               |  772 ++++
>  linux-user/arm/target_signal.h        |    7 +-
>  linux-user/cris/signal.c              |  189 +
>  linux-user/cris/target_signal.h       |    7 +-
>  linux-user/hppa/signal.c              |  210 ++
>  linux-user/hppa/target_signal.h       |    3 +
>  linux-user/i386/signal.c              |  602 +++
>  linux-user/i386/target_signal.h       |    6 +
>  linux-user/m68k/signal.c              |  428 +++
>  linux-user/m68k/target_signal.h       |    7 +-
>  linux-user/microblaze/signal.c        |  248 ++
>  linux-user/microblaze/target_signal.h |    7 +-
>  linux-user/mips/signal.c              |  400 ++
>  linux-user/mips/target_signal.h       |   10 +-
>  linux-user/mips64/signal.c            |   20 +
>  linux-user/mips64/target_signal.h     |    4 +-
>  linux-user/nios2/signal.c             |  254 ++
>  linux-user/nios2/target_signal.h      |    4 +
>  linux-user/openrisc/signal.c          |  231 ++
>  linux-user/openrisc/target_signal.h   |    4 +-
>  linux-user/ppc/signal.c               |  689 ++++
>  linux-user/ppc/target_signal.h        |    9 +-
>  linux-user/riscv/signal.c             |  218 ++
>  linux-user/riscv/target_signal.h      |    3 +
>  linux-user/s390x/signal.c             |  327 ++
>  linux-user/s390x/target_signal.h      |    7 +-
>  linux-user/sh4/signal.c               |  350 ++
>  linux-user/sh4/target_signal.h        |    6 +
>  linux-user/signal-common.h            |   50 +
>  linux-user/signal.c                   | 6654 +--------------------------------
>  linux-user/sparc/signal.c             |  624 ++++
>  linux-user/sparc/target_signal.h      |    7 +-
>  linux-user/sparc64/signal.c           |   20 +
>  linux-user/sparc64/target_signal.h    |    7 +-
>  linux-user/tilegx/signal.c            |  186 +
>  linux-user/tilegx/target_signal.h     |    4 +-
>  linux-user/x86_64/signal.c            |   20 +
>  linux-user/x86_64/target_signal.h     |    3 +
>  linux-user/xtensa/signal.c            |  275 ++
>  linux-user/xtensa/target_signal.h     |    3 +
>  45 files changed, 7155 insertions(+), 6593 deletions(-)
>  create mode 100644 linux-user/aarch64/signal.c
>  create mode 100644 linux-user/alpha/signal.c
>  create mode 100644 linux-user/arm/signal.c
>  create mode 100644 linux-user/cris/signal.c
>  create mode 100644 linux-user/hppa/signal.c
>  create mode 100644 linux-user/i386/signal.c
>  create mode 100644 linux-user/m68k/signal.c
>  create mode 100644 linux-user/microblaze/signal.c
>  create mode 100644 linux-user/mips/signal.c
>  create mode 100644 linux-user/mips64/signal.c
>  create mode 100644 linux-user/nios2/signal.c
>  create mode 100644 linux-user/openrisc/signal.c
>  create mode 100644 linux-user/ppc/signal.c
>  create mode 100644 linux-user/riscv/signal.c
>  create mode 100644 linux-user/s390x/signal.c
>  create mode 100644 linux-user/sh4/signal.c
>  create mode 100644 linux-user/signal-common.h
>  create mode 100644 linux-user/sparc/signal.c
>  create mode 100644 linux-user/sparc64/signal.c
>  create mode 100644 linux-user/tilegx/signal.c
>  create mode 100644 linux-user/x86_64/signal.c
>  create mode 100644 linux-user/xtensa/signal.c


--
Alex Bennée

Re: [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories
Posted by Daniel P. Berrangé 6 years ago
On Wed, Mar 28, 2018 at 03:41:52PM +0100, Alex Bennée wrote:
> 
> Laurent Vivier <laurent@vivier.eu> writes:
> 
> > 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.
> 
> I think de-tabifying is worth it as it's a whitespace fix. Sure you can
> leave everything else.

I'm all for doing cleanups of existing code to satisfy checkpatch
too. Just make sure any cleanups are done as completely separate
patches, not fixed with other functional changes.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories
Posted by Laurent Vivier 6 years ago
Le 28/03/2018 à 16:41, Alex Bennée a écrit :
> 
> Laurent Vivier <laurent@vivier.eu> writes:
> 
>> 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.
> 
> I think de-tabifying is worth it as it's a whitespace fix. Sure you can
> leave everything else.
> 
> Anyway for the rest of the series it looks good to me (although I only
> tested ARM).
> 
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

Thank you,

For testing, I have "debootstrap"ed the following architectures:

stretch: s390x ppc64le mipsel mips64el mips arm aarch64
jessie:  ppc
lenny:   hppa
sid:     m68k ppc64 sh4

I've tried sparc32plus, sparc64 and alpha but they are already broken
without this patch series.

For the other architectures, I rely only on the results of "make check".
(microblaze, cris, nios2, openrisc, tilegx, riscv, xtensa).

If someone has pointers to debian repo for these archs, please share.

Thanks,
Laurent

Re: [Qemu-devel] [PATCH for 2.13 v2 00/20] linux-user: move arch specific parts to arch directories
Posted by Richard Henderson 6 years ago
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 <richard.henderson@linaro.org>


r~