WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] [patch 08/44] paravirt: add a hook for once the allocator is

To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [patch 08/44] paravirt: add a hook for once the allocator is ready
From: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
Date: 2007年7月16日 16:15:44 -0700
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: 2007年7月16日 16:56:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070716231536.937393000@xxxxxxxxxxxxx>>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
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 <jeremy@xxxxxxxxxxxxx>
---
 arch/i386/kernel/setup.c | 2 ++
 include/asm-i386/paravirt.h | 8 ++++++++
 include/asm-i386/setup.h | 4 ++++
 3 files changed, 14 insertions(+)
===================================================================
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -611,6 +611,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
===================================================================
--- 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
 }
 #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)
===================================================================
--- a/include/asm-i386/setup.h
+++ b/include/asm-i386/setup.h
@@ -79,6 +79,10 @@ void __init add_memory_region(unsigned l
 
 extern unsigned long init_pg_tables_end;
 
+#ifndef CONFIG_PARAVIRT
+#define paravirt_post_allocator_init() do {} while (0)
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
-- 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] [patch 12/44] paravirt: make siblingmap functions visible , Jeremy Fitzhardinge
Next by Date: [Xen-devel] [patch 05/44] usermodehelper: Tidy up waiting , Jeremy Fitzhardinge
Previous by Thread: [Xen-devel] [patch 12/44] paravirt: make siblingmap functions visible , Jeremy Fitzhardinge
Next by Thread: [Xen-devel] [patch 05/44] usermodehelper: Tidy up waiting , Jeremy Fitzhardinge
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /