x86: Replace ARCH_SETUP by a proper x86_init_ops
authorThomas Gleixner <tglx@linutronix.de>
Thu, 20 Aug 2009 11:04:10 +0000 (13:04 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 31 Aug 2009 07:35:45 +0000 (09:35 +0200)
ARCH_SETUP is a horrible leftover from the old arch/i386 mach support
code. It still has a lonely user in xen. Move it to x86_init_ops.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/paravirt_types.h
arch/x86/include/asm/x86_init.h
arch/x86/kernel/paravirt.c
arch/x86/kernel/setup.c
arch/x86/kernel/x86_init.c
arch/x86/xen/enlighten.c

index 6a07af432c81be46ab0d41e48e39e0cd5a7a85d7..22cb3872f6d19362f8f5648b55e5f18c8781d356 100644 (file)
@@ -24,7 +24,6 @@ static inline void load_sp0(struct tss_struct *tss,
        PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread);
 }
 
-#define ARCH_SETUP                     pv_init_ops.arch_setup();
 static inline unsigned long get_wallclock(void)
 {
        return PVOP_CALL0(unsigned long, pv_time_ops.get_wallclock);
index 25922afb63470e2069725d69fa0c4efd3f3cf361..a05085e5fdbbf0137e1a3b9f5631a7d59e736a51 100644 (file)
@@ -80,7 +80,6 @@ struct pv_init_ops {
                          unsigned long addr, unsigned len);
 
        /* Basic arch-specific setup */
-       void (*arch_setup)(void);
        void (*post_allocator_init)(void);
 
        /* Print a banner to identify the environment */
index 07c37bd879f8a630343ffa0579e0e94f3be1438e..ceffbf358fc034f90330da42153e8866fc55a15b 100644 (file)
@@ -56,6 +56,14 @@ struct x86_init_irqs {
        void (*trap_init)(void);
 };
 
+/**
+ * struct x86_init_oem - oem platform specific customizing functions
+ * @arch_setup:                        platform specific architecure setup
+ */
+struct x86_init_oem {
+       void (*arch_setup)(void);
+};
+
 /**
  * struct x86_init_ops - functions for platform specific setup
  *
@@ -64,6 +72,7 @@ struct x86_init_ops {
        struct x86_init_resources       resources;
        struct x86_init_mpparse         mpparse;
        struct x86_init_irqs            irqs;
+       struct x86_init_oem             oem;
 };
 
 extern struct x86_init_ops x86_init;
index d76bfbec71ae4f559c4d94e4959c0b23d59dcf3f..80275ef1651a6aa38243bdc2e4c4db3e524682f4 100644 (file)
@@ -311,7 +311,6 @@ struct pv_info pv_info = {
 struct pv_init_ops pv_init_ops = {
        .patch = native_patch,
        .banner = default_banner,
-       .arch_setup = paravirt_nop,
 };
 
 struct pv_time_ops pv_time_ops = {
index bf3b87f1f7dbddf50d9639b94d6f05f7e681da5d..d12aa82c9c32cc7a78102eb73990dd8420d665f1 100644 (file)
 #include <asm/numa_64.h>
 #endif
 
-#ifndef ARCH_SETUP
-#define ARCH_SETUP
-#endif
-
 /*
  * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
  * The direct mapping extends to max_pfn_mapped, so that we can directly access
@@ -750,7 +746,7 @@ void __init setup_arch(char **cmdline_p)
        }
 #endif
 
-       ARCH_SETUP
+       x86_init.oem.arch_setup();
 
        setup_memory_map();
        parse_setup_data();
index 9f2b775dc7286a9f0eb88d6d42d3bc7966aa9b0a..fa2d849be35abb6513988bd24701ea51458391fd 100644 (file)
@@ -42,4 +42,8 @@ struct __initdata x86_init_ops x86_init = {
                .intr_init              = native_init_IRQ,
                .trap_init              = x86_init_noop,
        },
+
+       .oem = {
+               .arch_setup             = x86_init_noop,
+       },
 };
index 50b20c64f0bdb5e4bc46161c139d2bbb28165da6..73c7b1d610f3f150002d6b96ffd06cf23c491aae 100644 (file)
@@ -841,7 +841,6 @@ static const struct pv_init_ops xen_init_ops __initdata = {
        .patch = xen_patch,
 
        .banner = xen_banner,
-       .arch_setup = xen_arch_setup,
        .post_allocator_init = xen_post_allocator_init,
 };
 
@@ -982,6 +981,7 @@ asmlinkage void __init xen_start_kernel(void)
        pv_mmu_ops = xen_mmu_ops;
 
        x86_init.resources.memory_setup = xen_memory_setup;
+       x86_init.oem.arch_setup = xen_arch_setup;
 
 #ifdef CONFIG_X86_64
        /*
This page took 0.052349 seconds and 5 git commands to generate.