]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
x86/cache: Drop legacy __read_mostly/__ro_after_init definitions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 21 Jun 2024 19:59:46 +0000 (20:59 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 9 Sep 2024 13:59:05 +0000 (14:59 +0100)
Lots of files were picking these up transitively, including lib.h

However, lib.h needs __read_mostly for printk_once() and this has the side
effect of kicking the transitive can down the road.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/include/asm/cache.h
xen/include/xen/cache.h
xen/include/xen/lib.h

index 956c05493e234e9fed4bbace7e2394cfedf4bfe5..f15d10dc7f2d4d564ea16c37a9bc0c22ea5a9829 100644 (file)
@@ -9,9 +9,6 @@
 #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
 
-/* TODO: Phase out the use of this via cache.h */
-#define __read_mostly __section(".data.read_mostly")
-
 #ifndef __ASSEMBLY__
 
 void cache_flush(const void *addr, unsigned int size);
index a19942fd63efc05efa0422496ba85b3070a8844e..90816ba05b1abb2f72163f026f5ef1a655749e37 100644 (file)
@@ -15,7 +15,7 @@
 #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
 #endif
 
-#if defined(CONFIG_ARM) || defined(CONFIG_X86)
+#if defined(CONFIG_ARM)
 /* TODO: Phase out the use of this via cache.h */
 #define __ro_after_init __section(".data.ro_after_init")
 #endif
index e884a02ee8cee560c6d2222dea4a15f141c9ccdb..81b722ea3e801e9089aaf8758249feb3a758c4f7 100644 (file)
@@ -10,6 +10,7 @@
 #include <xen/types.h>
 #include <xen/xmalloc.h>
 #include <xen/string.h>
+#include <xen/sections.h>
 
 #define __ACCESS_ONCE(x) ({                             \
             (void)(typeof(x))0; /* Scalar typecheck. */ \