From: Guo Xuenan guoxuenan@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8PGC4
--------------------------------
for performance reasons, hulk 5.10 do not use OPTIMIZE_INLINING. it using gnu_inline attribute causing inline functions not really inline, which introducing performance issues,so we disable it and adapt some link conflicting functions.
Signed-off-by: Guo Xuenan guoxuenan@huawei.com Reviewed-by: Jason Yan yanaijie@huawei.com
Signed-off-by: Chen Jun chenjun102@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com Signed-off-by: Yuntao Liu liuyuntao12@huawei.com --- arch/arm64/kvm/sys_regs.h | 5 +++++ .../media/atomisp/pci/hive_isp_css_include/print_support.h | 4 ++++ lib/Kconfig.debug | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h index c65c129b3500..9f88fc91b44c 100644 --- a/arch/arm64/kvm/sys_regs.h +++ b/arch/arm64/kvm/sys_regs.h @@ -100,8 +100,13 @@ struct sys_reg_desc { #define REG_USER_WI (1 << 3) /* WI from userspace only */
static __printf(2, 3) +#if defined(CONFIG_OPTIMIZE_INLINING) inline void print_sys_reg_msg(const struct sys_reg_params *p, char *fmt, ...) +#else +void print_sys_reg_msg(const struct sys_reg_params *p, + char *fmt, ...) +#endif { va_list va;
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h index a3c7f3de6d17..916529e10bd1 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h @@ -20,7 +20,11 @@
extern int (*sh_css_printf)(const char *fmt, va_list args); /* depends on host supplied print function in ia_css_init() */ +#if defined(CONFIG_OPTIMIZE_INLINING) static inline __printf(1, 2) void ia_css_print(const char *fmt, ...) +#else +static __printf(1, 2) void ia_css_print(const char *fmt, ...) +#endif { va_list ap;
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 5a8d18f3be3b..8c0b54eb9884 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -475,7 +475,7 @@ config HEADERS_INSTALL as uapi header sanity checks.
config OPTIMIZE_INLINING - def_bool y + def_bool n help This option determines if the kernel forces gcc to inline the functions developers have marked 'inline'. Doing so takes away freedom from gcc to