From 15fe99957226aa27da838812ec891f11b299453d Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Sat, 11 Jan 2025 14:53:53 -0800 Subject: [PATCH] std.atomic: fix cache line size for RISC-V --- lib/std/atomic.zig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/std/atomic.zig b/lib/std/atomic.zig index 5630bf6bf5..9345b68f18 100644 --- a/lib/std/atomic.zig +++ b/lib/std/atomic.zig @@ -436,7 +436,6 @@ pub fn cacheLineForCpu(cpu: std.Target.Cpu) u16 { // - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mips.go#L7 // - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mipsle.go#L7 // - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mips64x.go#L9 - // - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_riscv64.go#L7 // - https://github.com/torvalds/linux/blob/3a7e02c040b130b5545e4b115aada7bacd80a2b6/arch/sparc/include/asm/cache.h#L14 .arm, .armeb, @@ -446,8 +445,6 @@ pub fn cacheLineForCpu(cpu: std.Target.Cpu) u16 { .mipsel, .mips64, .mips64el, - .riscv32, - .riscv64, .sparc, .sparc64, => 32, @@ -471,6 +468,7 @@ pub fn cacheLineForCpu(cpu: std.Target.Cpu) u16 { // - https://github.com/golang/go/blob/dda2991c2ea0c5914714469c4defc2562a907230/src/internal/cpu/cpu_x86.go#L9 // - https://github.com/golang/go/blob/0a9321ad7f8c91e1b0c7184731257df923977eb9/src/internal/cpu/cpu_loong64.go#L11 // - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_wasm.go#L7 + // - https://github.com/golang/go/blob/19e923182e590ae6568c2c714f20f32512aeb3e3/src/internal/cpu/cpu_riscv64.go#L7 // - https://github.com/torvalds/linux/blob/3a7e02c040b130b5545e4b115aada7bacd80a2b6/arch/xtensa/variants/csp/include/variant/core.h#L209 // - https://github.com/torvalds/linux/blob/3a7e02c040b130b5545e4b115aada7bacd80a2b6/arch/csky/Kconfig#L183 // - https://www.xmos.com/download/The-XMOS-XS3-Architecture.pdf