]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86/traps: use only one stub function for l/cstar
authorWei Liu <wei.liu2@citrix.com>
Fri, 9 Nov 2018 10:46:36 +0000 (10:46 +0000)
committerWei Liu <wei.liu2@citrix.com>
Fri, 9 Nov 2018 11:33:32 +0000 (11:33 +0000)
And place it into .text.cold.

Requested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_64/traps.c
xen/include/xen/init.h

index 4d506e2c180a24114e4044e551bdcbb8ff56bde9..bf7870ef6d4f2e9e7223fb8b413be017a4c98c4e 100644 (file)
@@ -303,15 +303,12 @@ DEFINE_PER_CPU(struct stubs, stubs);
 void lstar_enter(void);
 void cstar_enter(void);
 #else
-static inline void lstar_enter(void)
+static void __cold star_enter(void)
 {
-    panic("%s called\n", __func__);
-}
-
-static inline void cstar_enter(void)
-{
-    panic("%s called\n", __func__);
+    panic("lstar/cstar\n");
 }
+#define lstar_enter star_enter
+#define cstar_enter star_enter
 #endif /* CONFIG_PV */
 
 void subarch_percpu_traps_init(void)
index db06c76fdfb6d9358900c5f36438397ce74768f4..c6b453adfe2fc57bd542c459e85ba19cbd37e9f9 100644 (file)
@@ -9,6 +9,7 @@
  */
 #define __init            __text_section(".init.text")
 #define __exit            __text_section(".exit.text")
+#define __cold            __text_section(".text.cold")
 #define __initdata        __section(".init.data")
 #define __initconst       __section(".init.rodata")
 #define __initconstrel    __section(".init.rodata.rel")