tree:
https://android.googlesource.com/kernel/common android12-5.10
head: fb03f7bef8ea486a56b0084619d87e1a11ccf53c
commit: c7ba09ce6aa54f9f851b8cf1a9a0b145d0f42f9e [3037/3047] ANDROID: sched/fair: Sync
task util for strf hook
config: i386-randconfig-s001-20210112 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout c7ba09ce6aa54f9f851b8cf1a9a0b145d0f42f9e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/sched/fair.c: In function 'select_task_rq_fair':
> kernel/sched/fair.c:6766:6: error: implicit declaration of
function 'trace_android_rvh_select_task_rq_fair_enabled'; did you mean
'trace_android_rvh_select_task_rq_fair'? [-Werror=implicit-function-declaration]
6766 | if (trace_android_rvh_select_task_rq_fair_enabled())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| trace_android_rvh_select_task_rq_fair
cc1: some warnings being treated as errors
vim +6766 kernel/sched/fair.c
6743
6744 /*
6745 * select_task_rq_fair: Select target runqueue for the waking task in domains
6746 * that have the 'sd_flag' flag set. In practice, this is SD_BALANCE_WAKE,
6747 * SD_BALANCE_FORK, or SD_BALANCE_EXEC.
6748 *
6749 * Balances load by selecting the idlest CPU in the idlest group, or under
6750 * certain conditions an idle sibling CPU if the domain has SD_WAKE_AFFINE set.
6751 *
6752 * Returns the target CPU number.
6753 *
6754 * preempt must be disabled.
6755 */
6756 static int
6757 select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int
wake_flags)
6758 {
6759 struct sched_domain *tmp, *sd = NULL;
6760 int cpu = smp_processor_id();
6761 int new_cpu = prev_cpu;
6762 int want_affine = 0;
6763 int sync = (wake_flags & WF_SYNC) && !(current->flags &
PF_EXITING);
6764 int target_cpu = -1;
6765
6766 if (trace_android_rvh_select_task_rq_fair_enabled())
6767 sync_entity_load_avg(&p->se);
6768 trace_android_rvh_select_task_rq_fair(p, prev_cpu, sd_flag,
6769 wake_flags, &target_cpu);
6770 if (target_cpu >= 0)
6771 return target_cpu;
6772
6773 if (sd_flag & SD_BALANCE_WAKE) {
6774 record_wakee(p);
6775
6776 if (sched_energy_enabled()) {
6777 new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync);
6778 if (new_cpu >= 0)
6779 return new_cpu;
6780 new_cpu = prev_cpu;
6781 }
6782
6783 want_affine = !wake_wide(p) && cpumask_test_cpu(cpu, p->cpus_ptr);
6784 }
6785
6786 rcu_read_lock();
6787 for_each_domain(cpu, tmp) {
6788 /*
6789 * If both 'cpu' and 'prev_cpu' are part of this domain,
6790 * cpu is a valid SD_WAKE_AFFINE target.
6791 */
6792 if (want_affine && (tmp->flags & SD_WAKE_AFFINE) &&
6793 cpumask_test_cpu(prev_cpu, sched_domain_span(tmp))) {
6794 if (cpu != prev_cpu)
6795 new_cpu = wake_affine(tmp, p, cpu, prev_cpu, sync);
6796
6797 sd = NULL; /* Prefer wake_affine over balance flags */
6798 break;
6799 }
6800
6801 if (tmp->flags & sd_flag)
6802 sd = tmp;
6803 else if (!want_affine)
6804 break;
6805 }
6806
6807 if (unlikely(sd)) {
6808 /* Slow path */
6809 new_cpu = find_idlest_cpu(sd, p, cpu, prev_cpu, sd_flag);
6810 } else if (sd_flag & SD_BALANCE_WAKE) { /* XXX always ? */
6811 /* Fast path */
6812
6813 new_cpu = select_idle_sibling(p, prev_cpu, new_cpu);
6814
6815 if (want_affine)
6816 current->recent_used_cpu = cpu;
6817 }
6818 rcu_read_unlock();
6819
6820 return new_cpu;
6821 }
6822
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org