From aaf803372bd4b30b97a2039e4b1b36b07c0a7250 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 7 Feb 2011 03:18:50 +0100 Subject: Defer Xen device initialization to device_service_create * device/device_init.c (device_service_create) [MACH_HYP]: Call hyp_dev_init. * xen/xen.c (hyp_init): Do not call hyp_block_init and hyp_net_init, now called in ... (hyp_dev_init): New function. * xen/xen.h (hyp_dev_init): New declaration. --- xen/xen.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'xen/xen.c') diff --git a/xen/xen.c b/xen/xen.c index 062ee4d5..f8f964eb 100644 --- a/xen/xen.c +++ b/xen/xen.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Samuel Thibault + * Copyright (C) 2007-2011 Samuel Thibault * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,13 +46,17 @@ void hyp_init(void) { hyp_grant_init(); hyp_store_init(); - /* these depend on the above */ - hyp_block_init(); - hyp_net_init(); evtchn_port_t port = hyp_event_channel_bind_virq(VIRQ_DEBUG, 0); hyp_evt_handler(port, hyp_debug, 0, SPL7); } +void hyp_dev_init(void) +{ + /* these depend on hyp_init() and working threads */ + hyp_block_init(); + hyp_net_init(); +} + void _hyp_halt(void) { hyp_halt(); -- cgit v1.2.3