提交 0836c709 编写于 作者: X Xia Fukun 提交者: Zheng Zengkai

init/Kconfig: Add SMP to the dependencies of QOS_SCHED

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5UPB0
CVE: NA

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

After CONFIG_SMP is disabled during kernel compilation,
CONFIG_QOS_SCHED is not disabled.
As a result, the following error occurs:

kernel/sched/fair.c: In function ‘check_qos_cfs_rq’:
kernel/sched/fair.c:7324:4: error: implicit declaration of function
‘sched_idle_cpu’; did you mean ‘sched_idle_rq’?
[-Werror=implicit-function-declaration]
 7324 |   !sched_idle_cpu(smp_processor_id()) &&
      |    ^~~~~~~~~~~~~~
./include/linux/compiler.h:78:42: note: in definition of macro ‘unlikely’
   78 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^
  CC      mm/highmem.o
kernel/sched/fair.c: In function ‘pick_next_task_fair’:
kernel/sched/fair.c:7599:43: error: ‘struct rq’ has no member named ‘online’
 7599 |   if (cfs_rq->idle_h_nr_running != 0 && rq->online)
      |                                           ^~
  AR      arch/x86/mm/pat/built-in.a
  CC      kernel/sched/stats.o
kernel/sched/fair.c:7790:7: error: ‘struct rq’ has no member named ‘idle_stamp’;
did you mean ‘idle_state’?
 7790 |   rq->idle_stamp = 0;
      |       ^~~~~~~~~~
      |       idle_state

This is because the definitions of the corresponding functions
and variables depend on the SMP configuration.
So add SMP to the dependencies of QOS_SCHED.
Signed-off-by: NXia Fukun <xiafukun@huawei.com>
Reviewed-by: NZhang Qiao <zhangqiao22@huawei.com>
Reviewed-by: Nzheng zucheng <zhengzucheng@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 866593ad
...@@ -968,6 +968,7 @@ config QOS_SCHED ...@@ -968,6 +968,7 @@ config QOS_SCHED
bool "Qos task scheduling" bool "Qos task scheduling"
depends on CGROUP_SCHED depends on CGROUP_SCHED
depends on CFS_BANDWIDTH depends on CFS_BANDWIDTH
depends on SMP
default n default n
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册