]> xenbits.xensource.com Git - xen.git/commitdiff
xen/ppc: Avoid using the legacy __read_mostly/__ro_after_init definitions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 21 Jun 2024 18:23:11 +0000 (19:23 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 22 Jul 2024 09:50:03 +0000 (10:50 +0100)
RISC-V wants to introduce a full build of Xen without using the legacy
definitions.  PPC64 has the most minimal full build of Xen right now, so make
it compile without the legacy definitions.

Mostly this is just including xen/sections.h in a variety of common files.  In
a couple of cases, we can drop an inclusion of {xen,asm}/cache.h, but almost
all files get the definitions transitively.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
30 files changed:
xen/arch/ppc/include/asm/cache.h
xen/arch/ppc/mm-radix.c
xen/arch/ppc/stubs.c
xen/common/argo.c
xen/common/cpu.c
xen/common/debugtrace.c
xen/common/domain.c
xen/common/event_channel.c
xen/common/keyhandler.c
xen/common/memory.c
xen/common/page_alloc.c
xen/common/pdx.c
xen/common/radix-tree.c
xen/common/random.c
xen/common/rcupdate.c
xen/common/sched/core.c
xen/common/sched/cpupool.c
xen/common/sched/credit.c
xen/common/sched/credit2.c
xen/common/shutdown.c
xen/common/spinlock.c
xen/common/timer.c
xen/common/version.c
xen/common/virtual_region.c
xen/common/vmap.c
xen/drivers/char/console.c
xen/drivers/char/ns16550.c
xen/drivers/char/serial.c
xen/include/xen/cache.h
xen/include/xen/hypfs.h

index 13c0bf3242c8d1176b52ade6a0ce432976869bbb..8a0a6b7b17569fc1910778ff44c5dad30cad08e8 100644 (file)
@@ -3,7 +3,4 @@
 #ifndef _ASM_PPC_CACHE_H
 #define _ASM_PPC_CACHE_H
 
-/* TODO: Phase out the use of this via cache.h */
-#define __read_mostly __section(".data.read_mostly")
-
 #endif /* _ASM_PPC_CACHE_H */
index ab5a10695c5f5c5583feaaf63e9e637fa98d959d..0a47959e64f2016d8469870db099a9d109f4650c 100644 (file)
@@ -2,6 +2,7 @@
 #include <xen/init.h>
 #include <xen/kernel.h>
 #include <xen/mm.h>
+#include <xen/sections.h>
 #include <xen/types.h>
 #include <xen/lib.h>
 
index 923f0e7b209527b11a9f32f65d8234b8228cf7cf..e743a86710137af29bf940ac91b48ee2900ddc05 100644 (file)
@@ -3,6 +3,7 @@
 #include <xen/domain.h>
 #include <xen/irq.h>
 #include <xen/nodemask.h>
+#include <xen/sections.h>
 #include <xen/time.h>
 #include <public/domctl.h>
 #include <public/vm_event.h>
index 901f41eb2dbe51e34fb9a0a90caea923cae9a2a2..df19006744a3cf021004b92e8117a588590f3541 100644 (file)
@@ -25,6 +25,7 @@
 #include <xen/nospec.h>
 #include <xen/param.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/time.h>
 
 #include <xsm/xsm.h>
index 6e35b114c0809be5bb9c7516038c01cf8d08154f..f09af0444b6a3ae12f4d1730d1b23b5e423832ea 100644 (file)
@@ -3,6 +3,7 @@
 #include <xen/event.h>
 #include <xen/init.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/stop_machine.h>
 #include <xen/rcupdate.h>
 
index a272e5e43761b38fe8bf0cabf7d8031596c31a7d..ca883ad9198d76fc0733eaee0dc154542a215ad9 100644 (file)
@@ -13,6 +13,7 @@
 #include <xen/mm.h>
 #include <xen/param.h>
 #include <xen/percpu.h>
+#include <xen/sections.h>
 #include <xen/serial.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
index fb262dcec919b638fe9c5d78c83359d4ed489c2c..7b47696dd3d8ac3ee6045e694ab000c9c1b7f32b 100644 (file)
@@ -11,6 +11,7 @@
 #include <xen/err.h>
 #include <xen/param.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/domain.h>
 #include <xen/mm.h>
 #include <xen/event.h>
index aac7d4b93fb2c385bda1c08ff8f07f08cf428b97..13b97c94d7fa82ff831a16637f500f4d2b1a5bf0 100644 (file)
@@ -26,6 +26,8 @@
 #include <xen/guest_access.h>
 #include <xen/hypercall.h>
 #include <xen/keyhandler.h>
+#include <xen/sections.h>
+
 #include <asm/current.h>
 
 #include <public/xen.h>
index 127ca506965cd363752ae779bda0111b47476e53..674e7be39e9d257f0ef7838613c3921728a6c67c 100644 (file)
@@ -6,6 +6,7 @@
 #include <xen/delay.h>
 #include <xen/keyhandler.h>
 #include <xen/param.h>
+#include <xen/sections.h>
 #include <xen/shutdown.h>
 #include <xen/event.h>
 #include <xen/console.h>
index de2cc7ad92a55f34e737aa8886a0e78bec05ed23..a6f2f6d1b348313d92748dd162fe19dfa1625943 100644 (file)
@@ -23,6 +23,7 @@
 #include <xen/param.h>
 #include <xen/perfc.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/trace.h>
 #include <xen/types.h>
 #include <asm/current.h>
index 054b7edb39891280d74acf599e3586c049513bf6..33c8c917d9842ae35f870748ca86cc84672c525e 100644 (file)
 #include <xen/pfn.h>
 #include <xen/types.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/softirq.h>
 #include <xen/spinlock.h>
 
index d3d63b075032ef585b444963b46c897a6282e1ec..b8384e6189df18bbc773bebc337ae2e962ad30e1 100644 (file)
@@ -19,6 +19,7 @@
 #include <xen/mm.h>
 #include <xen/bitops.h>
 #include <xen/nospec.h>
+#include <xen/sections.h>
 
 /**
  * Maximum (non-inclusive) usable pdx. Must be
index adc3034222dc9f7177b415d6ef895ce6ad80f3f6..fb283a9d52fce98b57c215df78ea3da1ced87fb3 100644 (file)
@@ -21,6 +21,7 @@
 #include <xen/init.h>
 #include <xen/radix-tree.h>
 #include <xen/errno.h>
+#include <xen/sections.h>
 
 struct radix_tree_path {
        struct radix_tree_node *node;
index a29f2fcb991ac6994dc6a4cdf55cbcfd77ac1771..35a9f387fd5c5203ef049353f29084827f19bb98 100644 (file)
@@ -1,6 +1,6 @@
-#include <xen/cache.h>
 #include <xen/init.h>
 #include <xen/percpu.h>
+#include <xen/sections.h>
 #include <xen/random.h>
 #include <xen/time.h>
 #include <asm/random.h>
index 212a99acd8c8d4c2649b3bcc56bb163f87ba7b8b..fd5d3d7484a5e71a246551da459b9a2feaeef86d 100644 (file)
@@ -35,6 +35,7 @@
 #include <xen/kernel.h>
 #include <xen/init.h>
 #include <xen/param.h>
+#include <xen/sections.h>
 #include <xen/spinlock.h>
 #include <xen/smp.h>
 #include <xen/rcupdate.h>
index d84b65f197b35e1c1213ad977a66504f27fce68c..1a3ff5ae4dec3f8b9da5fa2cd45dd41eccd54cdb 100644 (file)
@@ -18,6 +18,7 @@
 #include <xen/lib.h>
 #include <xen/param.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/domain.h>
 #include <xen/delay.h>
 #include <xen/event.h>
index ad8f60846273a847a2928c80f57c50883e20c4a1..57dfee26f21f23e04441d31bfb6a2529b797dcf0 100644 (file)
@@ -22,6 +22,7 @@
 #include <xen/param.h>
 #include <xen/percpu.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/warning.h>
 
 #include "private.h"
index 020f44595ed0a35fe79fefc3275fca5d0e93257f..a6bb321e7da18abefc50e1e31b8ef7c9174986d6 100644 (file)
@@ -12,6 +12,7 @@
 #include <xen/lib.h>
 #include <xen/param.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/domain.h>
 #include <xen/delay.h>
 #include <xen/event.h>
index b4e03e2a635c86e09b7cb42b96f04e35f3090f76..76a273d4f6d53694e1c3fc839cdc584949a67891 100644 (file)
@@ -14,6 +14,7 @@
 #include <xen/lib.h>
 #include <xen/param.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/domain.h>
 #include <xen/delay.h>
 #include <xen/event.h>
index 5f8141edc6b2316b267a2ec29e45d23f11c46f32..f413f331af1717d68b4ba453bd15937cfef0b0fd 100644 (file)
@@ -2,6 +2,7 @@
 #include <xen/lib.h>
 #include <xen/param.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/domain.h>
 #include <xen/delay.h>
 #include <xen/watchdog.h>
index 28c6e9d3ac6089d69060fe34fb34e66e5fd6f548..0b877384451d56c2ed968509bb2a17eaebfcc704 100644 (file)
@@ -5,6 +5,7 @@
 #include <xen/param.h>
 #include <xen/smp.h>
 #include <xen/time.h>
+#include <xen/sections.h>
 #include <xen/spinlock.h>
 #include <xen/guest_access.h>
 #include <xen/preempt.h>
index a21798b76f38b2538d112422c945247f1a360131..da0d069cc67483500af8855f987c914c2a1c2f0c 100644 (file)
@@ -11,6 +11,7 @@
 #include <xen/sched.h>
 #include <xen/lib.h>
 #include <xen/param.h>
+#include <xen/sections.h>
 #include <xen/smp.h>
 #include <xen/perfc.h>
 #include <xen/time.h>
index 80869430fc7cbd8806ddb937fcfb0f0450e4af30..b7d7d515a3dcd1fefc777ef04214ec6beb457608 100644 (file)
@@ -3,14 +3,13 @@
 #include <xen/init.h>
 #include <xen/errno.h>
 #include <xen/lib.h>
+#include <xen/sections.h>
 #include <xen/string.h>
 #include <xen/types.h>
 #include <xen/efi.h>
 #include <xen/elf.h>
 #include <xen/version.h>
 
-#include <asm/cache.h>
-
 const char *xen_compile_date(void)
 {
     return XEN_COMPILE_DATE;
index 52405d84b25cc99035ee25c5b74ca4f9d84d3550..1dc2e9f592ed2988e6b5c1e9910d0414293d083f 100644 (file)
@@ -6,6 +6,7 @@
 #include <xen/kernel.h>
 #include <xen/mm.h>
 #include <xen/rcupdate.h>
+#include <xen/sections.h>
 #include <xen/spinlock.h>
 #include <xen/virtual_region.h>
 
index 966a7e763f0f40c79f747ce3fab5979d9f6ff0de..b3b4ddf6531165fe9216f1060c7a3880e7c36b03 100644 (file)
@@ -1,6 +1,6 @@
 #ifdef VMAP_VIRT_START
 #include <xen/bitmap.h>
-#include <xen/cache.h>
+#include <xen/sections.h>
 #include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/pfn.h>
index 3a3a97bcbe3a5441d07f05b6db0d81ee05c71cf1..7da8c5296f3b62c6c45131c58fe5cf0e393e9ef3 100644 (file)
@@ -32,6 +32,7 @@
 #include <xen/warning.h>
 #include <xen/pv_console.h>
 #include <asm/setup.h>
+#include <xen/sections.h>
 
 #ifdef CONFIG_X86
 #include <xen/consoled.h>
index 8f76bbe676bcedcbf6e2541e5dceae5185ebc9a8..eaeb0e09d01ea70f865b8aee4f34ab7a0d4c5cf9 100644 (file)
@@ -22,6 +22,7 @@
 #include <xen/irq.h>
 #include <xen/param.h>
 #include <xen/sched.h>
+#include <xen/sections.h>
 #include <xen/timer.h>
 #include <xen/serial.h>
 #include <xen/iocap.h>
index f28d8557c0a53fbb0a3f349b5b8df9fce085b0fc..591a0090086924608f1bfc15eed7584e5bcc7a4c 100644 (file)
@@ -10,8 +10,8 @@
 #include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/param.h>
+#include <xen/sections.h>
 #include <xen/serial.h>
-#include <xen/cache.h>
 
 #include <asm/processor.h>
 
index 82a3ba38e3e77c083935353ab3bf44b5ca16472f..a19942fd63efc05efa0422496ba85b3070a8844e 100644 (file)
@@ -15,7 +15,7 @@
 #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
 #endif
 
-#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_PPC64)
+#if defined(CONFIG_ARM) || defined(CONFIG_X86)
 /* TODO: Phase out the use of this via cache.h */
 #define __ro_after_init __section(".data.ro_after_init")
 #endif
index 1b65a9188c6c4452b821ccf9f2e933563a7a09b7..d8fcac23b46b881a07a8594b4fa052d34c462491 100644 (file)
@@ -4,6 +4,7 @@
 #ifdef CONFIG_HYPFS
 #include <xen/lib.h>
 #include <xen/list.h>
+#include <xen/sections.h>
 #include <xen/string.h>
 #include <public/hypfs.h>