Re: [PATCH v2 00/14] ARM: deprecated platform removal
From: Brad Hawthorne
Date: Sat Nov 21 2026 - 19:49:24 EST
Hi Arnd, Linus, Yoshifumi,
A second ARMv8-M user, in support of keeping CONFIG_CPU_V7M for v8-M.
I run Linux on the Raspberry Pi RP2350 (dual Cortex-M33, 520 KiB SRAM,
8 MiB PSRAM, XIP from QSPI flash) on an Adafruit Fruit Jam board. It
boots v7.4-rc3 to a userspace shell over the SoC's own USB device
controller, with the kernel executing in place from flash. Like
Yoshifumi I need the v7-M core, PMSAv8 and the NVIC far more than any
one platform, and I don't object to the MCU platform removals. The
Fruit Jam is a small self-contained computer (HDMI, USB host, SD card,
Wi-Fi), and I am preparing a public developer preview of this Linux for
it, so the core has users beyond me. On the RP2350 I use PMSAv8 to give
each process its own MPU windows, so a user program cannot write another
program's memory or the kernel's; that work is out of tree for now.
I tested the generic IRQ entry work on the board, v7.4-rc3 plus the
RP2350 platform patches, each case in its own process: a register-heavy
loop under a 1 ms SIGALRM, 1 ms sleeps, a pipe ping-pong between two
processes under timers, and rseq critical sections interrupted by a
signal and by preemption from a busy competitor (9000 sections):
rseq aborts on preemption other cases
v7.4-rc3 820 pass
+ Linus's v3 0 (all 9000 commit) pass
+ v3 + Yoshifumi's RFC 802 pass
So on hardware, as under QEMU (mps2-an385 and -an505) and as Yoshifumi
described, v3 alone lets a preempted rseq critical section commit on
v7-M instead of aborting, and the RFC fixes it. Signal-delivered aborts
work in all three. For the RFC on top of v3:
Tested-by: Brad Hawthorne <brad@xxxxxx> # RP2350 (Cortex-M33)
Under QEMU, Yoshifumi's one-line arm_rseq_user_enter() call in
__pendsv_entry also closes the gap on v3 alone, if v3 should go first.
While bringing the board up I found a few things in the shared code:
- mm/nommu: mremap() resizing in place updates vm_end but not the
maple tree, so a shrunk VMA leaves a stale range that points at the
VMA after it is freed. With Hajime Tazaki's agreement I've sent a
minimal fix to linux-mm:
https://lore.kernel.org/linux-mm/20261121083139.803682-1-brad@xxxxxx/
- irq-nvic: the priority registers are written at the wrong offset.
Yoshifumi already found this, so I'll leave it to his series and
test it on the RP2350, where the board does not take interrupts
without it. For his changelog: the offset was right (0x300 from the
node's base, ISER0 at 0xe000e100) until c5e0cbe2858d ("irqchip:
nvic: Fix offset for Interrupt Priority Offsets") made it 0x400,
taking 0xe000e400 as an offset from 0xe000e000; that commit went to
stable as far back as 4.19, so the fix wants Fixes: c5e0cbe2858d
and Cc stable.
- v7-M itself: five patches, ready as an RFC series, each run on the
board with and without it on v7.4-rc3:
* an XIP kernel with HARDENED_USERCOPY BUGs on its first readdir
(_etext ends after .rodata), a stable fix that stands alone;
* a user program's fault stops the machine; with the patch it is
a signal (SIGFPE, SIGTRAP, SIGILL, SIGBUS, SIGSEGV);
* CPACR and CONTROL are inherited from the loader, so user space
gets the FPU with no FP state switched;
* on v8-M Mainline, MSPLIM catches a kernel stack overflow, which
today runs past the stack unnoticed;
* the Cortex-M33's ACTLR.EXTEXCLALL, set by pico-sdk loaders,
makes every STREX to the RP2350's PSRAM fail, so the kernel
never reaches its console.
Two of them change __irq_entry and __pendsv_entry, which
Yoshifumi's RFC rewrites, and they don't apply together. I'd rather
rebase onto the generic entry work than collide: would you prefer
them on top of it, and is linux-arm-kernel the right home?
Arnd, one question about the plan for the CPUs. After the 7.5
removals, nothing in-tree selects ARM_SINGLE_ARMV7M but !MMU itself,
and no board's device tree uses the v7-M core; Yoshifumi's boards and
mine are out of tree. Would a small RP2350 platform (DT, timer, clocks,
resets, watchdog), run on hardware for each -rc, be a welcome in-tree
user of CPU_V7M, or would you rather keep the core with no platform
and boards out of tree? I'd hold the platform series until the core
question is settled either way.
A note on method: I use an AI coding assistant for parts of this work.
Everything I send is reviewed, tested on hardware and signed off by me,
and each changelog says what the assistant did, per
Documentation/process/coding-assistants.rst.
Thanks,
Brad Hawthorne