linux-stable/arch/arm/kernel
Ard Biesheuvel 66689127f1 ARM: 9352/1: iwmmxt: Remove support for PJ4/PJ4B cores
[ Upstream commit b9920fdd5a ]

PJ4 is a v7 core that incorporates a iWMMXt coprocessor. However, GCC
does not support this combination (its iWMMXt configuration always
implies v5te), and so there is no v6/v7 user space that actually makes
use of this, beyond generic support for things like setjmp() that
preserve/restore the iWMMXt register file using generic LDC/STC
instructions emitted in assembler.  As [0] appears to imply, this logic
is triggered for the init process at boot, and so most user threads will
have a iWMMXt register context associated with it, even though it is
never used.

At this point, it is highly unlikely that such GCC support will ever
materialize (and Clang does not implement support for iWMMXt to begin
with).

This means that advertising iWMMXt support on these cores results in
context switch overhead without any associated benefit, and so it is
better to simply ignore the iWMMXt unit on these systems. So rip out the
support. Doing so also fixes the issue reported in [0] related to UNDEF
handling of co-processor #0/#1 instructions issued from user space
running in Thumb2 mode.

The PJ4 cores are used in four platforms: Armada 370/xp, Dove (Cubox,
d2plug), MMP2 (xo-1.75) and Berlin (Google TV). Out of these, only the
first is still widely used, but that one actually doesn't have iWMMXt
but instead has only VFPV3-D16, and so it is not impacted by this
change.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218427 [0]

Fixes: 8bcba70cb5 ("ARM: entry: Disregard Thumb undef exception ...")
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:28:50 +02:00
..
.gitignore
arch_timer.c
armksyms.c
asm-offsets.c Merge branch 'devel-stable' into for-next 2023-08-14 12:18:06 +01:00
atags.h
atags_compat.c
atags_parse.c ARM: 9300/1: Replace all non-returning strlcpy with strscpy 2023-06-19 09:35:49 +01:00
atags_proc.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
bios32.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
bugs.c ARM: cpu: Switch to arch_cpu_finalize_init() 2023-06-16 10:15:59 +02:00
cpuidle.c ARM: cpuidle: Drop of_device.h include 2023-04-13 17:46:34 -05:00
crash_dump.c vmcore: convert copy_oldmem_page() to take an iov_iter 2022-04-29 14:37:59 -07:00
debug.S
devtree.c ARM: make ARCH_MULTIPLATFORM user-visible 2022-08-30 11:18:09 +02:00
dma.c
early_printk.c
efi.c efi: Do not include <linux/screen_info.h> from EFI header 2023-07-08 20:26:36 +02:00
elf.c
entry-armv.S Merge branch 'devel-stable' into for-next 2023-08-14 12:18:06 +01:00
entry-common.S ARM: ptrace: Restore syscall restart tracing 2023-08-16 13:58:49 -07:00
entry-ftrace.S ARM: ftrace: enable the graph tracer with the EABI unwinder 2022-02-09 09:13:59 +01:00
entry-header.S context_tracking: Split user tracking Kconfig 2022-06-29 17:04:09 -07:00
entry-v7m.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
fiq.c ARM: 9315/1: fiq: include asm/mach/irq.h for prototypes 2023-06-19 09:36:00 +01:00
fiqasm.S
ftrace.c ftrace: Remove return value of ftrace_arch_modify_*() 2022-05-26 21:13:00 -04:00
head-common.S ARM: implement THREAD_INFO_IN_TASK for uniprocessor systems 2021-12-06 12:49:17 +01:00
head-inflate-data.c ARM: 9310/1: xip-kernel: add __inflate_kernel_data prototype 2023-06-19 09:35:56 +01:00
head-nommu.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
head.h ARM: 9310/1: xip-kernel: add __inflate_kernel_data prototype 2023-06-19 09:35:56 +01:00
head.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
hibernate.c ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
hw_breakpoint.c hw_breakpoint: fix single-stepping when using bpf_overflow_handler 2023-08-18 17:04:09 +01:00
hyp-stub.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
insn.c ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link() 2021-06-07 12:56:20 +01:00
io.c
irq.c asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. 2022-09-05 17:20:55 +02:00
isa.c arm: simplify two-level sysctl registration for ctl_isa_vars 2023-04-13 11:49:35 -07:00
iwmmxt.h
iwmmxt.S ARM: 9352/1: iwmmxt: Remove support for PJ4/PJ4B cores 2024-04-03 15:28:50 +02:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kgdb.c ARM: Fix kgdb breakpoint for Thumb2 2022-02-21 14:56:53 +00:00
machine_kexec.c ARM: 9317/1: kexec: Make smp stop calls asynchronous 2023-08-14 12:16:59 +01:00
Makefile ARM: 9352/1: iwmmxt: Remove support for PJ4/PJ4B cores 2024-04-03 15:28:50 +02:00
module-plts.c ARM: module: Use module_init_layout_section() to spot init sections 2023-08-03 13:42:02 -07:00
module.c ARM: 9299/1: module: use sign_extend32() to extend the signedness 2023-06-19 09:35:48 +01:00
opcodes.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
paravirt.c x86/paravirt: Switch time pvops functions to use static_call() 2021-03-11 16:17:52 +01:00
patch.c
perf_callchain.c ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code 2022-11-08 18:36:18 +00:00
perf_event_v6.c
perf_event_v7.c arm_pmu: Fix write counter incorrect in ARMv7 big-endian mode 2021-06-01 14:17:01 +01:00
perf_event_xscale.c
perf_regs.c
phys2virt.S
process.c ARM: kernel: Get rid of thread_info::used_cp[] array 2023-05-17 15:08:22 +02:00
psci_smp.c
ptrace.c ARM updates for v6.6-rc1 2023-08-31 12:49:10 -07:00
reboot.c ARM: 9219/1: fix undeclared soft_restart 2022-07-28 15:09:17 +01:00
reboot.h
relocate_kernel.S ARM: kexec: fix oops after TLB are invalidated 2021-02-05 10:23:29 +00:00
return_address.c ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code 2022-11-08 18:36:18 +00:00
setup.c ARM: 9308/1: move setup functions to header 2023-06-19 09:35:55 +01:00
signal.c x86/shstk: Add user control-protection fault handler 2023-08-02 15:01:50 -07:00
signal.h
sigreturn_codes.S
sleep.S ARM: mm: switch to swapper_pg_dir early for vmap'ed stack 2022-01-24 20:37:55 +01:00
smccc-call.S ARM: 9075/1: kernel: Fix interrupted SMC calls 2021-04-18 19:15:14 +01:00
smp.c nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
smp_scu.c
smp_tlb.c
smp_twd.c
spectre.c ARM: fix build error when BPF_SYSCALL is disabled 2022-03-08 12:53:05 -08:00
stacktrace.c ARM: 9259/1: stacktrace: Convert stacktrace to generic ARCH_STACKWALK 2022-11-14 12:00:57 +00:00
suspend.c ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
swp_emulate.c ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
sys_arm.c ARM: 9309/1: add missing syscall prototypes 2023-06-19 09:35:55 +01:00
sys_oabi-compat.c ARM: 9309/1: add missing syscall prototypes 2023-06-19 09:35:55 +01:00
tcm.c ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
thumbee.c
time.c
topology.c
traps.c ARM: 9302/1: traps: hide unused functions on NOMMU 2023-06-19 09:35:50 +01:00
unwind.c ARM: 9295/1: unwind:fix unwind abort for uleb128 case 2023-05-05 10:16:40 +01:00
v7m.c
vdso.c ARM: 9300/1: Replace all non-returning strlcpy with strscpy 2023-06-19 09:35:49 +01:00
vmlinux-xip.lds.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
vmlinux.lds.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
xscale-cp0.c ARM: iwmmxt: Use undef hook to enable coprocessor for task 2023-05-17 15:08:22 +02:00