On Fri, 2024-06-21 at 21:19 +0100, Andrew Cooper wrote: > Hide the legacy __ro_after_init definition in xen/cache.h for RISC-V, > to avoid > its use creeping in. Only mm.c needs adjusting as a consequence > > No functional change. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > --- > CC: Shawn Anastasio <sanasta...@raptorengineering.com> > CC: Oleksii Kurochko <oleksii.kuroc...@gmail.com> > CC: George Dunlap <george.dun...@citrix.com> > CC: Jan Beulich <jbeul...@suse.com> > CC: Stefano Stabellini <sstabell...@kernel.org> > CC: Julien Grall <jul...@xen.org> > > https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/1342686294 > --- > xen/arch/riscv/mm.c | 2 +- > xen/include/xen/cache.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/riscv/mm.c b/xen/arch/riscv/mm.c > index 053f043a3d2a..3ebaf6da01cc 100644 > --- a/xen/arch/riscv/mm.c > +++ b/xen/arch/riscv/mm.c > @@ -1,11 +1,11 @@ > /* SPDX-License-Identifier: GPL-2.0-only */ > > -#include <xen/cache.h> > #include <xen/compiler.h> > #include <xen/init.h> > #include <xen/kernel.h> > #include <xen/macros.h> > #include <xen/pfn.h> > +#include <xen/sections.h> > > #include <asm/early_printk.h> > #include <asm/csr.h> > diff --git a/xen/include/xen/cache.h b/xen/include/xen/cache.h > index 55456823c543..82a3ba38e3e7 100644 > --- a/xen/include/xen/cache.h > +++ b/xen/include/xen/cache.h > @@ -15,7 +15,9 @@ > #define __cacheline_aligned > __attribute__((__aligned__(SMP_CACHE_BYTES))) > #endif > > +#if defined(CONFIG_ARM) || defined(CONFIG_X86) || > defined(CONFIG_PPC64) > /* TODO: Phase out the use of this via cache.h */ > #define __ro_after_init __section(".data.ro_after_init") > +#endif Why "defined(CONFIG_RISCV_64)" is missed?
~ Oleksii > > #endif /* __LINUX_CACHE_H */