mbox series

[v2,00/25] linux-user/sparc: Implement rt signals

Message ID 20210426025334.1168495-1-richard.henderson@linaro.org
Headers show
Series linux-user/sparc: Implement rt signals | expand

Message

Richard Henderson April 26, 2021, 2:53 a.m. UTC
Supercedes: 20210425155749.896330-1-richard.henderson@linaro.org
("linux-user/sparc64: Implement signals")

This time, in the lead-up, merge the sparc and sparc64 directories.
Implement rt signals for sparc32 as well, since there are only a few
differences between the two.


r~


Richard Henderson (25):
  linux-user: Split out target_restore_altstack
  linux-user: Use target_restore_altstack in all sigreturn
  linux-user: Pass CPUArchState to do_sigaltstack
  linux-user: Pass CPUArchState to target_restore_altstack
  linux-user/sparc: Include TARGET_STACK_BIAS in get_sp_from_cpustate
  linux-user/sparc: Clean up init_thread
  linux-user/sparc: Merge sparc64 target_syscall.h
  linux-user/sparc: Merge sparc64 target_elf.h
  linux-user/sparc: Merge sparc64 target_structs.h
  linux-user/sparc: Merge sparc64 termbits.h
  linux-user/sparc: Merge sparc64/ into sparc/
  linux-user/sparc: Remove target_sigcontext as unused
  linux-user/sparc: Remove target_rt_signal_frame as unused
  linux-user/sparc: Fix the stackframe structure
  linux-user/sparc: Use target_pt_regs
  linux-user/sparc: Split out save_reg_win
  linux-user/sparc: Clean up get_sigframe
  linux-user/sparc: Save and restore fpu in signal frame
  linux-user/sparc: Add rwin_save to signal frame
  linux-user/sparc: Clean up setup_frame
  linux-user/sparc: Minor corrections to do_sigreturn
  linux-user/sparc: Add 64-bit support to fpu save/restore
  linux-user/sparc: Implement sparc32 rt signals
  linux-user/sparc: Implement sparc64 rt signals
  tests/tcg/sparc64: Re-enable linux-test

 .../targets/sparc64-linux-user.mak            |   1 +
 linux-user/qemu.h                             |   3 +-
 linux-user/signal-common.h                    |   1 +
 linux-user/sparc/target_cpu.h                 |   9 +-
 linux-user/sparc/target_signal.h              |   2 +
 linux-user/sparc/target_structs.h             |  36 +-
 linux-user/sparc/target_syscall.h             |  42 +-
 linux-user/sparc64/sockbits.h                 |   1 -
 linux-user/sparc64/target_cpu.h               |   1 -
 linux-user/sparc64/target_elf.h               |  14 -
 linux-user/sparc64/target_fcntl.h             |   1 -
 linux-user/sparc64/target_signal.h            |   1 -
 linux-user/sparc64/target_structs.h           |  58 --
 linux-user/sparc64/target_syscall.h           |  35 --
 linux-user/sparc64/termbits.h                 | 291 ----------
 linux-user/aarch64/signal.c                   |   6 +-
 linux-user/alpha/signal.c                     |   6 +-
 linux-user/arm/signal.c                       |   9 +-
 linux-user/elfload.c                          |  33 +-
 linux-user/hexagon/signal.c                   |   6 +-
 linux-user/hppa/signal.c                      |   8 +-
 linux-user/i386/signal.c                      |   5 +-
 linux-user/m68k/signal.c                      |   5 +-
 linux-user/microblaze/signal.c                |   6 +-
 linux-user/mips/signal.c                      |   6 +-
 linux-user/nios2/signal.c                     |   8 +-
 linux-user/openrisc/signal.c                  |   5 +-
 linux-user/ppc/signal.c                       |   4 +-
 linux-user/riscv/signal.c                     |   6 +-
 linux-user/s390x/signal.c                     |   6 +-
 linux-user/sh4/signal.c                       |   7 +-
 linux-user/signal.c                           | 120 ++--
 linux-user/sparc/signal.c                     | 535 ++++++++++++------
 linux-user/sparc64/cpu_loop.c                 |  20 -
 linux-user/sparc64/signal.c                   |  19 -
 linux-user/syscall.c                          |   3 +-
 linux-user/xtensa/signal.c                    |   6 +-
 linux-user/meson.build                        |   1 -
 linux-user/sparc64/meson.build                |   5 -
 linux-user/sparc64/syscall.tbl                | 487 ----------------
 linux-user/sparc64/syscallhdr.sh              |  32 --
 tests/tcg/sparc64/Makefile.target             |   7 +-
 42 files changed, 504 insertions(+), 1353 deletions(-)
 delete mode 100644 linux-user/sparc64/sockbits.h
 delete mode 100644 linux-user/sparc64/target_cpu.h
 delete mode 100644 linux-user/sparc64/target_elf.h
 delete mode 100644 linux-user/sparc64/target_fcntl.h
 delete mode 100644 linux-user/sparc64/target_signal.h
 delete mode 100644 linux-user/sparc64/target_structs.h
 delete mode 100644 linux-user/sparc64/target_syscall.h
 delete mode 100644 linux-user/sparc64/termbits.h
 delete mode 100644 linux-user/sparc64/cpu_loop.c
 delete mode 100644 linux-user/sparc64/signal.c
 delete mode 100644 linux-user/sparc64/meson.build
 delete mode 100644 linux-user/sparc64/syscall.tbl
 delete mode 100644 linux-user/sparc64/syscallhdr.sh

-- 
2.25.1

Comments

Richard Henderson April 26, 2021, 3:06 a.m. UTC | #1
On 4/25/21 7:53 PM, Richard Henderson wrote:
> Supercedes:20210425155749.896330-1-richard.henderson@linaro.org

> ("linux-user/sparc64: Implement signals")

> 

> This time, in the lead-up, merge the sparc and sparc64 directories.

> Implement rt signals for sparc32 as well, since there are only a few

> differences between the two.


I notice that we don't actually have any sparc32 testing in tree.
I wonder if I can steal an old debian libc image to install along with our 
modern-ish sparc64 compiler to get this working...

Also, I've just had a look through linux/arch/sparc/kernel/sparc32.c, and see 
that there's more work to be done for sparcv8plus.  In particular, need to save 
the high-half of the global and out registers.


r~
Alex Bennée April 26, 2021, 11:41 a.m. UTC | #2
Richard Henderson <richard.henderson@linaro.org> writes:

> On 4/25/21 7:53 PM, Richard Henderson wrote:

>> Supercedes:20210425155749.896330-1-richard.henderson@linaro.org

>> ("linux-user/sparc64: Implement signals")

>> This time, in the lead-up, merge the sparc and sparc64 directories.

>> Implement rt signals for sparc32 as well, since there are only a few

>> differences between the two.

>

> I notice that we don't actually have any sparc32 testing in tree.

> I wonder if I can steal an old debian libc image to install along with

> our modern-ish sparc64 compiler to get this working...


It depends on the crt0 bits packaged with the sparc64 compiler. I went
through this with riscv64/32 and found the compiler as packaged by
debian couldn't build 32 bit because it wasn't configured to.

Having said that if we are not expecting things to change that much we
could just do it the same way as hexagon. The alternative is to convince
someone to start a estoteric binary distribution that caters to weird
and ancient build tools ;-)

>

> Also, I've just had a look through linux/arch/sparc/kernel/sparc32.c,

> and see that there's more work to be done for sparcv8plus.  In

> particular, need to save the high-half of the global and out

> registers.

>

>

> r~



-- 
Alex Bennée
Laurent Vivier May 15, 2021, 7:43 p.m. UTC | #3
Le 26/04/2021 à 04:53, Richard Henderson a écrit :
> Supercedes: 20210425155749.896330-1-richard.henderson@linaro.org

> ("linux-user/sparc64: Implement signals")

> 

> This time, in the lead-up, merge the sparc and sparc64 directories.

> Implement rt signals for sparc32 as well, since there are only a few

> differences between the two.

> 

> 

> r~

> 

> 

> Richard Henderson (25):

>   linux-user: Split out target_restore_altstack

>   linux-user: Use target_restore_altstack in all sigreturn

>   linux-user: Pass CPUArchState to do_sigaltstack

>   linux-user: Pass CPUArchState to target_restore_altstack

>   linux-user/sparc: Include TARGET_STACK_BIAS in get_sp_from_cpustate

>   linux-user/sparc: Clean up init_thread

>   linux-user/sparc: Merge sparc64 target_syscall.h

>   linux-user/sparc: Merge sparc64 target_elf.h

>   linux-user/sparc: Merge sparc64 target_structs.h

>   linux-user/sparc: Merge sparc64 termbits.h

>   linux-user/sparc: Merge sparc64/ into sparc/

>   linux-user/sparc: Remove target_sigcontext as unused

>   linux-user/sparc: Remove target_rt_signal_frame as unused

>   linux-user/sparc: Fix the stackframe structure

>   linux-user/sparc: Use target_pt_regs

>   linux-user/sparc: Split out save_reg_win

>   linux-user/sparc: Clean up get_sigframe

>   linux-user/sparc: Save and restore fpu in signal frame

>   linux-user/sparc: Add rwin_save to signal frame

>   linux-user/sparc: Clean up setup_frame

>   linux-user/sparc: Minor corrections to do_sigreturn

>   linux-user/sparc: Add 64-bit support to fpu save/restore

>   linux-user/sparc: Implement sparc32 rt signals

>   linux-user/sparc: Implement sparc64 rt signals

>   tests/tcg/sparc64: Re-enable linux-test

> 

>  .../targets/sparc64-linux-user.mak            |   1 +

>  linux-user/qemu.h                             |   3 +-

>  linux-user/signal-common.h                    |   1 +

>  linux-user/sparc/target_cpu.h                 |   9 +-

>  linux-user/sparc/target_signal.h              |   2 +

>  linux-user/sparc/target_structs.h             |  36 +-

>  linux-user/sparc/target_syscall.h             |  42 +-

>  linux-user/sparc64/sockbits.h                 |   1 -

>  linux-user/sparc64/target_cpu.h               |   1 -

>  linux-user/sparc64/target_elf.h               |  14 -

>  linux-user/sparc64/target_fcntl.h             |   1 -

>  linux-user/sparc64/target_signal.h            |   1 -

>  linux-user/sparc64/target_structs.h           |  58 --

>  linux-user/sparc64/target_syscall.h           |  35 --

>  linux-user/sparc64/termbits.h                 | 291 ----------

>  linux-user/aarch64/signal.c                   |   6 +-

>  linux-user/alpha/signal.c                     |   6 +-

>  linux-user/arm/signal.c                       |   9 +-

>  linux-user/elfload.c                          |  33 +-

>  linux-user/hexagon/signal.c                   |   6 +-

>  linux-user/hppa/signal.c                      |   8 +-

>  linux-user/i386/signal.c                      |   5 +-

>  linux-user/m68k/signal.c                      |   5 +-

>  linux-user/microblaze/signal.c                |   6 +-

>  linux-user/mips/signal.c                      |   6 +-

>  linux-user/nios2/signal.c                     |   8 +-

>  linux-user/openrisc/signal.c                  |   5 +-

>  linux-user/ppc/signal.c                       |   4 +-

>  linux-user/riscv/signal.c                     |   6 +-

>  linux-user/s390x/signal.c                     |   6 +-

>  linux-user/sh4/signal.c                       |   7 +-

>  linux-user/signal.c                           | 120 ++--

>  linux-user/sparc/signal.c                     | 535 ++++++++++++------

>  linux-user/sparc64/cpu_loop.c                 |  20 -

>  linux-user/sparc64/signal.c                   |  19 -

>  linux-user/syscall.c                          |   3 +-

>  linux-user/xtensa/signal.c                    |   6 +-

>  linux-user/meson.build                        |   1 -

>  linux-user/sparc64/meson.build                |   5 -

>  linux-user/sparc64/syscall.tbl                | 487 ----------------

>  linux-user/sparc64/syscallhdr.sh              |  32 --

>  tests/tcg/sparc64/Makefile.target             |   7 +-

>  42 files changed, 504 insertions(+), 1353 deletions(-)

>  delete mode 100644 linux-user/sparc64/sockbits.h

>  delete mode 100644 linux-user/sparc64/target_cpu.h

>  delete mode 100644 linux-user/sparc64/target_elf.h

>  delete mode 100644 linux-user/sparc64/target_fcntl.h

>  delete mode 100644 linux-user/sparc64/target_signal.h

>  delete mode 100644 linux-user/sparc64/target_structs.h

>  delete mode 100644 linux-user/sparc64/target_syscall.h

>  delete mode 100644 linux-user/sparc64/termbits.h

>  delete mode 100644 linux-user/sparc64/cpu_loop.c

>  delete mode 100644 linux-user/sparc64/signal.c

>  delete mode 100644 linux-user/sparc64/meson.build

>  delete mode 100644 linux-user/sparc64/syscall.tbl

>  delete mode 100644 linux-user/sparc64/syscallhdr.sh

> 


Applied to my linux-user-for-6.1 branch.

Thanks,
Laurent