aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2022-12-01 14:03:00 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2022-12-01 14:03:00 +0000
commite101c1c2c9ba18b1dd0eb2000106fafc915babdc (patch)
tree6b46e741e50bc828c8e6e884941903dd4f9b9a05 /sys/compat/linuxkpi/common
parent0adc02a97989f0a396740ffb64314fe8e816c877 (diff)
downloadsrc-e101c1c2c9ba18b1dd0eb2000106fafc915babdc.tar.gz
src-e101c1c2c9ba18b1dd0eb2000106fafc915babdc.zip
linuxkpi: Introduce module_param() of type `bint`
In Linux, this limits the accepted value to -1, 0 and 1. In FreeBSD, this remains a signed integer with no specific constraints. This change is a requirement to update our DRM drivers to Linux 5.12. Differential Revision: https://reviews.freebsd.org/D37364
Diffstat (limited to 'sys/compat/linuxkpi/common')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/moduleparam.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/moduleparam.h b/sys/compat/linuxkpi/common/include/linux/moduleparam.h
index ebf3b7a95c02..b5c6ef95637c 100644
--- a/sys/compat/linuxkpi/common/include/linux/moduleparam.h
+++ b/sys/compat/linuxkpi/common/include/linux/moduleparam.h
@@ -90,6 +90,9 @@
LINUXKPI_PARAM_NAME(name), LINUXKPI_PARAM_PERM(perm), &(var), 0, \
LINUXKPI_PARAM_DESC(name)))
+#define LINUXKPI_PARAM_bint(name, var, perm) \
+ LINUXKPI_PARAM_int(name, var, perm)
+
#define LINUXKPI_PARAM_hexint(name, var, perm) \
extern const char LINUXKPI_PARAM_DESC(name)[]; \
LINUXKPI_PARAM_PASS(SYSCTL_UINT(LINUXKPI_PARAM_PARENT, OID_AUTO, \