提交 d332bb38 编写于 作者: Z Zheng Zengkai

KABI: Add CONFIG_KABI_RESERVE to control KABI padding reserve

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4K3S5

-----------------------

Add CONFIG_KABI_RESERVE to control KABI padding reserve or not,
for some embedded system, KABI padding reserve may be not necessary.

By the way, adjust unsigned long to u64 to unify basic reserve
length for both 32bit and 64bit architectures.
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 65805061
......@@ -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.
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册