Whamcloud - gitweb
LU-2800 autoconf: remove LN_5ARGS_SYSCTL_PROC_HANDLER test
[fs/lustre-release.git] / libcfs / include / libcfs / linux / portals_compat25.h
index b3a493d..52b6244 100644 (file)
@@ -26,6 +26,8 @@
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 #ifndef __LIBCFS_LINUX_PORTALS_COMPAT_H__
 #define __LIBCFS_LINUX_PORTALS_COMPAT_H__
 
-// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
-#if defined(SPINLOCK_DEBUG) && SPINLOCK_DEBUG
-#  define SIGNAL_MASK_ASSERT() \
-   LASSERT(current->sighand->siglock.magic == SPINLOCK_MAGIC)
-#else
-# define SIGNAL_MASK_ASSERT()
-#endif
-// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
-
-#define SIGNAL_MASK_LOCK(task, flags)                                  \
-  spin_lock_irqsave(&task->sighand->siglock, flags)
-#define SIGNAL_MASK_UNLOCK(task, flags)                                \
-  spin_unlock_irqrestore(&task->sighand->siglock, flags)
-#define USERMODEHELPER(path, argv, envp)                               \
-  call_usermodehelper(path, argv, envp, 1)
-#define RECALC_SIGPENDING         recalc_sigpending()
-#define CLEAR_SIGPENDING          clear_tsk_thread_flag(current,       \
-                                                        TIF_SIGPENDING)
-# define CURRENT_SECONDS           get_seconds()
-# define smp_num_cpus              num_online_cpus()
-
-#define cfs_wait_event_interruptible(wq, condition, ret)               \
-        ret = wait_event_interruptible(wq, condition)
-#define cfs_wait_event_interruptible_exclusive(wq, condition, ret)     \
-        ret = wait_event_interruptible_exclusive(wq, condition)
-
-#define UML_PID(tsk) ((tsk)->pid)
-
-#define THREAD_NAME(comm, len, fmt, a...)                              \
-        snprintf(comm, len, fmt, ## a)
-
-/* 2.6 alloc_page users can use page->lru */
-#define PAGE_LIST_ENTRY lru
-#define PAGE_LIST(page) ((page)->lru)
-
 #ifndef __user
 #define __user
 #endif
 
-#ifndef __fls
-#define __cfs_fls fls
-#else
-#define __cfs_fls __fls
-#endif
-
-#ifdef HAVE_5ARGS_SYSCTL_PROC_HANDLER
-#define ll_proc_dointvec(table, write, filp, buffer, lenp, ppos)        \
-        proc_dointvec(table, write, buffer, lenp, ppos);
-
-#define ll_proc_dolongvec(table, write, filp, buffer, lenp, ppos)        \
-        proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
-#define ll_proc_dostring(table, write, filp, buffer, lenp, ppos)        \
-        proc_dostring(table, write, buffer, lenp, ppos);
-#define LL_PROC_PROTO(name)                                             \
-        name(cfs_sysctl_table_t *table, int write,                      \
-             void __user *buffer, size_t *lenp, loff_t *ppos)
-#else
-#define ll_proc_dointvec(table, write, filp, buffer, lenp, ppos)        \
-        proc_dointvec(table, write, filp, buffer, lenp, ppos);
-
-#define ll_proc_dolongvec(table, write, filp, buffer, lenp, ppos)        \
-        proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);
-#define ll_proc_dostring(table, write, filp, buffer, lenp, ppos)        \
-        proc_dostring(table, write, filp, buffer, lenp, ppos);
-#define LL_PROC_PROTO(name)                                             \
-        name(cfs_sysctl_table_t *table, int write, struct file *filp,   \
-             void __user *buffer, size_t *lenp, loff_t *ppos)
-#endif
-#define DECLARE_LL_PROC_PPOS_DECL
+#define LL_PROC_PROTO(name)                                    \
+       name(struct ctl_table *table, int write,                \
+               void __user *buffer, size_t *lenp, loff_t *ppos)
 
 /* helper for sysctl handlers */
 int proc_call_handler(void *data, int write,
@@ -111,4 +51,11 @@ int proc_call_handler(void *data, int write,
                       int (*handler)(void *data, int write,
                                      loff_t pos, void *buffer, int len));
 
+#ifdef HAVE_INIT_NET
+# define DEFAULT_NET   (&init_net)
+#else
+/* some broken backports */
+# define DEFAULT_NET   (NULL)
+#endif
+
 #endif /* _PORTALS_COMPAT_H */