mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gregory CLEMENT <gregory.clement@bootlin.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: kernel/cpu.c:2681:9: error: call to undeclared function 'cpu_down_maps_locked'; ISO C99 and later do not support implicit function declarations
Date: Mon, 27 Oct 2025 01:23:21 +0800	[thread overview]
Message-ID: <202510270120.21wA1aX1-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   72761a7e31225971d0b29d9195e0ffa986b77867
commit: 76c43eb507bc1162850fdae6cc44790d1c9a83ea MIPS: SMP: Implement parallel CPU bring up for EyeQ
date:   6 months ago
config: mips-randconfig-r122-20251026 (https://download.01.org/0day-ci/archive/20251027/202510270120.21wA1aX1-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project e1ae12640102fd2b05bc567243580f90acb1135f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251027/202510270120.21wA1aX1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510270120.21wA1aX1-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/cpu.c:2681:9: error: call to undeclared function 'cpu_down_maps_locked'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2681 |                 ret = cpu_down_maps_locked(cpu, CPUHP_OFFLINE);
         |                       ^
   1 error generated.


vim +/cpu_down_maps_locked +2681 kernel/cpu.c

dc8d37ed304eee Arnd Bergmann    2019-12-10  2666  
dc8d37ed304eee Arnd Bergmann    2019-12-10  2667  int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval)
dc8d37ed304eee Arnd Bergmann    2019-12-10  2668  {
dc8d37ed304eee Arnd Bergmann    2019-12-10  2669  	int cpu, ret = 0;
dc8d37ed304eee Arnd Bergmann    2019-12-10  2670  
dc8d37ed304eee Arnd Bergmann    2019-12-10  2671  	cpu_maps_update_begin();
dc8d37ed304eee Arnd Bergmann    2019-12-10  2672  	for_each_online_cpu(cpu) {
dc8d37ed304eee Arnd Bergmann    2019-12-10  2673  		if (topology_is_primary_thread(cpu))
dc8d37ed304eee Arnd Bergmann    2019-12-10  2674  			continue;
38253464bc821d Michael Ellerman 2023-07-05  2675  		/*
38253464bc821d Michael Ellerman 2023-07-05  2676  		 * Disable can be called with CPU_SMT_ENABLED when changing
38253464bc821d Michael Ellerman 2023-07-05  2677  		 * from a higher to lower number of SMT threads per core.
38253464bc821d Michael Ellerman 2023-07-05  2678  		 */
38253464bc821d Michael Ellerman 2023-07-05  2679  		if (ctrlval == CPU_SMT_ENABLED && cpu_smt_thread_allowed(cpu))
38253464bc821d Michael Ellerman 2023-07-05  2680  			continue;
dc8d37ed304eee Arnd Bergmann    2019-12-10 @2681  		ret = cpu_down_maps_locked(cpu, CPUHP_OFFLINE);
dc8d37ed304eee Arnd Bergmann    2019-12-10  2682  		if (ret)
dc8d37ed304eee Arnd Bergmann    2019-12-10  2683  			break;
dc8d37ed304eee Arnd Bergmann    2019-12-10  2684  		/*
dc8d37ed304eee Arnd Bergmann    2019-12-10  2685  		 * As this needs to hold the cpu maps lock it's impossible
dc8d37ed304eee Arnd Bergmann    2019-12-10  2686  		 * to call device_offline() because that ends up calling
dc8d37ed304eee Arnd Bergmann    2019-12-10  2687  		 * cpu_down() which takes cpu maps lock. cpu maps lock
dc8d37ed304eee Arnd Bergmann    2019-12-10  2688  		 * needs to be held as this might race against in kernel
dc8d37ed304eee Arnd Bergmann    2019-12-10  2689  		 * abusers of the hotplug machinery (thermal management).
dc8d37ed304eee Arnd Bergmann    2019-12-10  2690  		 *
dc8d37ed304eee Arnd Bergmann    2019-12-10  2691  		 * So nothing would update device:offline state. That would
dc8d37ed304eee Arnd Bergmann    2019-12-10  2692  		 * leave the sysfs entry stale and prevent onlining after
dc8d37ed304eee Arnd Bergmann    2019-12-10  2693  		 * smt control has been changed to 'off' again. This is
dc8d37ed304eee Arnd Bergmann    2019-12-10  2694  		 * called under the sysfs hotplug lock, so it is properly
dc8d37ed304eee Arnd Bergmann    2019-12-10  2695  		 * serialized against the regular offline usage.
dc8d37ed304eee Arnd Bergmann    2019-12-10  2696  		 */
dc8d37ed304eee Arnd Bergmann    2019-12-10  2697  		cpuhp_offline_cpu_device(cpu);
dc8d37ed304eee Arnd Bergmann    2019-12-10  2698  	}
dc8d37ed304eee Arnd Bergmann    2019-12-10  2699  	if (!ret)
dc8d37ed304eee Arnd Bergmann    2019-12-10  2700  		cpu_smt_control = ctrlval;
dc8d37ed304eee Arnd Bergmann    2019-12-10  2701  	cpu_maps_update_done();
dc8d37ed304eee Arnd Bergmann    2019-12-10  2702  	return ret;
dc8d37ed304eee Arnd Bergmann    2019-12-10  2703  }
dc8d37ed304eee Arnd Bergmann    2019-12-10  2704  

:::::: The code at line 2681 was first introduced by commit
:::::: dc8d37ed304eeeea47e65fb9edc1c6c8b0093386 cpu/SMT: Fix x86 link error without CONFIG_SYSFS

:::::: TO: Arnd Bergmann <arnd@arndb.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-10-26 17:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202510270120.21wA1aX1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®