On Fri, Jul 10, 2020 at 9:52 AM Will Deacon <will@xxxxxxxxxx> wrote: > > Now that 'smp_read_barrier_depends()' has gone the way of the Norwegian > Blue, drop the inclusion of <asm/barrier.h> in 'asm-generic/rwonce.h'. > > This requires fixups to some architecture vdso headers which were > previously relying on 'asm/barrier.h' coming in via 'linux/compiler.h'. > > Signed-off-by: Will Deacon <will@xxxxxxxxxx> > --- > arch/arm/include/asm/vdso/gettimeofday.h | 1 + > arch/arm64/include/asm/vdso/compat_gettimeofday.h | 1 + > arch/arm64/include/asm/vdso/gettimeofday.h | 1 + > arch/riscv/include/asm/vdso/gettimeofday.h | 1 + > include/asm-generic/rwonce.h | 2 -- > include/linux/nospec.h | 2 ++ > 6 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/include/asm/vdso/gettimeofday.h b/arch/arm/include/asm/vdso/gettimeofday.h > index 36dc18553ed8..1b207cf07697 100644 > --- a/arch/arm/include/asm/vdso/gettimeofday.h > +++ b/arch/arm/include/asm/vdso/gettimeofday.h > @@ -7,6 +7,7 @@ > > #ifndef __ASSEMBLY__ > > +#include <asm/barrier.h> > #include <asm/errno.h> > #include <asm/unistd.h> > #include <asm/vdso/cp15.h> > diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h > index b6907ae78e53..bcf7649999a4 100644 > --- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h > +++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h > @@ -7,6 +7,7 @@ > > #ifndef __ASSEMBLY__ > > +#include <asm/barrier.h> > #include <asm/unistd.h> > #include <asm/errno.h> > > diff --git a/arch/arm64/include/asm/vdso/gettimeofday.h b/arch/arm64/include/asm/vdso/gettimeofday.h > index afba6ba332f8..127fa63893e2 100644 > --- a/arch/arm64/include/asm/vdso/gettimeofday.h > +++ b/arch/arm64/include/asm/vdso/gettimeofday.h > @@ -7,6 +7,7 @@ > > #ifndef __ASSEMBLY__ > > +#include <asm/barrier.h> > #include <asm/unistd.h> > > #define VDSO_HAS_CLOCK_GETRES 1 > diff --git a/arch/riscv/include/asm/vdso/gettimeofday.h b/arch/riscv/include/asm/vdso/gettimeofday.h > index c8e818688ec1..3099362d9f26 100644 > --- a/arch/riscv/include/asm/vdso/gettimeofday.h > +++ b/arch/riscv/include/asm/vdso/gettimeofday.h > @@ -4,6 +4,7 @@ > > #ifndef __ASSEMBLY__ > > +#include <asm/barrier.h> > #include <asm/unistd.h> > #include <asm/csr.h> > #include <uapi/linux/time.h> > diff --git a/include/asm-generic/rwonce.h b/include/asm-generic/rwonce.h > index cc810f1f18ca..cd0302746fb4 100644 > --- a/include/asm-generic/rwonce.h > +++ b/include/asm-generic/rwonce.h > @@ -26,8 +26,6 @@ > #include <linux/kasan-checks.h> > #include <linux/kcsan-checks.h> > > -#include <asm/barrier.h> > - > /* > * Use __READ_ONCE() instead of READ_ONCE() if you do not require any > * atomicity. Note that this may result in tears! > 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? > #include <asm/barrier.h> > > struct task_struct; > -- > 2.27.0.383.g050319c2ae-goog > -- Thanks, ~Nick Desaulniers