mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-27 10:24:22 +03:00
Linux 3.10 compat: struct vmalloc_info moved
Linux kernel commmit torvalds/linux@db3808c1 moved the vmalloc_info structure from a private to a public header. Now that it's available for kernel modules use it. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #257
This commit is contained in:
parent
485b471eb2
commit
c02ab72fb9
@ -33,6 +33,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
|
|||||||
SPL_AC_TASK_CURR
|
SPL_AC_TASK_CURR
|
||||||
SPL_AC_CTL_UNNUMBERED
|
SPL_AC_CTL_UNNUMBERED
|
||||||
SPL_AC_CTL_NAME
|
SPL_AC_CTL_NAME
|
||||||
|
SPL_AC_VMALLOC_INFO
|
||||||
SPL_AC_FLS64
|
SPL_AC_FLS64
|
||||||
SPL_AC_DEVICE_CREATE
|
SPL_AC_DEVICE_CREATE
|
||||||
SPL_AC_5ARGS_DEVICE_CREATE
|
SPL_AC_5ARGS_DEVICE_CREATE
|
||||||
@ -1357,6 +1358,25 @@ AC_DEFUN([SPL_AC_GET_VMALLOC_INFO],
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 3.10 API change,
|
||||||
|
dnl # struct vmalloc_info is now declared in linux/vmalloc.h
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([SPL_AC_VMALLOC_INFO], [
|
||||||
|
AC_MSG_CHECKING([whether struct vmalloc_info is declared])
|
||||||
|
SPL_LINUX_TRY_COMPILE([
|
||||||
|
#include <linux/vmalloc.h>
|
||||||
|
struct vmalloc_info { void *a; };
|
||||||
|
],[
|
||||||
|
return 0;
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_VMALLOC_INFO, 1, [yes])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 2.6.17 API change
|
dnl # 2.6.17 API change
|
||||||
dnl # The helper functions first_online_pgdat(), next_online_pgdat(), and
|
dnl # The helper functions first_online_pgdat(), next_online_pgdat(), and
|
||||||
|
@ -74,10 +74,12 @@ extern size_t vmem_size(vmem_t *vmp, int typemask);
|
|||||||
#ifndef HAVE_GET_VMALLOC_INFO
|
#ifndef HAVE_GET_VMALLOC_INFO
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
|
|
||||||
|
#ifndef HAVE_VMALLOC_INFO
|
||||||
struct vmalloc_info {
|
struct vmalloc_info {
|
||||||
unsigned long used;
|
unsigned long used;
|
||||||
unsigned long largest_chunk;
|
unsigned long largest_chunk;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef void (*get_vmalloc_info_t)(struct vmalloc_info *);
|
typedef void (*get_vmalloc_info_t)(struct vmalloc_info *);
|
||||||
extern get_vmalloc_info_t get_vmalloc_info_fn;
|
extern get_vmalloc_info_t get_vmalloc_info_fn;
|
||||||
|
Loading…
Reference in New Issue
Block a user