diff --git a/Kconfig b/Kconfig index bb409bb587b0514861c92987e19da6a77cd73da0..9c9b5fedd43c8d8f198f86300c2c2859480687b3 100644 --- a/Kconfig +++ b/Kconfig @@ -37,3 +37,11 @@ config KABI_SIZE_ALIGN_CHECKS help This option enables more stringent kabi checks. Those must be disable in case of a debug-build because they allow to change struct sizes. + +config KABI_RESERVE + bool "Enable KABI PADDING RESERVE" + default y + help + This option enables KABI padding reserve. + For some embedded system, KABI padding reserve may be not necessary. + Disable it on demand. diff --git a/include/linux/kabi.h b/include/linux/kabi.h index da5e6d71e66b5da2a30569a6728ab4c7695896b2..713f63cf56cb128c3eee312bf52bc6a11c278950 100644 --- a/include/linux/kabi.h +++ b/include/linux/kabi.h @@ -425,7 +425,11 @@ * leverage those common names making it easier to read and find in the * code. */ -# define _KABI_RESERVE(n) unsigned long kabi_reserved##n +#ifdef CONFIG_KABI_RESERVE + # define _KABI_RESERVE(n) u64 kabi_reserved##n +#else + # define _KABI_RESERVE(n) +#endif # define KABI_RESERVE(n) _KABI_RESERVE(n); /* * Simple wrappers to replace standard openEuler reserved elements.