Re: [PATCH 17/19] LoongArch: Add multi-processor (SMP) support

From
Peter Zijlstra <peterz@infradead.org>
Date
2021-07-06 15:17:57
Reply to
Huacai Chen, 2021-07-06
On Tue, Jul 06, 2021 at 12:18:18PM +0800, Huacai Chen wrote:
quoted hunk ↗ jump to hunk
+/*
+ * Loongson-3's SFB (Store-Fill-Buffer) may buffer writes indefinitely when a
+ * tight read loop is executed, because reads take priority over writes & the
+ * hardware (incorrectly) doesn't ensure that writes will eventually occur.
+ *
+ * Since spin loops of any kind should have a cpu_relax() in them, force an SFB
+ * flush from cpu_relax() such that any pending writes will become visible as
+ * expected.
+ */
+#define cpu_relax()	smp_mb()
Guys! You've not fixed that utter trainwreck ?!? You've taped out a
whole new architecture and you're keeping this?
Thread (110 messages) 110 messages, 12 authors, last reply 2021-08-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help