[PATCH OLK-6.6] sched: smart_grid: silence complier error

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9PEF6 CVE: NA ---------------------------------------- Silence complier error with allnoconfig. Implicit declaration of function without CONFIG_CGROUP_SCHED: 1. tg_update_affinity_domains 2. init_auto_affinity Signed-off-by: Yipeng Zou <zouyipeng@huawei.com> --- kernel/sched/core.c | 7 +++++++ kernel/sched/fair.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 07bcc5f2e2d9..9e7a99947de6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -9733,7 +9733,9 @@ int sched_cpu_activate(unsigned int cpu) static_branch_inc_cpuslocked(&sched_smt_present); #endif set_cpu_active(cpu, true); +#ifdef CONFIG_QOS_SCHED_SMART_GRID tg_update_affinity_domains(cpu, 1); +#endif if (sched_smp_initialized) { sched_update_numa(cpu, true); @@ -9823,7 +9825,9 @@ int sched_cpu_deactivate(unsigned int cpu) return ret; } sched_domains_numa_masks_clear(cpu); +#ifdef CONFIG_QOS_SCHED_SMART_GRID tg_update_affinity_domains(cpu, 0); +#endif return 0; } @@ -9947,7 +9951,10 @@ void __init sched_init_smp(void) sched_smp_initialized = true; sched_grid_zone_init(); + +#ifdef CONFIG_QOS_SCHED_SMART_GRID init_auto_affinity(&root_task_group); +#endif } static int __init migration_init(void) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8de28b182763..3dcbf50b677f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7253,7 +7253,7 @@ static void destroy_auto_affinity(struct task_group *tg) tg->auto_affinity = NULL; } #else -static void destroy_auto_affinity(struct task_group *tg) {} +static void __maybe_unused destroy_auto_affinity(struct task_group *tg) {} #ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY static inline bool prefer_cpus_valid(struct task_struct *p); -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/7369 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/2... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/7369 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/2...
participants (2)
-
patchwork bot
-
Yipeng Zou