From 0afbef3ee06d894112b475210e2e525a684dd834 Mon Sep 17 00:00:00 2001 From: zab Date: Tue, 20 May 2003 00:42:15 +0000 Subject: [PATCH] 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 --- lnet/Makefile.mk | 9 ++++++--- lnet/router/router.c | 10 +++------- lustre/portals/Makefile.mk | 9 ++++++--- lustre/portals/router/router.c | 10 +++------- 4 files changed, 18 insertions(+), 20 deletions(-) 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); -- 1.8.3.1