• X
    init/Kconfig: Add SMP to the dependencies of QOS_SCHED · 0836c709
    Xia Fukun 提交于
    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>
    0836c709
Kconfig 78.6 KB