提交 003a421b 编写于 作者: G Guo Xuenan 提交者: Zheng Zengkai

disable OPTIMIZE_INLINING by default

hulk inclusion
category: bugfix
bugzilla: 182617 https://gitee.com/openeuler/kernel/issues/I4DDEL

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

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: NGuo Xuenan <guoxuenan@huawei.com>
Reviewed-by: NJason Yan <yanaijie@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 077d8826
...@@ -63,8 +63,13 @@ struct sys_reg_desc { ...@@ -63,8 +63,13 @@ struct sys_reg_desc {
#define REG_RAZ (1 << 1) /* RAZ from userspace and guest */ #define REG_RAZ (1 << 1) /* RAZ from userspace and guest */
static __printf(2, 3) static __printf(2, 3)
#if defined(CONFIG_OPTIMIZE_INLINING)
inline void print_sys_reg_msg(const struct sys_reg_params *p, inline void print_sys_reg_msg(const struct sys_reg_params *p,
char *fmt, ...) char *fmt, ...)
#else
void print_sys_reg_msg(const struct sys_reg_params *p,
char *fmt, ...)
#endif
{ {
va_list va; va_list va;
......
...@@ -168,8 +168,13 @@ static uint32_t __calc_hdr_byte_sum(struct amdgpu_ras_eeprom_control *control) ...@@ -168,8 +168,13 @@ static uint32_t __calc_hdr_byte_sum(struct amdgpu_ras_eeprom_control *control)
return tbl_sum; return tbl_sum;
} }
#if defined(CONFIG_OPTIMIZE_INLINING)
static inline uint32_t __calc_recs_byte_sum(struct eeprom_table_record *records,
int num)
#else
static uint32_t __calc_recs_byte_sum(struct eeprom_table_record *records, static uint32_t __calc_recs_byte_sum(struct eeprom_table_record *records,
int num) int num)
#endif
{ {
int i, j; int i, j;
uint32_t tbl_sum = 0; uint32_t tbl_sum = 0;
......
...@@ -88,8 +88,11 @@ int amdgpu_ras_eeprom_process_recods(struct amdgpu_ras_eeprom_control *control, ...@@ -88,8 +88,11 @@ int amdgpu_ras_eeprom_process_recods(struct amdgpu_ras_eeprom_control *control,
struct eeprom_table_record *records, struct eeprom_table_record *records,
bool write, bool write,
int num); int num);
#if defined(CONFIG_OPTIMIZE_INLINING)
inline uint32_t amdgpu_ras_eeprom_get_record_max_length(void); inline uint32_t amdgpu_ras_eeprom_get_record_max_length(void);
#else
uint32_t amdgpu_ras_eeprom_get_record_max_length(void);
#endif
void amdgpu_ras_eeprom_test(struct amdgpu_ras_eeprom_control *control); void amdgpu_ras_eeprom_test(struct amdgpu_ras_eeprom_control *control);
......
...@@ -20,7 +20,11 @@ ...@@ -20,7 +20,11 @@
extern int (*sh_css_printf)(const char *fmt, va_list args); extern int (*sh_css_printf)(const char *fmt, va_list args);
/* depends on host supplied print function in ia_css_init() */ /* 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, ...) 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; va_list ap;
......
...@@ -334,7 +334,7 @@ config HEADERS_INSTALL ...@@ -334,7 +334,7 @@ config HEADERS_INSTALL
as uapi header sanity checks. as uapi header sanity checks.
config OPTIMIZE_INLINING config OPTIMIZE_INLINING
def_bool y def_bool n
help help
This option determines if the kernel forces gcc to inline the functions This option determines if the kernel forces gcc to inline the functions
developers have marked 'inline'. Doing so takes away freedom from gcc to developers have marked 'inline'. Doing so takes away freedom from gcc to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册