Whamcloud - gitweb
Branch: b1_4
authoradilger <adilger>
Fri, 25 Mar 2005 22:51:03 +0000 (22:51 +0000)
committeradilger <adilger>
Fri, 25 Mar 2005 22:51:03 +0000 (22:51 +0000)
The compatibility macro for cpu_online() had reversed parameters.
b=5929
r=fergal (original patch)

lnet/include/libcfs/darwin/kp30.h
lnet/include/libcfs/linux/kp30.h
lnet/include/libcfs/linux/portals_compat25.h
lnet/libcfs/watchdog.c

index 885a78a..7f765e1 100644 (file)
 #include <sys/conf.h>
 #include <miscfs/devfs/devfs.h>
 #include <stdarg.h>
-                                                                                                                                                                            
+
 #include <libcfs/darwin/darwin-lock.h>
 #include <libcfs/darwin/darwin-prim.h>
 #include <portals/p30.h>
-                                                                                                                                                                            
+
 #define our_cond_resched()              schedule_timeout(1);
-                                                                                                                                                                            
+
 #ifdef CONFIG_SMP
 #define LASSERT_SPIN_LOCKED(lock) do {} while(0) /* XXX */
 #else
 #define LASSERT_SPIN_LOCKED(lock) do {} while(0)
 #endif
-                                                                                                                                                                            
+
 #define LBUG_WITH_LOC(file, func, line)         do {} while(0)
 
 /* --------------------------------------------------------------------- */
 
 #define PORTAL_SYMBOL_REGISTER(x)               cfs_symbol_register(#x, &x)
 #define PORTAL_SYMBOL_UNREGISTER(x)             cfs_symbol_unregister(#x)
-                                                                                                                                                                            
+
 #define PORTAL_SYMBOL_GET(x)                    ((typeof(&x))cfs_symbol_get(#x))
 #define PORTAL_SYMBOL_PUT(x)                    cfs_symbol_put(#x)
-                                                                                                                                                                            
+
 #define PORTAL_MODULE_USE                       do{int i = 0; i++;}while(0)
 #define PORTAL_MODULE_UNUSE                     do{int i = 0; i--;}while(0)
 
index 344264d..e588c45 100644 (file)
@@ -110,30 +110,30 @@ do {                                                                    \
 #endif /* __arch_um__ */
 
 /* ------------------------------------------------------------------- */
-                                                                                                                                                                            
+
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-                                                                                                                                                                            
+
 #define PORTAL_SYMBOL_REGISTER(x) inter_module_register(#x, THIS_MODULE, &x)
 #define PORTAL_SYMBOL_UNREGISTER(x) inter_module_unregister(#x)
-                                                                                                                                                                            
+
 #define PORTAL_SYMBOL_GET(x) ((typeof(&x))inter_module_get(#x))
 #define PORTAL_SYMBOL_PUT(x) inter_module_put(#x)
-                                                                                                                                                                            
+
 #define PORTAL_MODULE_USE       MOD_INC_USE_COUNT
 #define PORTAL_MODULE_UNUSE     MOD_DEC_USE_COUNT
 #else
-                                                                                                                                                                            
+
 #define PORTAL_SYMBOL_REGISTER(x)
 #define PORTAL_SYMBOL_UNREGISTER(x)
-                                                                                                                                                                            
+
 #define PORTAL_SYMBOL_GET(x) symbol_get(x)
 #define PORTAL_SYMBOL_PUT(x) symbol_put(x)
-                                                                                                                                                                            
+
 #define PORTAL_MODULE_USE       try_module_get(THIS_MODULE)
 #define PORTAL_MODULE_UNUSE     module_put(THIS_MODULE)
-                                                                                                                                                                            
+
 #endif
-                                                                                                                                                                            
+
 /******************************************************************************/
 
 #if (__GNUC__)
index 148a401..31658d5 100644 (file)
 #endif
 
 #ifndef HAVE_CPU_ONLINE
-#define cpu_online(cpu) (test_bit(cpu_online_map, &(cpu)))
+#define cpu_online(cpu) test_bit(cpu, &(cpu_online_map))
 #endif
 #ifndef HAVE_CPUMASK_T
-#define cpu_set(cpu, map) (set_bit(cpu, &(map)))
+#define cpu_set(cpu, map) set_bit(cpu, &(map))
 typedef unsigned long cpumask_t;
 #endif
 
index 53b5903..a873da7 100644 (file)
@@ -254,7 +254,7 @@ static void lcw_dispatch_stop(void)
         EXIT;
 }
 
-struct lc_watchdog *lc_watchdog_add(int time,
+struct lc_watchdog *lc_watchdog_add(int timeout_ms,
                                     void (*callback)(struct lc_watchdog *,
                                                      struct task_struct *,
                                                      void *),
@@ -271,7 +271,7 @@ struct lc_watchdog *lc_watchdog_add(int time,
 
         lcw->lcw_task = cfs_current();
         lcw->lcw_pid = cfs_curproc_pid();
-        lcw->lcw_time = (time * HZ) / 1000;
+        lcw->lcw_time = (timeout_ms * HZ) / 1000;
         lcw->lcw_callback = callback ? callback : lc_watchdog_dumplog;
         lcw->lcw_data = data;
         lcw->lcw_state = LC_WATCHDOG_DISABLED;