Re: [PATCH v3 06/19] asm/rwonce: Don't pull <asm/barrier.h> into 'asm-generic/rwonce.h'

From
Will Deacon <will@kernel.org>
Date
2020-07-10 17:15:19
Also in
linux-alpha, lkml, virtualization
Reply to
Nick Desaulniers, 2020-07-10
On Fri, Jul 10, 2020 at 10:06:12AM -0700, Nick Desaulniers wrote:
On Fri, Jul 10, 2020 at 9:52 AM Will Deacon [off-list ref] wrote:
quoted
diff --git a/include/linux/nospec.h b/include/linux/nospec.h
index 0c5ef54fd416..c1e79f72cd89 100644
--- a/include/linux/nospec.h
+++ b/include/linux/nospec.h
@@ -5,6 +5,8 @@

 #ifndef _LINUX_NOSPEC_H
 #define _LINUX_NOSPEC_H
+
+#include <linux/compiler.h>
The other hunks LGTM, but this one is a little more curious to me. Can
you walk me through this addition?
Sure. Without it, the build breaks on riscv because it includes this header
without first including <linux/compiler.h>, and this header relies on
OPTIMIZER_HIDE_VAR() being to defined as it is used in static inline
functions.

Perhaps I should squash this hunk into "compiler.h: Split {READ,WRITE}_ONCE
definitions out into rwonce.h" instead, as that is where I remove the
include of <linux/compiler.h> from 'asm-generic/barrier.h'. I'll check
the bisection on riscv...

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (27 messages) 27 messages, 6 authors, last reply 2020-07-28
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