nuttx-update/arch/arm/include
hujun5 16b63ed837 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881
reason:
svc call may trigger hardfault

Background
    The origin of this issue is our desire to eliminate the function of storing
"regs" in g_current_regs and instead utilize (*running_task)->xcp.regs for storage.
The benefits of this approach include faster storage speed and
avoiding multiple accesses to g_current_regs during context switching,
thus ensuring that whether returning from an interrupt or an exception,
we consistently use this_task()->xcp.regs

Issue Encountered
    However, when storing registers, we must ensure that (running_task)->xcp.regs is invalid
so that it can be safely overwritten.
According to the existing logic, the only scenario where (running_task)->xcp.regs
is valid is during restore_context. We must accurately identify this scenario.
Initially, we used the condition (running_task)==NULL for this purpose, but we deemed
this approach unsatisfactory as it did not align well with the actual logic.
(running_task) should not be NULL. Consequently, we adopted other arch-specific methods for judgment,
but due to special logic in some arch, the judgment was not accurate, leading to this issue.

Solution:
    For armv6-m, we haven't found a more suitable solution, so we are sticking with (*running_task)==NULL.
    For armv7-m/armv8-m, by removing support for primask, we can achieve accurate judgment.

    PRIMASK is a design in armv6-m, that's why arm introduce BASEPRI from armv7-m.
It's wrong to provide this option for armv7-m/armv8-m arch.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-09 21:20:06 +08:00
..
a1x arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
am335x arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
arm arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
armv6-m arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
armv7-a armv7-a/armv7-r/armv8-r: percpu reg store this_task 2024-12-06 09:27:33 +08:00
armv7-m armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 21:20:06 +08:00
armv7-r armv7-a/armv7-r/armv8-r: percpu reg store this_task 2024-12-06 09:27:33 +08:00
armv8-m armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 21:20:06 +08:00
armv8-r armv7-a/armv7-r/armv8-r: percpu reg store this_task 2024-12-06 09:27:33 +08:00
at32 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
c5471 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
csk6 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
cxd32xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
cxd56xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
dm320 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
efm32 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
eoss3 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
fvp-v8r-aarch32 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
gd32f4 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
goldfish arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
imx1 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
imx6 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
imxrt arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
kinetis arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
kl arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lc823450 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lpc17xx_40xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lpc31xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lpc43xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lpc54xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lpc214x arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
lpc2378 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
max326xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
moxart arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
mps arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
mx8mp arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
nrf52 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
nrf53 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
nrf91 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
nuc1xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
phy62xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
qemu arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
rp23xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
rp2040 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
s32k1xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
s32k3xx arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
sam34 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
sama5 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
samd2l2 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
samd5e5 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
samv7 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32f0l0g0 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32f7 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32h5 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32h7 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32l4 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32l5 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32u5 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32wb arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stm32wl5 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
str71x arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
tiva arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
tlsr82 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
tms570 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
xmc4 arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
.gitignore Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
arch.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
elf.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
inttypes.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
irq.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
limits.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
setjmp.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
spinlock.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
stdarg.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
syscall.h arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
types.h armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881 2024-12-09 21:20:06 +08:00