x86/xsm: Use the exported bootstrap_map() function
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 Nov 2017 19:07:02 +0000 (19:07 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Jan 2018 12:25:37 +0000 (12:25 +0000)
... rather than obtaining it via function pointer.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen/arch/x86/setup.c
xen/include/xsm/xsm.h
xen/xsm/xsm_core.c
xen/xsm/xsm_policy.c

index 141f80f43160c1ee676a3eeef0fce90cd27bb47d..5c5c64396239c5dc888ccca7b2f60d028b18a213 100644 (file)
@@ -1471,7 +1471,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
     bitmap_fill(module_map, mbi->mods_count);
     __clear_bit(0, module_map); /* Dom0 kernel is always first */
 
-    xsm_multiboot_init(module_map, mbi, bootstrap_map);
+    xsm_multiboot_init(module_map, mbi);
 
     microcode_grab_module(module_map, mbi, bootstrap_map);
 
index 1406f752b6764f7116f9d62cb370863f6ef0860e..e3912bcc9d8ebfe184bd99a88d06b453b4802434 100644 (file)
@@ -696,11 +696,9 @@ static inline int xsm_xen_version (xsm_default_t def, uint32_t op)
 
 #ifdef CONFIG_MULTIBOOT
 extern int xsm_multiboot_init(unsigned long *module_map,
-                              const multiboot_info_t *mbi,
-                              void *(*bootstrap_map)(const module_t *));
+                              const multiboot_info_t *mbi);
 extern int xsm_multiboot_policy_init(unsigned long *module_map,
                                      const multiboot_info_t *mbi,
-                                     void *(*bootstrap_map)(const module_t *),
                                      void **policy_buffer,
                                      size_t *policy_size);
 #endif
@@ -735,8 +733,7 @@ extern const unsigned int xsm_init_policy_size;
 
 #ifdef CONFIG_MULTIBOOT
 static inline int xsm_multiboot_init (unsigned long *module_map,
-                                      const multiboot_info_t *mbi,
-                                      void *(*bootstrap_map)(const module_t *))
+                                      const multiboot_info_t *mbi)
 {
     return 0;
 }
index 08994ee7a131e753097cd56500fcd41ce03da81a..949dfcff75766709cf7664231800fb745e609fd3 100644 (file)
 
 #ifdef CONFIG_XSM
 
+#ifdef CONFIG_MULTIBOOT
+#include <asm/setup.h>
+#endif
+
 #ifdef CONFIG_HAS_DEVICE_TREE
 #include <asm/setup.h>
 #endif
@@ -60,8 +64,7 @@ static int __init xsm_core_init(const void *policy_buffer, size_t policy_size)
 
 #ifdef CONFIG_MULTIBOOT
 int __init xsm_multiboot_init(unsigned long *module_map,
-                              const multiboot_info_t *mbi,
-                              void *(*bootstrap_map)(const module_t *))
+                              const multiboot_info_t *mbi)
 {
     int ret = 0;
     void *policy_buffer = NULL;
@@ -71,7 +74,7 @@ int __init xsm_multiboot_init(unsigned long *module_map,
 
     if ( XSM_MAGIC )
     {
-        ret = xsm_multiboot_policy_init(module_map, mbi, bootstrap_map,
+        ret = xsm_multiboot_policy_init(module_map, mbi,
                                         &policy_buffer, &policy_size);
         if ( ret )
         {
index 16e70f056fafce73b7dc4276c8dd36f209ae4118..33ab37717f021352f448474257b386f01929755c 100644 (file)
@@ -21,6 +21,7 @@
 #include <xsm/xsm.h>
 #ifdef CONFIG_MULTIBOOT
 #include <xen/multiboot.h>
+#include <asm/setup.h>
 #endif
 #include <xen/bitops.h>
 #ifdef CONFIG_HAS_DEVICE_TREE
@@ -31,7 +32,6 @@
 #ifdef CONFIG_MULTIBOOT
 int __init xsm_multiboot_policy_init(unsigned long *module_map,
                                      const multiboot_info_t *mbi,
-                                     void *(*bootstrap_map)(const module_t *),
                                      void **policy_buffer,
                                      size_t *policy_size)
 {