mirror-linux/arch/arm/include/asm
Linus Torvalds aef7457540 ARM fixes for 6.16-rc1
- fix arch_memremap_can_ram_remap() which incorrectly passed a PFN to
   memblock_is_map_memory rather than the actual address.
 - "Disallow kernel mode NEON when IRQs are disabled" - this needs a
   better explanation.
 
   "To avoid having to preserve/restore kernel mode NEON state when
   such a softirq is taken softirqs are now disabled when using the
   NEON from task context." should explain that it's nested kernel
   mode. In other words, softirqs from user mode are fine, because
   the context will be preserved. softirqs from kernel mode may
   be from a context that has already saved the user NEON state, and
   thus we would need to preserve the NEON state for the parent kernel
   mode context, and this we don't allow.
 
   The problem occurs when the kernel context disables hard IRQs, and
   then uses NEON. When it's finished, and restores the userspace NEON
   state, we call local_bh_enable() with hard IRQs disabled, which
   causes a warning.
 
   This commit addresses that by disallowing the use of NEON with hard
   IRQs disabled.
 
   https://lore.kernel.org/all/20250516231858.27899-4-ebiggers@kernel.org/T/#m104841b6e9346b1814c8b0fb9f2340551b0cd3e8
   has some further context.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAmg9k5MACgkQ9OeQG+St
 rGTsIg//R8AysyZIHWCzO+j7UFZPQ+jUZ0Qf0NMA3Ss/Bh724BtDWIMRo30/ADtX
 nwJhGnFVenr9jdGuUBmE8R25QyfZIz2U45hGVqUgSL9W96A8PPsuaR7oXhvezq68
 Wj+UUTzem4l1bgK416qEROPgY/dtYCL5AbPA+SdH+LSMvS9phkhT6PkGJRC14tZ9
 kLNR4PyA9/DC6N6wIU8v9pWezSoOBn/ISBpb67BB0OzZPlmgoJJOXbSNzIHaJc4C
 YjjJCHRmZL2w/U4HyEc8qXyHMPggEKtDas6mwrpxV/fjoReC/vk3tvuRxy1Mt1Ny
 BIIOA/Hauz8O9+aqfdqABK92tMiLx7NA9bWQDndIisfD/nRFyrpFDUbw1+d4EemU
 qzDmKSNWK9nsC28kE8F5M4XLacHu4AQN10Ktjr5LXGoMmPfDz0xssd2uDJkbL4Zq
 wHVea4HPX8Ykrv6yg+iRZp54z25+ckD+kf93zhutabaa/zVdAHAU9Lk/Uqm2G1R2
 5huER0vvLJF3+mYu9mRjodssOUsEVwPbBuGiwJ7DY2a6faexuJv/sU5ZyHhwHb/B
 TjaYbektcllYWly+KN33XzZXuVVpY9DbRq/2MCFbxMYjHxGjj7QiytTm8tI6VX26
 yi8CQ+8/0SXoBPaDjb2y4n6qIxcjiBcdQ8DxDbA9Od0glzJQUhE=
 =V4ew
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux

Pull ARM fixes from Russell King:

 - Fix arch_memremap_can_ram_remap() which incorrectly passed a PFN to
   memblock_is_map_memory rather than the actual address.

 - Disallow kernel mode NEON when IRQs are disabled

   Explanation:

     "To avoid having to preserve/restore kernel mode NEON state when
      such a softirq is taken softirqs are now disabled when using the
      NEON from task context."

   should explain that it's nested kernel mode.

   In other words, softirqs from user mode are fine, because the context
   will be preserved. softirqs from kernel mode may be from a context
   that has already saved the user NEON state, and thus we would need to
   preserve the NEON state for the parent kernel mode context, and this
   we don't allow.

   The problem occurs when the kernel context disables hard IRQs, and
   then uses NEON. When it's finished, and restores the userspace NEON
   state, we call local_bh_enable() with hard IRQs disabled, which
   causes a warning.

   This commit addresses that by disallowing the use of NEON with hard
   IRQs disabled.

	https://lore.kernel.org/all/20250516231858.27899-4-ebiggers@kernel.org/T/#m104841b6e9346b1814c8b0fb9f2340551b0cd3e8

   has some further context

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux:
  ARM: 9446/1: Disallow kernel mode NEON when IRQs are disabled
  ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
2025-06-05 11:33:09 -07:00
..
hardware ARM: sa1100: make match function take a const pointer 2024-07-19 13:47:20 +02:00
mach ARM: 9298/1: Drop custom mdesc->handle_irq() 2023-06-19 09:35:48 +01:00
vdso arm: vdso: Switch to generic storage implementation 2025-02-21 09:54:02 +01:00
xen arm/xen: Introduce xen_setup_dma_ops() 2022-06-06 08:54:33 +02:00
Kbuild local64.h: make <asm/local64.h> mandatory 2020-12-29 15:36:49 -08:00
arch_gicv3.h arm64: add ARM64_HAS_GIC_PRIO_RELAXED_SYNC cpucap 2023-01-31 16:06:17 +00:00
arch_timer.h clocksource/drivers/arm_arch_timer: Drop unnecessary ISB on CVAL programming 2021-10-17 21:47:44 +02:00
archrandom.h random: remove CONFIG_ARCH_RANDOM 2022-07-18 15:03:37 +02:00
arm-cci.h
arm_pmuv3.h ARM: pmuv3: Add missing write_pmuacr() 2024-10-29 12:58:47 +00:00
asm-offsets.h
assembler.h ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement 2024-04-18 12:10:46 +01:00
atomic.h locking/atomic: arm: add preprocessor symbols 2023-06-05 09:57:15 +02:00
auxvec.h
bL_switcher.h
barrier.h
bitops.h arm: align find_bit declarations with generic kernel 2022-07-14 15:21:43 -07:00
bitrev.h
bug.h arm: print alloc free paths for address in registers 2021-05-07 00:26:34 -07:00
bugs.h ARM: cpu: Switch to arch_cpu_finalize_init() 2023-06-16 10:15:59 +02:00
cache.h ARM: 9433/2: implement cacheinfo support 2025-01-14 12:29:30 +00:00
cacheflush.h mm: remove page_mapping() 2024-07-03 19:29:59 -07:00
cachetype.h ARM: 9432/2: add CLIDR accessor functions 2025-01-14 12:29:27 +00:00
checksum.h net: checksum: drop the linux/uaccess.h include 2023-01-27 11:19:46 +00:00
clocksource.h
cmpxchg.h ARM: Emulate one-byte cmpxchg 2024-07-04 13:32:41 -07:00
compiler.h
cp15.h
cpu.h ARM: 9411/1: Switch over to GENERIC_CPU_DEVICES using arch_register_cpu() 2024-08-20 11:18:49 +01:00
cpufeature.h
cpuidle.h arm64 updates for 5.14 2021-06-28 14:04:24 -07:00
cputype.h ARM: 9267/1: Define Armv8 registers in AArch32 state 2022-11-28 11:57:31 +00:00
cti.h
current.h ARM: remove Thumb2 __builtin_thread_pointer workaround for Clang 2024-02-22 15:38:54 -08:00
dcc.h
delay.h ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
device.h ARM/dma-mapping: remove the dma_coherent member of struct dev_archdata 2022-10-06 14:31:08 +02:00
div64.h __arch_xprod64(): make __always_inline when optimizing for performance 2024-10-28 21:44:28 +00:00
dma-iommu.h ARM: 9417/1: dma-mapping: Pass device to arm_iommu_create_mapping() 2024-09-04 15:02:07 +01:00
dma.h ARM: 9323/1: mm: Fix ARCH_LOW_ADDRESS_LIMIT when CONFIG_ZONE_DMA 2023-10-05 16:15:42 +01:00
dmi.h
domain.h ARM: 9326/1: make <linux/uaccess.h> self-contained for ARM 2023-10-05 16:17:05 +01:00
ecard.h ARM: riscpc: make ecard_bus_type constant 2025-01-10 15:42:06 +01:00
edac.h
efi.h efi/arm: Disable LPAE PAN when calling EFI runtime services 2024-06-15 10:25:02 +02:00
elf.h vdso/ARM: Make union vdso_data_store available for all architectures 2024-02-20 20:56:00 +01:00
exception.h ARM: 9320/1: fix stack depot IRQ stack filter 2023-10-05 16:15:40 +01:00
fiq.h
firmware.h
fixmap.h ARM updates for 5.11: 2020-12-22 13:34:27 -08:00
floppy.h
fncpy.h
fpstate.h ARM: 9228/1: vfp: kill vfp_flush/release_thread() 2022-08-31 14:50:08 +01:00
fpu.h ARM: implement ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:17 -07:00
ftrace.h ARM: 9304/1: add prototype for function called only from asm 2023-06-19 09:35:52 +01:00
futex.h
glue-cache.h ARM: 9387/2: mm: Rewrite cacheflush vtables in CFI safe C 2024-04-29 14:14:18 +01:00
glue-df.h
glue-pf.h
glue-proc.h
glue.h
hardirq.h ARM: irqstat: Get rid of duplicated declaration 2020-11-23 10:31:05 +01:00
highmem.h ARM: highmem: Fix cache_is_vivt() reference 2020-12-04 23:35:34 +01:00
hugetlb-3level.h mm: provide mm_struct and address to huge_ptep_get() 2024-07-12 15:52:15 -07:00
hugetlb.h mm: convert arch_clear_hugepage_flags to take a folio 2024-04-25 20:56:15 -07:00
hw_breakpoint.h ARM: 9391/2: hw_breakpoint: Handle CFI breakpoints 2024-04-29 14:14:22 +01:00
hw_irq.h
hwcap.h
hypervisor.h firmware/smccc: Call arch-specific hook on discovering KVM services 2024-08-30 16:30:41 +01:00
idmap.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
insn.h ARM: 9176/1: avoid literal references in inline assembly 2022-01-06 12:58:58 +00:00
io.h mm/memremap: Pass down MEMREMAP_* flags to arch_memremap_wb() 2025-02-21 15:05:38 +01:00
irq.h nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
irq_work.h arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
irqflags.h
jump_label.h jump_label: adjust inline asm to be consistent 2024-11-04 16:21:45 -05:00
kasan.h ARM: 9016/2: Initialize the mapping of KASan shadow memory 2020-10-27 12:11:10 +00:00
kasan_def.h ARM: 9015/2: Define the virtual space of KASan's shadow region 2020-10-27 12:11:08 +00:00
kexec-internal.h ARM: kexec: fix oops after TLB are invalidated 2021-02-05 10:23:29 +00:00
kexec.h kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP 2023-12-06 16:12:48 -08:00
kfence.h ARM: 9166/1: Support KFENCE for ARM 2021-12-17 11:34:38 +00:00
kgdb.h
kprobes.h kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
krait-l2-accessors.h
linkage.h
mc146818rtc.h
mcpm.h
mcs_spinlock.h
memblock.h
memory.h asm-generic: provide generic page_to_phys and phys_to_page implementations 2024-10-28 21:44:28 +00:00
mman.h ARM: prctl: reject PR_SET_MDWE on pre-ARMv6 2024-03-26 11:07:22 -07:00
mmu.h ARM: mm: make vmalloc_seq handling SMP safe 2022-01-25 09:53:52 +01:00
mmu_context.h ARM: mm: make vmalloc_seq handling SMP safe 2022-01-25 09:53:52 +01:00
module.h ARM: 9252/1: module: Teach unwinder about PLTs 2022-11-07 14:18:59 +00:00
module.lds.h kbuild: preprocess module linker script 2020-09-25 00:36:41 +09:00
mpu.h
mtd-xip.h
neon.h
nwflash.h
opcodes-sec.h
opcodes-virt.h
opcodes.h ARM: 9145/1: patch: fix BE32 compilation 2021-10-25 13:12:36 +01:00
outercache.h
page-nommu.h
page.h vdso: Introduce vdso/page.h 2024-10-16 00:13:04 +02:00
paravirt.h x86/paravirt: Switch time pvops functions to use static_call() 2021-03-11 16:17:52 +01:00
paravirt_api_clock.h sched/headers: ARM needs asm/paravirt_api_clock.h too 2022-03-22 08:53:10 +01:00
pci.h PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h 2022-07-22 17:23:45 -05:00
percpu.h ARM: make get_current() and __my_cpu_offset() __always_inline 2022-01-31 16:06:35 +01:00
perf_event.h perf/arm: Drop unused functions 2024-11-14 10:40:00 +01:00
pgalloc.h mm/thp: define default pmd_pgtable() 2021-07-01 11:06:03 -07:00
pgtable-2level-hwdef.h
pgtable-2level-types.h
pgtable-2level.h mm/arm: remove pmd_thp_or_huge() 2024-04-25 20:55:47 -07:00
pgtable-3level-hwdef.h ARM: 9409/1: mmu: Do not use magic number for TTBCR settings 2024-08-20 11:18:44 +01:00
pgtable-3level-types.h
pgtable-3level.h arch: remove mk_pmd() 2025-05-11 17:48:04 -07:00
pgtable-hwdef.h
pgtable-nommu.h MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
pgtable.h mm: introduce a common definition of mk_pte() 2025-05-11 17:48:02 -07:00
probes.h
proc-fns.h ARM: 9398/1: Fix userspace enter on LPAE with CC_OPTIMIZE_FOR_SIZE=y 2024-05-15 21:41:08 +01:00
processor.h kernel: exit: cleanup release_thread() 2022-09-11 21:55:07 -07:00
procinfo.h
prom.h ARM: 9011/1: centralize phys-to-virt conversion of DT/ATAGS address 2020-10-27 12:10:59 +00:00
psci.h
ptdump.h arm: ptdump: rename CONFIG_DEBUG_WX to CONFIG_ARM_DEBUG_WX 2024-02-22 10:24:47 -08:00
ptrace.h ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement 2024-04-18 12:10:46 +01:00
seccomp.h arm: Enable seccomp architecture tracking 2020-11-20 11:16:34 -08:00
sections.h
secure_cntvoff.h
semihost.h serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h 2023-01-19 14:58:19 +01:00
set_memory.h ARM: 9164/1: mm: Provide set_memory_valid() 2021-12-17 11:34:36 +00:00
setup.h vgacon: clean up global screen_info instances 2023-10-17 10:17:02 +02:00
shmparam.h
signal.h ARM: 9304/1: add prototype for function called only from asm 2023-06-19 09:35:52 +01:00
simd.h ARM fixes for 6.16-rc1 2025-06-05 11:33:09 -07:00
smp.h ARM: smp: Switch to hotplug core state synchronization 2023-05-15 13:44:57 +02:00
smp_plat.h
smp_scu.h
smp_twd.h
sparsemem.h ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
spectre.h ARM: 9304/1: add prototype for function called only from asm 2023-06-19 09:35:52 +01:00
spinlock.h locking: Fix typos in comments 2021-03-22 02:45:52 +01:00
spinlock_types.h Improve consistency of '#error' directive messages 2024-11-11 17:17:04 -08:00
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h ARM: 9407/1: Add support for STACKLEAK gcc plugin 2024-07-02 09:18:43 +01:00
string.h ARM: 9014/2: Replace string mem* functions for KASan 2020-10-27 12:11:06 +00:00
suspend.h ARM: 9304/1: add prototype for function called only from asm 2023-06-19 09:35:52 +01:00
swab.h
switch_to.h ARM development updates for 5.18: 2022-03-23 17:35:57 -07:00
sync_bitops.h locking/atomic: arm: fix sync ops 2023-06-05 09:57:13 +02:00
syscall.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
syscalls.h ARM: 9309/1: add missing syscall prototypes 2023-06-19 09:35:55 +01:00
system_info.h
system_misc.h ARM: 9096/1: Remove arm_pm_restart() 2021-06-13 18:16:48 +01:00
tcm.h ARM: 9314/1: tcm: move tcm_init() prototype to asm/tcm.h 2023-06-19 09:35:59 +01:00
text-patching.h asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
therm.h
thread_info.h ARM: iwmmxt: Use undef hook to enable coprocessor for task 2023-05-17 15:08:22 +02:00
thread_notify.h
timex.h arm: use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
tlb.h mm: pgtable: completely move pagetable_dtor() to generic tlb_remove_table() 2025-01-25 20:22:23 -08:00
tlbflush.h arm: implement the new page table range API 2023-08-24 16:20:20 -07:00
tls.h ARM: smp: elide HWCAP_TLS checks or __entry_task updates on SMP+v6 2022-01-25 09:53:52 +01:00
topology.h sched/cpufreq: Rename arch_update_thermal_pressure() => arch_update_hw_pressure() 2024-04-24 12:08:01 +02:00
traps.h ARM: 9326/1: make <linux/uaccess.h> self-contained for ARM 2023-10-05 16:17:05 +01:00
uaccess-asm.h ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement 2024-04-18 12:10:46 +01:00
uaccess.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ucontext.h ARM: ep93xx: remove MaverickCrunch support 2021-08-04 13:30:04 +02:00
unified.h ARM: 9116/1: unified: Remove check for gcc < 4 2021-08-20 11:39:28 +01:00
unistd.h clone3: drop __ARCH_WANT_SYS_CLONE3 macro 2024-07-10 14:23:38 +02:00
unwind.h ARM: 9304/1: add prototype for function called only from asm 2023-06-19 09:35:52 +01:00
uprobes.h
user.h asm/user.h: killed unused macros 2022-01-30 21:17:00 -05:00
v7m.h irqchip: nvic: Use GENERIC_IRQ_MULTI_HANDLER 2021-12-06 12:49:16 +01:00
vdso.h arm: vdso: Switch to generic storage implementation 2025-02-21 09:54:02 +01:00
vermagic.h
vfp.h ARM: 9438/1: assembler: Drop obsolete VFP accessor fallback 2025-01-14 12:29:25 +00:00
vfpmacros.h ARM: 9438/1: assembler: Drop obsolete VFP accessor fallback 2025-01-14 12:29:25 +00:00
vga.h console: fix up ARM screen_info reference 2023-10-17 16:34:02 +02:00
virt.h
vmalloc.h
vmlinux.lds.h ARM: 9444/1: add KEEP() keyword to ARM_VECTORS 2025-03-26 13:31:48 +00:00
word-at-a-time.h kernel.h: removed REPEAT_BYTE from kernel.h 2024-02-01 09:47:59 -08:00
xor.h ARM: 9260/1: lib/xor: use r10 rather than r7 in xor_arm4regs_{2|3} 2022-11-07 14:19:03 +00:00