Skip to content

Commit 75b0b97

Browse files
authored
Unrolled build for #145078
Rollup merge of #145078 - minxuanz:riscv-cacheline, r=samueltardieu Fix wrong cache line size of riscv64 see https://go-review.googlesource.com/c/go/+/526659, All of riscv CPU using 64B for cache-line size.
2 parents 269d5b5 + d47b5e4 commit 75b0b97

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

library/std/src/sync/mpmc/utils.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,20 @@ use crate::ops::{Deref, DerefMut};
2323
any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64",),
2424
repr(align(128))
2525
)]
26-
// arm, mips, mips64, and riscv64 have 32-byte cache line size.
26+
// arm, mips and mips64 have 32-byte cache line size.
2727
//
2828
// Sources:
2929
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_arm.go#L7
3030
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mips.go#L7
3131
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mipsle.go#L7
3232
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mips64x.go#L9
33-
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_riscv64.go#L7
3433
#[cfg_attr(
3534
any(
3635
target_arch = "arm",
3736
target_arch = "mips",
3837
target_arch = "mips32r6",
3938
target_arch = "mips64",
4039
target_arch = "mips64r6",
41-
target_arch = "riscv64",
4240
),
4341
repr(align(32))
4442
)]
@@ -47,11 +45,12 @@ use crate::ops::{Deref, DerefMut};
4745
// Sources:
4846
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_s390x.go#L7
4947
#[cfg_attr(target_arch = "s390x", repr(align(256)))]
50-
// x86 and wasm have 64-byte cache line size.
48+
// x86, wasm and riscv have 64-byte cache line size.
5149
//
5250
// Sources:
5351
// - https://github.com/golang/go/blob/dda2991c2ea0c5914714469c4defc2562a907230/src/internal/cpu/cpu_x86.go#L9
5452
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_wasm.go#L7
53+
// - https://github.com/golang/go/blob/5e31f78c8a4ed1b872ddc194f0cd1ae931b37d7e/src/internal/cpu/cpu_riscv64.go#L7
5554
//
5655
// All others are assumed to have 64-byte cache line size.
5756
#[cfg_attr(
@@ -64,7 +63,6 @@ use crate::ops::{Deref, DerefMut};
6463
target_arch = "mips32r6",
6564
target_arch = "mips64",
6665
target_arch = "mips64r6",
67-
target_arch = "riscv64",
6866
target_arch = "s390x",
6967
)),
7068
repr(align(64))

0 commit comments

Comments
 (0)