The compatibility macro for cpu_online() had reversed parameters.
b=5929
r=fergal (original patch)
#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)
#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__)
#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
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 *),
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;