[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] linux-user/arm/signal.c: Drop TARGET_CONFIG_CPU_32
From: |
Peter Maydell |
Subject: |
[PATCH] linux-user/arm/signal.c: Drop TARGET_CONFIG_CPU_32 |
Date: |
Mon, 12 Oct 2020 16:33:45 +0100 |
The Arm signal-handling code has some parts ifdeffed with a
TARGET_CONFIG_CPU_32, which is always defined. This is a leftover
from when this code's structure was based on the Linux kernel
signal handling code, where it was intended to support 26-bit
Arm CPUs. The kernel dropped its CONFIG_CPU_32 in kernel commit
4da8b8208eded0ba21e3 in 2009.
QEMU has never had 26-bit CPU support and is unlikely to ever
add it; we certainly aren't going to support 26-bit Linux
binaries via linux-user mode. The ifdef is just unhelpful
noise, so remove it entirely.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Based-on: <20200518142801.20503-1-peter.maydell@linaro.org>
("[PATCH v2] target/arm: Allow user-mode code to write CPSR.E via MSR")
to avoid a textual conflict.
linux-user/arm/signal.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/linux-user/arm/signal.c b/linux-user/arm/signal.c
index 698985a647e..f21d1535e4d 100644
--- a/linux-user/arm/signal.c
+++ b/linux-user/arm/signal.c
@@ -126,8 +126,6 @@ struct rt_sigframe_v2
abi_ulong retcode[4];
};
-#define TARGET_CONFIG_CPU_32 1
-
/*
* For ARM syscalls, we encode the syscall number into the instruction.
*/
@@ -187,9 +185,7 @@ setup_sigcontext(struct target_sigcontext *sc, /*struct
_fpstate *fpstate,*/
__put_user(env->regs[13], &sc->arm_sp);
__put_user(env->regs[14], &sc->arm_lr);
__put_user(env->regs[15], &sc->arm_pc);
-#ifdef TARGET_CONFIG_CPU_32
__put_user(cpsr_read(env), &sc->arm_cpsr);
-#endif
__put_user(/* current->thread.trap_no */ 0, &sc->trap_no);
__put_user(/* current->thread.error_code */ 0, &sc->error_code);
@@ -549,11 +545,9 @@ restore_sigcontext(CPUARMState *env, struct
target_sigcontext *sc)
__get_user(env->regs[13], &sc->arm_sp);
__get_user(env->regs[14], &sc->arm_lr);
__get_user(env->regs[15], &sc->arm_pc);
-#ifdef TARGET_CONFIG_CPU_32
__get_user(cpsr, &sc->arm_cpsr);
cpsr_write(env, cpsr, CPSR_USER | CPSR_EXEC, CPSRWriteByInstr);
arm_rebuild_hflags(env);
-#endif
err |= !valid_user_regs(env);
--
2.20.1
- Re: [PATCH for-5.1] hw/arm/netduino2, netduinoplus2: Set system_clock_scale, (continued)
[PATCH for-5.1] hw/arm/nrf51_soc: Set system_clock_scale, Peter Maydell, 2020/10/12
[PATCH] hw/arm/mps2: New board model mps2-386, Peter Maydell, 2020/10/12
[PATCH] hw/display/bcm2835_fb.c: Initialize all fields of struct, Peter Maydell, 2020/10/12
[PATCH] hw/intc/arm_gicv3_cpuif: Don't copy CPU's maintenance interrupt, Peter Maydell, 2020/10/12
[PATCH for-5.1] hw/timer/imx_epit: Avoid assertion when CR.SWR is written, Peter Maydell, 2020/10/12
[PATCH] hw/timer/armv7m_systick: assert that board code set system_clock_scale, Peter Maydell, 2020/10/12
[PATCH] hw/intc/arm_gicv3_cpuif: Make GIC maintenance interrupts work, Peter Maydell, 2020/10/12
[PATCH] linux-user/arm/signal.c: Drop TARGET_CONFIG_CPU_32,
Peter Maydell <=
[PATCH] hw/virtio/virtio-iommu-pci.c: Fix typo in error message, Peter Maydell, 2020/10/12
[PATCH] hw/input/virtio-input-hid.c: Don't undef CONFIG_CURSES, Peter Maydell, 2020/10/12
[PATCH] meson.build: Don't look for libudev for static builds, Peter Maydell, 2020/10/12
[PATCH for-5.1] qapi/machine.json: Fix missing newline in doc comment, Peter Maydell, 2020/10/12
[RFC PATCH v2] linux-user: Use FD_32BIT_MODE fd flag for 32-bit guests, Peter Maydell, 2020/10/12
[PATCH] osdep.h: Add doc comment for qemu_get_thread_id(), Peter Maydell, 2020/10/12
[PATCH] msf2-soc, stellaris: Don't wire up SYSRESETREQ, Peter Maydell, 2020/10/12
[PATCH] target/arm: Delete unused ARM_FEATURE_CRC, Peter Maydell, 2020/10/12
[PATCH] target/arm: Delete unused VFP_DREG macros, Peter Maydell, 2020/10/12
[PATCH] net/tap-solaris.c: Include qemu-common.h for TFR macro, Peter Maydell, 2020/10/12