linux/arch/riscv/include/asm
Alexandre Ghiti 546e42c8c6 riscv: Use an atomic xchg in pudp_huge_get_and_clear()
Make sure we return the right pud value and not a value that could
have been overwritten in between by a different core.

Fixes: c3cc2a4a3a ("riscv: Add support for PUD THP")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250814-dev-alex-thp_pud_xchg-v1-1-b4704dfae206@rivosinc.com
[pjw@kernel.org: use xchg rather than atomic_long_xchg; avoid atomic op for !CONFIG_SMP like x86]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-23 18:25:52 -06:00
..
vdso RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper 2025-06-12 12:13:57 -07:00
vendor_extensions riscv: Add SiFive xsfvfwmaccqqq vendor extension 2025-05-08 11:01:44 -07:00
Kbuild
acenv.h
acpi.h
alternative-macros.h riscv: Provide all alternative macros all the time 2025-04-14 13:07:08 +00:00
alternative.h
arch_hweight.h
archrandom.h
asm-extable.h
asm-offsets.h
asm-prototypes.h RISC-V Patches for the 6.16 Merge Window, Part 1 2025-06-06 18:05:18 -07:00
asm.h riscv: use lw when reading int cpu in asm_per_cpu 2025-09-05 15:31:24 -06:00
assembler.h
atomic.h
barrier.h riscv: Add support for Zicbop 2025-06-05 11:09:37 -07:00
bitops.h RISC-V Patches for the 6.15 Merge Window, Part 1 2025-04-04 09:49:17 -07:00
bug.h riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust 2025-07-23 00:04:53 +02:00
bugs.h
cache.h
cacheflush.h Merge tag 'riscv-mw2-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux into for-next 2025-06-05 14:03:16 -07:00
cacheinfo.h
cfi.h cfi: Move BPF CFI types and helpers to generic code 2025-07-31 18:23:53 -07:00
checksum.h
clint.h
clocksource.h
cmpxchg.h riscv: xchg: Prefetch the destination word for sc.w 2025-06-05 11:09:39 -07:00
compat.h
cpu.h
cpu_ops.h
cpu_ops_sbi.h
cpufeature-macros.h
cpufeature.h riscv: misaligned: add a function to check misalign trap delegability 2025-06-04 15:11:07 -07:00
cpuidle.h
crash_reserve.h
csr.h
current.h
delay.h
dma-noncoherent.h
dmi.h
efi.h
elf.h
entry-common.h
errata_list.h
exec.h
extable.h
fence.h
fixmap.h
fpu.h
ftrace.h riscv: ftrace: support direct call using call_ops 2025-06-05 11:09:31 -07:00
futex.h
gdb_xml.h
gpr-num.h
hugetlb.h
hwcap.h riscv: Add support for Zicbop 2025-06-05 11:09:37 -07:00
hwprobe.h riscv: hwprobe: Add SiFive vendor extension support and probe for xsfqmaccdod and xsfqmaccqoq 2025-05-08 11:01:43 -07:00
image.h riscv: kexec_file: Support loading Image binary file 2025-06-05 11:09:34 -07:00
insn-def.h riscv: Add support for Zicbop 2025-06-05 11:09:37 -07:00
insn.h
io.h
irq.h riscv: Helper to parse hart index 2025-06-26 16:06:40 +02:00
irq_stack.h
irq_work.h
irqflags.h
jump_label.h
kasan.h
kdebug.h
kexec.h riscv: kexec_file: Support loading Image binary file 2025-06-05 11:09:34 -07:00
kfence.h
kgdb.h riscv: KGDB: Do not inline arch_kgdb_breakpoint() 2025-04-16 07:29:33 -07:00
kprobes.h
kvm_aia.h RISC-V: KVM: Drop the return value of kvm_riscv_vcpu_aia_init() 2025-07-28 22:27:07 +05:30
kvm_gstage.h RISC-V: KVM: Factor-out g-stage page table management 2025-07-28 22:27:30 +05:30
kvm_host.h RISC-V: KVM: Delegate illegal instruction fault to VS mode 2025-07-28 22:27:40 +05:30
kvm_mmu.h RISC-V: KVM: Factor-out g-stage page table management 2025-07-28 22:27:30 +05:30
kvm_nacl.h
kvm_tlb.h RISC-V: KVM: Pass VMID as parameter to kvm_riscv_hfence_xyz() APIs 2025-07-28 22:27:32 +05:30
kvm_types.h
kvm_vcpu_fp.h
kvm_vcpu_insn.h
kvm_vcpu_pmu.h
kvm_vcpu_sbi.h RISC-V: KVM: add SBI extension reset callback 2025-07-23 17:19:44 +05:30
kvm_vcpu_timer.h
kvm_vcpu_vector.h KVM: RISC-V: refactor vector state reset 2025-05-21 09:34:46 +05:30
kvm_vmid.h RISC-V: KVM: Factor-out MMU related declarations into separate headers 2025-07-28 22:27:23 +05:30
linkage.h
membarrier.h
mmio.h
mmiowb.h
mmu.h
mmu_context.h
module.h
module.lds.h
numa.h
page.h
paravirt.h
paravirt_api_clock.h
pci.h
perf_event.h
pgalloc.h
pgtable-32.h
pgtable-64.h mm: remove devmap related functions and page table bits 2025-07-09 22:42:18 -07:00
pgtable-bits.h mm: remove devmap related functions and page table bits 2025-07-09 22:42:18 -07:00
pgtable.h riscv: Use an atomic xchg in pudp_huge_get_and_clear() 2025-09-23 18:25:52 -06:00
probes.h
processor.h riscv: uaccess: Only restore the CSR_STATUS SUM bit 2025-06-05 14:03:17 -07:00
ptrace.h riscv: Make regs_irqs_disabled() more clear 2025-06-05 11:10:17 -07:00
runtime-const.h riscv: fix runtime constant support for nommu kernels 2025-06-10 18:19:33 -07:00
sbi.h riscv: sbi: add FWFT extension interface 2025-06-04 15:11:01 -07:00
scs.h
seccomp.h
sections.h
semihost.h
set_memory.h
signal32.h
simd.h
smp.h
soc.h
sparsemem.h
spinlock.h
stackprotector.h
stacktrace.h
string.h
suspend.h
switch_to.h
sync_core.h
syscall.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
syscall_table.h
syscall_wrapper.h
text-patching.h
thread_info.h
timex.h
tlb.h
tlbbatch.h
tlbflush.h mm: remove arch_flush_tlb_batched_pending() arch helper 2025-07-24 19:12:32 -07:00
topology.h
trace.h
uaccess.h riscv: Fix sparse warning about different address spaces 2025-09-05 15:33:52 -06:00
unistd.h
uprobes.h
vdso.h
vector.h riscv: vector: Fix context save/restore with xtheadvector 2025-06-12 12:13:47 -07:00
vendor_extensions.h
vendorid_list.h
vermagic.h
vmalloc.h
word-at-a-time.h
xip_fixup.h
xor.h