* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#include <libcfs/linux/linux-cpu.h>
#include <libcfs/linux/linux-time.h>
#include <libcfs/linux/linux-mem.h>
-#include <libcfs/linux/linux-prim.h>
-#include <libcfs/linux/linux-lock.h>
#include <libcfs/linux/linux-fs.h>
-#include <libcfs/linux/linux-tcpip.h>
#include <libcfs/linux/kp30.h>
#ifdef HAVE_ASM_TYPES_H
#include <linux/sched.h> /* THREAD_SIZE */
#include <linux/rbtree.h>
#include <linux/bitops.h>
+#include <linux/capability.h>
#if !defined(__x86_64__)
# ifdef __ia64__
#define CDEBUG_STACK() (0L)
#endif /* __x86_64__ */
-/* initial pid */
-#define LUSTRE_LNET_PID 12345
-
-#define ENTRY_NESTING_SUPPORT (1)
-#define ENTRY_NESTING do {;} while (0)
-#define EXIT_NESTING do {;} while (0)
-#define __current_nesting_level() (0)
-
/**
* Platform specific declarations for cfs_curproc API (libcfs/curproc.h)
*
#define CFS_CURPROC_COMM_MAX (sizeof ((struct task_struct *)0)->comm)
/* helper for sysctl handlers */
-int lprocfs_call_handler(void *data, int write, loff_t *ppos, void *buffer,
- size_t *lenp, int (*handler)(void *data, int write,
- loff_t pos, void *buffer, int len));
-
-#include <linux/capability.h>
-
-/*
- * No stack-back-tracing in Linux for now.
- */
-struct cfs_stack_trace {
-};
+int lprocfs_call_handler(void *data, int write, loff_t *ppos,
+ void __user *buffer, size_t *lenp,
+ int (*handler)(void *data, int write,
+ loff_t pos, void __user *buffer, int len));
+
+#ifndef HAVE_KSTRTOUL
+static inline int kstrtoul(const char *s, unsigned int base, unsigned long *res)
+{
+ char *end = (char *)s;
+
+ *res = simple_strtoul(s, &end, base);
+ if (end - s == 0)
+ return -EINVAL;
+ return 0;
+}
+#endif /* !HAVE_KSTRTOUL */
#ifndef WITH_WATCHDOG
#define WITH_WATCHDOG