Whamcloud - gitweb
uml+portals boots..
authorzab <zab>
Tue, 20 May 2003 00:42:15 +0000 (00:42 +0000)
committerzab <zab>
Tue, 20 May 2003 00:42:15 +0000 (00:42 +0000)
- 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
lnet/router/router.c
lustre/portals/Makefile.mk
lustre/portals/router/router.c

index be0e51a..a727993 100644 (file)
@@ -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/
index d39e3c4..555f9b4 100644 (file)
@@ -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);
index be0e51a..a727993 100644 (file)
@@ -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/
index d39e3c4..555f9b4 100644 (file)
@@ -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);