From: zab Date: Tue, 20 May 2003 00:42:15 +0000 (+0000) Subject: uml+portals boots.. X-Git-Tag: v1_7_100~1^90~59 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0afbef3ee06d894112b475210e2e525a684dd834;p=fs%2Flustre-release.git uml+portals boots.. - change the makefile ordering so that socknal gets setup after the router - while we're at it, init some router data at build time so its not as susceptible to module_init() ordering --- diff --git a/lnet/Makefile.mk b/lnet/Makefile.mk index be0e51a..a727993 100644 --- a/lnet/Makefile.mk +++ b/lnet/Makefile.mk @@ -1,6 +1,9 @@ -include fs/lustre/portals/Kernelenv +include $(obj)/Kernelenv -obj-y += portals/ +# The ordering of these determines the order that each subsystem's +# module_init() functions are called in. if these are changed make sure +# they reflect the dependencies between each subsystem's _init functions. obj-y += libcfs/ -obj-y += knals/ +obj-y += portals/ obj-y += router/ +obj-y += knals/ diff --git a/lnet/router/router.c b/lnet/router/router.c index d39e3c4..555f9b4 100644 --- a/lnet/router/router.c +++ b/lnet/router/router.c @@ -23,8 +23,8 @@ #include "router.h" -struct list_head kpr_routes; -struct list_head kpr_nals; +LIST_HEAD(kpr_routes); +LIST_HEAD(kpr_nals); unsigned long long kpr_fwd_bytes; unsigned long kpr_fwd_packets; @@ -35,7 +35,7 @@ atomic_t kpr_queue_depth; * * Once in a blue moon we register/deregister NALs and add/remove routing * entries (thread context only)... */ -rwlock_t kpr_rwlock; +rwlock_t kpr_rwlock = RW_LOCK_UNLOCKED; kpr_router_interface_t kpr_router_interface = { kprri_register: kpr_register_nal, @@ -427,10 +427,6 @@ kpr_initialise (void) CDEBUG(D_MALLOC, "kpr_initialise: kmem %d\n", atomic_read(&portal_kmemory)); - rwlock_init(&kpr_rwlock); - INIT_LIST_HEAD(&kpr_routes); - INIT_LIST_HEAD(&kpr_nals); - kpr_proc_init(); PORTAL_SYMBOL_REGISTER(kpr_router_interface); diff --git a/lustre/portals/Makefile.mk b/lustre/portals/Makefile.mk index be0e51a..a727993 100644 --- a/lustre/portals/Makefile.mk +++ b/lustre/portals/Makefile.mk @@ -1,6 +1,9 @@ -include fs/lustre/portals/Kernelenv +include $(obj)/Kernelenv -obj-y += portals/ +# The ordering of these determines the order that each subsystem's +# module_init() functions are called in. if these are changed make sure +# they reflect the dependencies between each subsystem's _init functions. obj-y += libcfs/ -obj-y += knals/ +obj-y += portals/ obj-y += router/ +obj-y += knals/ diff --git a/lustre/portals/router/router.c b/lustre/portals/router/router.c index d39e3c4..555f9b4 100644 --- a/lustre/portals/router/router.c +++ b/lustre/portals/router/router.c @@ -23,8 +23,8 @@ #include "router.h" -struct list_head kpr_routes; -struct list_head kpr_nals; +LIST_HEAD(kpr_routes); +LIST_HEAD(kpr_nals); unsigned long long kpr_fwd_bytes; unsigned long kpr_fwd_packets; @@ -35,7 +35,7 @@ atomic_t kpr_queue_depth; * * Once in a blue moon we register/deregister NALs and add/remove routing * entries (thread context only)... */ -rwlock_t kpr_rwlock; +rwlock_t kpr_rwlock = RW_LOCK_UNLOCKED; kpr_router_interface_t kpr_router_interface = { kprri_register: kpr_register_nal, @@ -427,10 +427,6 @@ kpr_initialise (void) CDEBUG(D_MALLOC, "kpr_initialise: kmem %d\n", atomic_read(&portal_kmemory)); - rwlock_init(&kpr_rwlock); - INIT_LIST_HEAD(&kpr_routes); - INIT_LIST_HEAD(&kpr_nals); - kpr_proc_init(); PORTAL_SYMBOL_REGISTER(kpr_router_interface);