Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6996d3b63fd9a64341bc80dad1b556fd3eb81272
Commit:     6996d3b63fd9a64341bc80dad1b556fd3eb81272
Parent:     fdb4c338c8d1d494e17c3422a3ea2129f6791596
Author:     Jeremy Fitzhardinge <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 18:37:03 2007 -0700
Committer:  Jeremy Fitzhardinge <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 08:47:41 2007 -0700

    paravirt: add a hook for once the allocator is ready
    
    Add a hook so that the paravirt backend knows when the allocator is
    ready.  This is useful for the obvious reason that the allocator is
    available, but the other side-effect of having the bootmem allocator
    available is that each page now has an associated "struct page".
    
    Signed-off-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]>
---
 arch/i386/kernel/setup.c    |    2 ++
 include/asm-i386/paravirt.h |    8 ++++++++
 include/asm-i386/setup.h    |    4 ++++
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 2d61e65..74871d0 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -601,6 +601,8 @@ void __init setup_arch(char **cmdline_p)
         * NOTE: at this point the bootmem allocator is fully available.
         */
 
+       paravirt_post_allocator_init();
+
        dmi_scan_machine();
 
 #ifdef CONFIG_X86_GENERICARCH
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h
index 99bf661..7868569 100644
--- a/include/asm-i386/paravirt.h
+++ b/include/asm-i386/paravirt.h
@@ -52,6 +52,8 @@ struct paravirt_ops
        /* Basic arch-specific setup */
        void (*arch_setup)(void);
        char *(*memory_setup)(void);
+       void (*post_allocator_init)(void);
+
        void (*init_IRQ)(void);
        void (*time_init)(void);
 
@@ -669,6 +671,12 @@ static inline void setup_secondary_clock(void)
 }
 #endif
 
+static inline void paravirt_post_allocator_init(void)
+{
+       if (paravirt_ops.post_allocator_init)
+               (*paravirt_ops.post_allocator_init)();
+}
+
 static inline void paravirt_pagetable_setup_start(pgd_t *base)
 {
        if (paravirt_ops.pagetable_setup_start)
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h
index 0d5bff9..7862fe8 100644
--- a/include/asm-i386/setup.h
+++ b/include/asm-i386/setup.h
@@ -81,6 +81,10 @@ void __init add_memory_region(unsigned long long start,
 
 extern unsigned long init_pg_tables_end;
 
+#ifndef CONFIG_PARAVIRT
+#define paravirt_post_allocator_init() do {} while (0)
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif  /*  __KERNEL__  */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to