Hi Jindong,
First bad commit (maybe != root cause):
tree:
https://github.com/Freescale/linux-fslc pr/521
head: e1200a7e26459892adfac6cb313bd8458b21fa95
commit: 5c690f143dd1d4a1c4fcbd013ee3d7d8388e1e6b [1977/9999] MA-17911 soc: imx: Allow
IMX8M_BUSFREQ to be loadable as module
config: m68k-allmodconfig
(
https://download.01.org/0day-ci/archive/20220115/202201151028.FVJ5Rjlo-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/Freescale/linux-fslc/commit/5c690f143dd1d4a1c4fcbd013e...
git remote add freescale-fslc
https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/521
git checkout 5c690f143dd1d4a1c4fcbd013ee3d7d8388e1e6b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=m68k SHELL=/bin/bash
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 >>):
In file included from include/linux/init.h:5,
from include/linux/arm-smccc.h:8,
from drivers/soc/imx/busfreq-imx8mq.c:15:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:50: warning: ordered comparison of pointer with
null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET
&& (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:17: note: in expansion of macro
'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/soc/imx/busfreq-imx8mq.c: At top level:
> drivers/soc/imx/busfreq-imx8mq.c:304:6: error: redefinition of
'request_bus_freq'
304 | void request_bus_freq(enum bus_freq_mode
mode)
| ^~~~~~~~~~~~~~~~
In file included from drivers/soc/imx/busfreq-imx8mq.c:16:
include/linux/busfreq-imx.h:58:20: note: previous definition of
'request_bus_freq' with type 'void(enum bus_freq_mode)'
58 | static inline void request_bus_freq(enum bus_freq_mode mode)
| ^~~~~~~~~~~~~~~~
> drivers/soc/imx/busfreq-imx8mq.c:340:6: error: redefinition of
'release_bus_freq'
340 | void release_bus_freq(enum bus_freq_mode
mode)
| ^~~~~~~~~~~~~~~~
In file included from drivers/soc/imx/busfreq-imx8mq.c:16:
include/linux/busfreq-imx.h:61:20: note: previous definition of
'release_bus_freq' with type 'void(enum bus_freq_mode)'
61 | static inline void release_bus_freq(enum bus_freq_mode mode)
| ^~~~~~~~~~~~~~~~
> drivers/soc/imx/busfreq-imx8mq.c:393:5: error: redefinition of
'get_bus_freq_mode'
393 | int get_bus_freq_mode(void)
| ^~~~~~~~~~~~~~~~~
In file included from drivers/soc/imx/busfreq-imx8mq.c:16:
include/linux/busfreq-imx.h:72:19: note: previous definition of
'get_bus_freq_mode' with type 'int(void)'
72 | static inline int get_bus_freq_mode(void)
| ^~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
vim +/request_bus_freq +304 drivers/soc/imx/busfreq-imx8mq.c
43e127d4a2ffa1 Bai Ping 2017-10-30 303
43e127d4a2ffa1 Bai Ping 2017-10-30 @304 void request_bus_freq(enum bus_freq_mode mode)
43e127d4a2ffa1 Bai Ping 2017-10-30 305 {
43e127d4a2ffa1 Bai Ping 2017-10-30 306 mutex_lock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 307
43e127d4a2ffa1 Bai Ping 2017-10-30 308 if (mode == BUS_FREQ_HIGH)
43e127d4a2ffa1 Bai Ping 2017-10-30 309 high_bus_count++;
43e127d4a2ffa1 Bai Ping 2017-10-30 310 else if (mode == BUS_FREQ_AUDIO)
43e127d4a2ffa1 Bai Ping 2017-10-30 311 audio_bus_count++;
43e127d4a2ffa1 Bai Ping 2017-10-30 312 else if (mode == BUS_FREQ_LOW)
43e127d4a2ffa1 Bai Ping 2017-10-30 313 low_bus_count++;
43e127d4a2ffa1 Bai Ping 2017-10-30 314
43e127d4a2ffa1 Bai Ping 2017-10-30 315 if (busfreq_suspended ||
!bus_freq_scaling_initialized ||
43e127d4a2ffa1 Bai Ping 2017-10-30 316 !bus_freq_scaling_is_active) {
43e127d4a2ffa1 Bai Ping 2017-10-30 317 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 318 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 319 }
43e127d4a2ffa1 Bai Ping 2017-10-30 320
43e127d4a2ffa1 Bai Ping 2017-10-30 321 cancel_low_bus_freq_handler();
43e127d4a2ffa1 Bai Ping 2017-10-30 322
43e127d4a2ffa1 Bai Ping 2017-10-30 323 if ((mode == BUS_FREQ_HIGH) &&
(!high_bus_freq_mode)) {
43e127d4a2ffa1 Bai Ping 2017-10-30 324 set_high_bus_freq(1);
43e127d4a2ffa1 Bai Ping 2017-10-30 325 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 326 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 327 }
43e127d4a2ffa1 Bai Ping 2017-10-30 328
43e127d4a2ffa1 Bai Ping 2017-10-30 329 if ((mode == BUS_FREQ_AUDIO) &&
(!high_bus_freq_mode) &&
43e127d4a2ffa1 Bai Ping 2017-10-30 330 (!audio_bus_freq_mode)) {
43e127d4a2ffa1 Bai Ping 2017-10-30 331 set_low_bus_freq();
43e127d4a2ffa1 Bai Ping 2017-10-30 332 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 333 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 334 }
43e127d4a2ffa1 Bai Ping 2017-10-30 335
43e127d4a2ffa1 Bai Ping 2017-10-30 336 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 337 }
43e127d4a2ffa1 Bai Ping 2017-10-30 338 EXPORT_SYMBOL(request_bus_freq);
43e127d4a2ffa1 Bai Ping 2017-10-30 339
43e127d4a2ffa1 Bai Ping 2017-10-30 @340 void release_bus_freq(enum bus_freq_mode mode)
43e127d4a2ffa1 Bai Ping 2017-10-30 341 {
43e127d4a2ffa1 Bai Ping 2017-10-30 342 mutex_lock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 343 if (mode == BUS_FREQ_HIGH) {
43e127d4a2ffa1 Bai Ping 2017-10-30 344 if (high_bus_count == 0) {
43e127d4a2ffa1 Bai Ping 2017-10-30 345 dev_err(busfreq_dev, "high bus count
mismatch!\n");
43e127d4a2ffa1 Bai Ping 2017-10-30 346 dump_stack();
43e127d4a2ffa1 Bai Ping 2017-10-30 347 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 348 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 349 }
43e127d4a2ffa1 Bai Ping 2017-10-30 350 high_bus_count--;
43e127d4a2ffa1 Bai Ping 2017-10-30 351 } else if (mode == BUS_FREQ_AUDIO) {
43e127d4a2ffa1 Bai Ping 2017-10-30 352 if (audio_bus_count == 0) {
43e127d4a2ffa1 Bai Ping 2017-10-30 353 dev_err(busfreq_dev, "audio bus count
mismatch!\n");
43e127d4a2ffa1 Bai Ping 2017-10-30 354 dump_stack();
43e127d4a2ffa1 Bai Ping 2017-10-30 355 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 356 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 357 }
43e127d4a2ffa1 Bai Ping 2017-10-30 358 audio_bus_count--;
43e127d4a2ffa1 Bai Ping 2017-10-30 359 } else if (mode == BUS_FREQ_LOW) {
43e127d4a2ffa1 Bai Ping 2017-10-30 360 if (low_bus_count == 0) {
43e127d4a2ffa1 Bai Ping 2017-10-30 361 dev_err(busfreq_dev, "low bus count
mismatch!\n");
43e127d4a2ffa1 Bai Ping 2017-10-30 362 dump_stack();
43e127d4a2ffa1 Bai Ping 2017-10-30 363 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 364 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 365 }
43e127d4a2ffa1 Bai Ping 2017-10-30 366 low_bus_count--;
43e127d4a2ffa1 Bai Ping 2017-10-30 367 }
43e127d4a2ffa1 Bai Ping 2017-10-30 368
43e127d4a2ffa1 Bai Ping 2017-10-30 369 if (busfreq_suspended ||
!bus_freq_scaling_initialized ||
43e127d4a2ffa1 Bai Ping 2017-10-30 370 !bus_freq_scaling_is_active) {
43e127d4a2ffa1 Bai Ping 2017-10-30 371 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 372 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 373 }
43e127d4a2ffa1 Bai Ping 2017-10-30 374
43e127d4a2ffa1 Bai Ping 2017-10-30 375 if ((!audio_bus_freq_mode) &&
(high_bus_count == 0) &&
43e127d4a2ffa1 Bai Ping 2017-10-30 376 (audio_bus_count != 0)) {
43e127d4a2ffa1 Bai Ping 2017-10-30 377 set_low_bus_freq();
43e127d4a2ffa1 Bai Ping 2017-10-30 378 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 379 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 380 }
43e127d4a2ffa1 Bai Ping 2017-10-30 381
43e127d4a2ffa1 Bai Ping 2017-10-30 382 if ((!low_bus_freq_mode) &&
(high_bus_count == 0) &&
43e127d4a2ffa1 Bai Ping 2017-10-30 383 (audio_bus_count == 0)) {
43e127d4a2ffa1 Bai Ping 2017-10-30 384 set_low_bus_freq();
43e127d4a2ffa1 Bai Ping 2017-10-30 385 mutex_unlock(&bus_freq_mutex);
0e73ee47110db0 Bai Ping 2018-01-08 386 return;
43e127d4a2ffa1 Bai Ping 2017-10-30 387 }
43e127d4a2ffa1 Bai Ping 2017-10-30 388
43e127d4a2ffa1 Bai Ping 2017-10-30 389 mutex_unlock(&bus_freq_mutex);
43e127d4a2ffa1 Bai Ping 2017-10-30 390 }
43e127d4a2ffa1 Bai Ping 2017-10-30 391 EXPORT_SYMBOL(release_bus_freq);
43e127d4a2ffa1 Bai Ping 2017-10-30 392
43e127d4a2ffa1 Bai Ping 2017-10-30 @393 int get_bus_freq_mode(void)
43e127d4a2ffa1 Bai Ping 2017-10-30 394 {
43e127d4a2ffa1 Bai Ping 2017-10-30 395 return cur_bus_freq_mode;
43e127d4a2ffa1 Bai Ping 2017-10-30 396 }
43e127d4a2ffa1 Bai Ping 2017-10-30 397 EXPORT_SYMBOL(get_bus_freq_mode);
43e127d4a2ffa1 Bai Ping 2017-10-30 398
:::::: The code at line 304 was first introduced by commit
:::::: 43e127d4a2ffa1fdad45da32c320035719feff90 MLK-16689-03 driver: soc: Add busfreq
driver for imx8mq
:::::: TO: Bai Ping <ping.bai(a)nxp.com>
:::::: CC: Dong Aisheng <aisheng.dong(a)nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org