original_kernel/arch/riscv/include/asm
Alexandre Ghiti 1d84afaf02
riscv: Fix fully ordered LR/SC xchg[8|16]() implementations
The fully ordered versions of xchg[8|16]() using LR/SC lack the
necessary memory barriers to guarantee the order.

Fix this by matching what is already implemented in the fully ordered
versions of cmpxchg() using LR/SC.

Suggested-by: Andrea Parri <parri.andrea@gmail.com>
Reported-by: Andrea Parri <parri.andrea@gmail.com>
Closes: https://lore.kernel.org/linux-riscv/ZlYbupL5XgzgA0MX@andrea/T/#u
Fixes: a8ed2b7a2c ("riscv/cmpxchg: Implement xchg for variables of size 1 and 2")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Andrea Parri <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20240530145546.394248-1-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-05-30 09:43:14 -07:00
..
vdso
Kbuild
acenv.h
acpi.h
alternative-macros.h
alternative.h
arch_hweight.h
archrandom.h
asm-extable.h
asm-offsets.h
asm-prototypes.h
asm.h
assembler.h
atomic.h Merge patch series "Rework & improve riscv cmpxchg.h and atomic.h" 2024-04-28 14:50:33 -07:00
barrier.h
bitops.h
bug.h
cache.h riscv: mm: still create swiotlb buffer for kmalloc() bouncing if required 2024-04-30 10:35:45 -07:00
cacheflush.h riscv: Fix early ftrace nop patching 2024-05-23 08:22:17 -07:00
cacheinfo.h
cfi.h
checksum.h
clint.h
clocksource.h
cmpxchg.h riscv: Fix fully ordered LR/SC xchg[8|16]() implementations 2024-05-30 09:43:14 -07:00
compat.h
cpu.h
cpu_ops.h
cpu_ops_sbi.h
cpufeature.h
cpuidle.h
crash_reserve.h
csr.h RISC-V: KVM: Add perf sampling support for guests 2024-04-26 13:13:50 +05:30
current.h
delay.h
dma-noncoherent.h
efi.h
elf.h
entry-common.h
errata_list.h RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
extable.h
fence.h
fixmap.h
fpu.h riscv: add support for kernel-mode FPU 2024-05-19 14:36:19 -07:00
ftrace.h ftrace: riscv: move from REGS to ARGS 2024-05-22 16:12:48 -07:00
futex.h
gdb_xml.h
gpr-num.h
hugetlb.h mm: convert arch_clear_hugepage_flags to take a folio 2024-04-25 20:56:15 -07:00
hwcap.h
hwprobe.h
image.h
insn-def.h
insn.h
io.h
irq.h
irq_stack.h
irq_work.h
irqflags.h riscv: Remove unnecessary irqflags processor.h include 2024-04-16 18:50:52 -07:00
jump_label.h
kasan.h
kdebug.h
kexec.h
kfence.h
kgdb.h
kprobes.h
kvm_aia.h
kvm_aia_aplic.h
kvm_aia_imsic.h
kvm_host.h RISCV: KVM: Introduce vcpu->reset_cntx_lock 2024-04-22 10:39:03 +05:30
kvm_types.h
kvm_vcpu_fp.h
kvm_vcpu_insn.h
kvm_vcpu_pmu.h RISC-V: KVM: Improve firmware counter read function 2024-04-26 13:13:54 +05:30
kvm_vcpu_sbi.h
kvm_vcpu_timer.h
kvm_vcpu_vector.h
linkage.h
membarrier.h
mmio.h
mmiowb.h
mmu.h Merge patch series "riscv: ASID-related and UP-related TLB flush enhancements" 2024-04-30 10:35:48 -07:00
mmu_context.h
mmzone.h
module.h
module.lds.h
numa.h
page.h Merge patch series "riscv: 64-bit NOMMU fixes and enhancements" 2024-04-28 14:50:35 -07:00
paravirt.h
paravirt_api_clock.h
patch.h riscv: Fix text patching when IPI are used 2024-04-16 18:27:47 -07:00
pci.h
perf_event.h
pgalloc.h riscv: Use IPIs for remote cache/TLB flushes by default 2024-04-29 10:49:26 -07:00
pgtable-32.h
pgtable-64.h riscv: Remove PGDIR_SIZE_L3 and TASK_SIZE_MIN 2024-05-16 12:59:57 -07:00
pgtable-bits.h
pgtable.h Merge patch series "riscv: access_ok() optimization" 2024-05-22 16:12:47 -07:00
probes.h
processor.h Merge patch series "riscv: Create and document PR_RISCV_SET_ICACHE_FLUSH_CTX prctl" 2024-04-30 10:35:42 -07:00
ptrace.h
sbi.h Merge patch series "riscv: Extension parsing fixes" 2024-05-22 16:12:58 -07:00
scs.h
seccomp.h
sections.h
semihost.h
set_memory.h
signal32.h
simd.h
smp.h riscv: Use IPIs for remote cache/TLB flushes by default 2024-04-29 10:49:26 -07:00
soc.h
sparsemem.h
stackprotector.h
stacktrace.h
string.h
suspend.h riscv: Do not save the scratch CSR during suspend 2024-04-28 14:50:36 -07:00
switch_to.h riscv: Include riscv_set_icache_flush_ctx prctl 2024-04-18 08:10:58 -07:00
sync_core.h
syscall.h
syscall_wrapper.h riscv: Mark __se_sys_* functions __used 2024-03-26 14:11:03 -07:00
thread_info.h
timex.h
tlb.h
tlbbatch.h
tlbflush.h riscv: mm: Use a fixed layout for the MM context ID 2024-04-29 10:49:33 -07:00
topology.h
uaccess.h
unistd.h
uprobes.h
vdso.h
vector.h
vendorid_list.h
vermagic.h
vmalloc.h
word-at-a-time.h
xip_fixup.h
xor.h