File: kernel-hotplug.m4

package info (click to toggle)
zfs-linux 2.1.11-1%2Bdeb12u1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 77,344 kB
  • sloc: ansic: 376,447; sh: 59,625; python: 7,872; asm: 6,476; makefile: 5,812; perl: 770; sed: 41; awk: 5
file content (26 lines) | stat: -rw-r--r-- 720 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
dnl #
dnl # 4.6 API change
dnl # Added CPU hotplug APIs
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_CPU_HOTPLUG], [
	ZFS_LINUX_TEST_SRC([cpu_hotplug], [
		#include <linux/cpuhotplug.h>
	],[
		enum cpuhp_state state = CPUHP_ONLINE;
		int (*fp)(unsigned int, struct hlist_node *) = NULL;
		cpuhp_state_add_instance_nocalls(0, (struct hlist_node *)NULL);
		cpuhp_state_remove_instance_nocalls(0, (struct hlist_node *)NULL);
		cpuhp_setup_state_multi(state, "", fp, fp);
		cpuhp_remove_multi_state(0);
	])
])

AC_DEFUN([ZFS_AC_KERNEL_CPU_HOTPLUG], [
	AC_MSG_CHECKING([whether CPU hotplug APIs exist])
	ZFS_LINUX_TEST_RESULT([cpu_hotplug], [
		AC_MSG_RESULT(yes)
		AC_DEFINE(HAVE_CPU_HOTPLUG, 1, [yes])
	],[
		AC_MSG_RESULT(no)
	])
])