[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/boot: Export bootstrap_map() for use in other translation units
commit b9d7e90047a4c1e7646742058c875f7a813da9ce Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Nov 28 19:01:15 2017 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Jan 11 12:25:37 2018 +0000 x86/boot: Export bootstrap_map() for use in other translation units There is one static bootstrap_map() function which is passed via function pointer to all of its users. This is wasteful. Export bootstrap_map() for all x86 users, and drop the function pointer parameter from the construct_dom0*() infrastructure. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/dom0_build.c | 3 +-- xen/arch/x86/hvm/dom0_build.c | 1 - xen/arch/x86/pv/dom0_build.c | 1 - xen/arch/x86/setup.c | 5 ++--- xen/include/asm-x86/dom0_build.h | 2 -- xen/include/asm-x86/setup.h | 2 +- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index bf992fe..75b2bb3 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -463,7 +463,6 @@ int __init dom0_setup_permissions(struct domain *d) int __init construct_dom0(struct domain *d, const module_t *image, unsigned long image_headroom, module_t *initrd, - void *(*bootstrap_map)(const module_t *), char *cmdline) { int rc; @@ -484,7 +483,7 @@ int __init construct_dom0(struct domain *d, const module_t *image, #endif rc = (is_hvm_domain(d) ? dom0_construct_pvh : dom0_construct_pv) - (d, image, image_headroom, initrd, bootstrap_map, cmdline); + (d, image, image_headroom, initrd, cmdline); if ( rc ) return rc; diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 4338965..d696d4c 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -1063,7 +1063,6 @@ static int __init pvh_setup_acpi(struct domain *d, paddr_t start_info) int __init dom0_construct_pvh(struct domain *d, const module_t *image, unsigned long image_headroom, module_t *initrd, - void *(*bootstrap_map)(const module_t *), char *cmdline) { paddr_t entry, start_info; diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index 09c765a..8fd40b5 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -275,7 +275,6 @@ int __init dom0_construct_pv(struct domain *d, const module_t *image, unsigned long image_headroom, module_t *initrd, - void *(*bootstrap_map)(const module_t *), char *cmdline) { int i, cpu, rc, compatible, compat32, order, machine; diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 2e10c6b..141f80f 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -319,7 +319,7 @@ static void __init normalise_cpu_order(void) * Ensure a given physical memory range is present in the bootstrap mappings. * Use superpage mappings to ensure that pagetable memory needn't be allocated. */ -static void *__init bootstrap_map(const module_t *mod) +void *__init bootstrap_map(const module_t *mod) { static unsigned long __initdata map_cur = BOOTSTRAP_MAP_BASE; uint64_t start, end, mask = (1L << L2_PAGETABLE_SHIFT) - 1; @@ -1654,8 +1654,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) */ if ( construct_dom0(dom0, mod, modules_headroom, (initrdidx > 0) && (initrdidx < mbi->mods_count) - ? mod + initrdidx : NULL, - bootstrap_map, cmdline) != 0) + ? mod + initrdidx : NULL, cmdline) != 0) panic("Could not set up DOM0 guest OS"); if ( cpu_has_smap ) diff --git a/xen/include/asm-x86/dom0_build.h b/xen/include/asm-x86/dom0_build.h index d83d2b4..25d124f 100644 --- a/xen/include/asm-x86/dom0_build.h +++ b/xen/include/asm-x86/dom0_build.h @@ -17,13 +17,11 @@ int dom0_setup_permissions(struct domain *d); int dom0_construct_pv(struct domain *d, const module_t *image, unsigned long image_headroom, module_t *initrd, - void *(*bootstrap_map)(const module_t *), char *cmdline); int dom0_construct_pvh(struct domain *d, const module_t *image, unsigned long image_headroom, module_t *initrd, - void *(*bootstrap_map)(const module_t *), char *cmdline); unsigned long dom0_paging_pages(const struct domain *d, diff --git a/xen/include/asm-x86/setup.h b/xen/include/asm-x86/setup.h index c5b3d4e..46e9ca6 100644 --- a/xen/include/asm-x86/setup.h +++ b/xen/include/asm-x86/setup.h @@ -38,12 +38,12 @@ int construct_dom0( struct domain *d, const module_t *kernel, unsigned long kernel_headroom, module_t *initrd, - void *(*bootstrap_map)(const module_t *), char *cmdline); void setup_io_bitmap(struct domain *d); unsigned long initial_images_nrpages(nodeid_t node); void discard_initial_images(void); +void *bootstrap_map(const module_t *mod); unsigned int dom0_max_vcpus(void); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |