[mingo-tip:sched/headers 2346/2384] arch/mips/kernel/traps.c:2368:13: warning: no previous prototype for function 'trap_init'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: 24008668691ae54c991f8b1e65607d4065e14b7d [2346/2384] headers/deps: perf_event: Optimize <linux/perf_event_types.h> dependencies
config: mips-randconfig-c004-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170448.skJnFOLk-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c63a3175c2947e8c1a2d3bbe16a8586600705c54)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 24008668691ae54c991f8b1e65607d4065e14b7d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/alchemy/common/ arch/mips/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
asmlinkage void do_cpu(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1418:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_cpu(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:1523:17: warning: no previous prototype for function 'do_msa_fpe' [-Wmissing-prototypes]
asmlinkage void do_msa_fpe(struct pt_regs *regs, unsigned int msacsr)
^
arch/mips/kernel/traps.c:1523:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_msa_fpe(struct pt_regs *regs, unsigned int msacsr)
^
static
arch/mips/kernel/traps.c:1543:17: warning: no previous prototype for function 'do_msa' [-Wmissing-prototypes]
asmlinkage void do_msa(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1543:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_msa(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:1564:17: warning: no previous prototype for function 'do_mdmx' [-Wmissing-prototypes]
asmlinkage void do_mdmx(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1564:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_mdmx(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:1576:17: warning: no previous prototype for function 'do_watch' [-Wmissing-prototypes]
asmlinkage void do_watch(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1576:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_watch(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:1606:17: warning: variable 'prev_state' set but not used [-Wunused-but-set-variable]
enum ctx_state prev_state;
^
arch/mips/kernel/traps.c:1603:17: warning: no previous prototype for function 'do_mcheck' [-Wmissing-prototypes]
asmlinkage void do_mcheck(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1603:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_mcheck(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:1628:17: warning: no previous prototype for function 'do_mt' [-Wmissing-prototypes]
asmlinkage void do_mt(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1628:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_mt(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:1664:17: warning: no previous prototype for function 'do_dsp' [-Wmissing-prototypes]
asmlinkage void do_dsp(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1664:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_dsp(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:1672:17: warning: no previous prototype for function 'do_reserved' [-Wmissing-prototypes]
asmlinkage void do_reserved(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1672:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_reserved(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:1848:17: warning: no previous prototype for function 'cache_parity_error' [-Wmissing-prototypes]
asmlinkage void cache_parity_error(void)
^
arch/mips/kernel/traps.c:1848:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void cache_parity_error(void)
^
static
arch/mips/kernel/traps.c:1896:17: warning: no previous prototype for function 'do_ftlb' [-Wmissing-prototypes]
asmlinkage void do_ftlb(void)
^
arch/mips/kernel/traps.c:1896:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_ftlb(void)
^
static
arch/mips/kernel/traps.c:1925:17: warning: no previous prototype for function 'do_gsexc' [-Wmissing-prototypes]
asmlinkage void do_gsexc(struct pt_regs *regs, u32 diag1)
^
arch/mips/kernel/traps.c:1925:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_gsexc(struct pt_regs *regs, u32 diag1)
^
static
arch/mips/kernel/traps.c:1960:6: warning: no previous prototype for function 'ejtag_exception_handler' [-Wmissing-prototypes]
void ejtag_exception_handler(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:1960:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ejtag_exception_handler(struct pt_regs *regs)
^
static
arch/mips/kernel/traps.c:2005:17: warning: no previous prototype for function 'nmi_exception_handler' [-Wmissing-prototypes]
void __noreturn nmi_exception_handler(struct pt_regs *regs)
^
arch/mips/kernel/traps.c:2005:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __noreturn nmi_exception_handler(struct pt_regs *regs)
^
static
>> arch/mips/kernel/traps.c:2368:13: warning: no previous prototype for function 'trap_init' [-Wmissing-prototypes]
void __init trap_init(void)
^
arch/mips/kernel/traps.c:2368:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init trap_init(void)
^
static
22 warnings generated.
vim +/trap_init +2368 arch/mips/kernel/traps.c
5b10496b6e6577 Atsushi Nemoto 2006-09-11 2367
^1da177e4c3f41 Linus Torvalds 2005-04-16 @2368 void __init trap_init(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2369 {
2a0b24f56c2492 Steven J. Hill 2013-03-25 2370 extern char except_vec3_generic;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2371 extern char except_vec4;
2a0b24f56c2492 Steven J. Hill 2013-03-25 2372 extern char except_vec3_r4000;
172dcd935c34b0 Paul Burton 2019-04-30 2373 unsigned long i, vec_size;
172dcd935c34b0 Paul Burton 2019-04-30 2374 phys_addr_t ebase_pa;
c65a5480ff2919 Atsushi Nemoto 2007-11-12 2375
c65a5480ff2919 Atsushi Nemoto 2007-11-12 2376 check_wait();
^1da177e4c3f41 Linus Torvalds 2005-04-16 2377
172dcd935c34b0 Paul Burton 2019-04-30 2378 if (!cpu_has_mips_r2_r6) {
172dcd935c34b0 Paul Burton 2019-04-30 2379 ebase = CAC_BASE;
172dcd935c34b0 Paul Burton 2019-04-30 2380 vec_size = 0x400;
172dcd935c34b0 Paul Burton 2019-04-30 2381 } else {
172dcd935c34b0 Paul Burton 2019-04-30 2382 if (cpu_has_veic || cpu_has_vint)
172dcd935c34b0 Paul Burton 2019-04-30 2383 vec_size = 0x200 + VECTORSPACING*64;
172dcd935c34b0 Paul Burton 2019-04-30 2384 else
172dcd935c34b0 Paul Burton 2019-04-30 2385 vec_size = PAGE_SIZE;
172dcd935c34b0 Paul Burton 2019-04-30 2386
172dcd935c34b0 Paul Burton 2019-04-30 2387 ebase_pa = memblock_phys_alloc(vec_size, 1 << fls(vec_size));
f995adb0ac5bcf Paul Burton 2019-04-30 2388 if (!ebase_pa)
8a7f97b902f4fb Mike Rapoport 2019-03-11 2389 panic("%s: Failed to allocate %lu bytes align=0x%x\n",
172dcd935c34b0 Paul Burton 2019-04-30 2390 __func__, vec_size, 1 << fls(vec_size));
c195e079e9dd00 James Hogan 2016-09-01 2391
c195e079e9dd00 James Hogan 2016-09-01 2392 /*
c195e079e9dd00 James Hogan 2016-09-01 2393 * Try to ensure ebase resides in KSeg0 if possible.
c195e079e9dd00 James Hogan 2016-09-01 2394 *
c195e079e9dd00 James Hogan 2016-09-01 2395 * It shouldn't generally be in XKPhys on MIPS64 to avoid
c195e079e9dd00 James Hogan 2016-09-01 2396 * hitting a poorly defined exception base for Cache Errors.
c195e079e9dd00 James Hogan 2016-09-01 2397 * The allocation is likely to be in the low 512MB of physical,
c195e079e9dd00 James Hogan 2016-09-01 2398 * in which case we should be able to convert to KSeg0.
c195e079e9dd00 James Hogan 2016-09-01 2399 *
c195e079e9dd00 James Hogan 2016-09-01 2400 * EVA is special though as it allows segments to be rearranged
c195e079e9dd00 James Hogan 2016-09-01 2401 * and to become uncached during cache error handling.
c195e079e9dd00 James Hogan 2016-09-01 2402 */
c195e079e9dd00 James Hogan 2016-09-01 2403 if (!IS_ENABLED(CONFIG_EVA) && !WARN_ON(ebase_pa >= 0x20000000))
c195e079e9dd00 James Hogan 2016-09-01 2404 ebase = CKSEG0ADDR(ebase_pa);
f995adb0ac5bcf Paul Burton 2019-04-30 2405 else
f995adb0ac5bcf Paul Burton 2019-04-30 2406 ebase = (unsigned long)phys_to_virt(ebase_pa);
18022894eca131 James Hogan 2016-09-01 2407 }
e01402b115cccb Ralf Baechle 2005-07-14 2408
c6213c6c9c189a Steven J. Hill 2013-06-05 2409 if (cpu_has_mmips) {
c6213c6c9c189a Steven J. Hill 2013-06-05 2410 unsigned int config3 = read_c0_config3();
c6213c6c9c189a Steven J. Hill 2013-06-05 2411
c6213c6c9c189a Steven J. Hill 2013-06-05 2412 if (IS_ENABLED(CONFIG_CPU_MICROMIPS))
c6213c6c9c189a Steven J. Hill 2013-06-05 2413 write_c0_config3(config3 | MIPS_CONF3_ISA_OE);
c6213c6c9c189a Steven J. Hill 2013-06-05 2414 else
c6213c6c9c189a Steven J. Hill 2013-06-05 2415 write_c0_config3(config3 & ~MIPS_CONF3_ISA_OE);
c6213c6c9c189a Steven J. Hill 2013-06-05 2416 }
c6213c6c9c189a Steven J. Hill 2013-06-05 2417
6fb97effee5374 Kevin Cernekee 2011-11-16 2418 if (board_ebase_setup)
6fb97effee5374 Kevin Cernekee 2011-11-16 2419 board_ebase_setup();
6650df3c380e0d David Daney 2012-05-15 2420 per_cpu_trap_init(true);
25517ed4e99b3b Huacai Chen 2018-11-10 2421 memblock_set_bottom_up(false);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2422
^1da177e4c3f41 Linus Torvalds 2005-04-16 2423 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2424 * Copy the generic exception handlers to their final destination.
92a76f6d8545ef Adam Buchbinder 2016-02-25 2425 * This will be overridden later as suitable for a particular
^1da177e4c3f41 Linus Torvalds 2005-04-16 2426 * configuration.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2427 */
e01402b115cccb Ralf Baechle 2005-07-14 2428 set_handler(0x180, &except_vec3_generic, 0x80);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2429
^1da177e4c3f41 Linus Torvalds 2005-04-16 2430 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2431 * Setup default vectors
^1da177e4c3f41 Linus Torvalds 2005-04-16 2432 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2433 for (i = 0; i <= 31; i++)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2434 set_except_vector(i, handle_reserved);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2435
^1da177e4c3f41 Linus Torvalds 2005-04-16 2436 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2437 * Copy the EJTAG debug exception vector handler code to it's final
^1da177e4c3f41 Linus Torvalds 2005-04-16 2438 * destination.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2439 */
e01402b115cccb Ralf Baechle 2005-07-14 2440 if (cpu_has_ejtag && board_ejtag_handler_setup)
e01402b115cccb Ralf Baechle 2005-07-14 2441 board_ejtag_handler_setup();
^1da177e4c3f41 Linus Torvalds 2005-04-16 2442
^1da177e4c3f41 Linus Torvalds 2005-04-16 2443 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2444 * Only some CPUs have the watch exceptions.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2445 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2446 if (cpu_has_watch)
1b505defe05174 James Hogan 2015-12-16 2447 set_except_vector(EXCCODE_WATCH, handle_watch);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2448
^1da177e4c3f41 Linus Torvalds 2005-04-16 2449 /*
e01402b115cccb Ralf Baechle 2005-07-14 2450 * Initialise interrupt handlers
^1da177e4c3f41 Linus Torvalds 2005-04-16 2451 */
e01402b115cccb Ralf Baechle 2005-07-14 2452 if (cpu_has_veic || cpu_has_vint) {
e01402b115cccb Ralf Baechle 2005-07-14 2453 int nvec = cpu_has_veic ? 64 : 8;
e01402b115cccb Ralf Baechle 2005-07-14 2454 for (i = 0; i < nvec; i++)
e01402b115cccb Ralf Baechle 2005-07-14 2455 set_vi_handler(i, NULL);
e01402b115cccb Ralf Baechle 2005-07-14 2456 }
e01402b115cccb Ralf Baechle 2005-07-14 2457 else if (cpu_has_divec)
e01402b115cccb Ralf Baechle 2005-07-14 2458 set_handler(0x200, &except_vec4, 0x8);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2459
^1da177e4c3f41 Linus Torvalds 2005-04-16 2460 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2461 * Some CPUs can enable/disable for cache parity detection, but does
^1da177e4c3f41 Linus Torvalds 2005-04-16 2462 * it different ways.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2463 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2464 parity_protection_init();
^1da177e4c3f41 Linus Torvalds 2005-04-16 2465
^1da177e4c3f41 Linus Torvalds 2005-04-16 2466 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2467 * The Data Bus Errors / Instruction Bus Errors are signaled
^1da177e4c3f41 Linus Torvalds 2005-04-16 2468 * by external hardware. Therefore these two exceptions
^1da177e4c3f41 Linus Torvalds 2005-04-16 2469 * may have board specific handlers.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2470 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2471 if (board_be_init)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2472 board_be_init();
^1da177e4c3f41 Linus Torvalds 2005-04-16 2473
1b505defe05174 James Hogan 2015-12-16 2474 set_except_vector(EXCCODE_INT, using_rollback_handler() ?
1b505defe05174 James Hogan 2015-12-16 2475 rollback_handle_int : handle_int);
1b505defe05174 James Hogan 2015-12-16 2476 set_except_vector(EXCCODE_MOD, handle_tlbm);
1b505defe05174 James Hogan 2015-12-16 2477 set_except_vector(EXCCODE_TLBL, handle_tlbl);
1b505defe05174 James Hogan 2015-12-16 2478 set_except_vector(EXCCODE_TLBS, handle_tlbs);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2479
1b505defe05174 James Hogan 2015-12-16 2480 set_except_vector(EXCCODE_ADEL, handle_adel);
1b505defe05174 James Hogan 2015-12-16 2481 set_except_vector(EXCCODE_ADES, handle_ades);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2482
1b505defe05174 James Hogan 2015-12-16 2483 set_except_vector(EXCCODE_IBE, handle_ibe);
1b505defe05174 James Hogan 2015-12-16 2484 set_except_vector(EXCCODE_DBE, handle_dbe);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2485
1b505defe05174 James Hogan 2015-12-16 2486 set_except_vector(EXCCODE_SYS, handle_sys);
1b505defe05174 James Hogan 2015-12-16 2487 set_except_vector(EXCCODE_BP, handle_bp);
5a34133167dce3 Huacai Chen 2017-03-16 2488
5a34133167dce3 Huacai Chen 2017-03-16 2489 if (rdhwr_noopt)
5a34133167dce3 Huacai Chen 2017-03-16 2490 set_except_vector(EXCCODE_RI, handle_ri);
5a34133167dce3 Huacai Chen 2017-03-16 2491 else {
5a34133167dce3 Huacai Chen 2017-03-16 2492 if (cpu_has_vtag_icache)
5a34133167dce3 Huacai Chen 2017-03-16 2493 set_except_vector(EXCCODE_RI, handle_ri_rdhwr_tlbp);
268a2d60013049 Jiaxun Yang 2019-10-20 2494 else if (current_cpu_type() == CPU_LOONGSON64)
5a34133167dce3 Huacai Chen 2017-03-16 2495 set_except_vector(EXCCODE_RI, handle_ri_rdhwr_tlbp);
5a34133167dce3 Huacai Chen 2017-03-16 2496 else
5a34133167dce3 Huacai Chen 2017-03-16 2497 set_except_vector(EXCCODE_RI, handle_ri_rdhwr);
5a34133167dce3 Huacai Chen 2017-03-16 2498 }
5a34133167dce3 Huacai Chen 2017-03-16 2499
1b505defe05174 James Hogan 2015-12-16 2500 set_except_vector(EXCCODE_CPU, handle_cpu);
1b505defe05174 James Hogan 2015-12-16 2501 set_except_vector(EXCCODE_OV, handle_ov);
1b505defe05174 James Hogan 2015-12-16 2502 set_except_vector(EXCCODE_TR, handle_tr);
1b505defe05174 James Hogan 2015-12-16 2503 set_except_vector(EXCCODE_MSAFPE, handle_msa_fpe);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2504
e01402b115cccb Ralf Baechle 2005-07-14 2505 if (board_nmi_handler_setup)
e01402b115cccb Ralf Baechle 2005-07-14 2506 board_nmi_handler_setup();
e01402b115cccb Ralf Baechle 2005-07-14 2507
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2508 if (cpu_has_fpu && !cpu_has_nofpuex)
1b505defe05174 James Hogan 2015-12-16 2509 set_except_vector(EXCCODE_FPE, handle_fpe);
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2510
efd1b4ad3d5178 WANG Xuerui 2020-07-29 2511 if (cpu_has_ftlbparex)
1b505defe05174 James Hogan 2015-12-16 2512 set_except_vector(MIPS_EXCCODE_TLBPAR, handle_ftlb);
5890f70f15c52d Leonid Yegoshin 2014-07-15 2513
bc6e8dc112133a WANG Xuerui 2020-07-29 2514 if (cpu_has_gsexcex)
bc6e8dc112133a WANG Xuerui 2020-07-29 2515 set_except_vector(LOONGSON_EXCCODE_GSEXC, handle_gsexc);
bc6e8dc112133a WANG Xuerui 2020-07-29 2516
5890f70f15c52d Leonid Yegoshin 2014-07-15 2517 if (cpu_has_rixiex) {
1b505defe05174 James Hogan 2015-12-16 2518 set_except_vector(EXCCODE_TLBRI, tlb_do_page_fault_0);
1b505defe05174 James Hogan 2015-12-16 2519 set_except_vector(EXCCODE_TLBXI, tlb_do_page_fault_0);
5890f70f15c52d Leonid Yegoshin 2014-07-15 2520 }
5890f70f15c52d Leonid Yegoshin 2014-07-15 2521
1b505defe05174 James Hogan 2015-12-16 2522 set_except_vector(EXCCODE_MSADIS, handle_msa);
1b505defe05174 James Hogan 2015-12-16 2523 set_except_vector(EXCCODE_MDMX, handle_mdmx);
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2524
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2525 if (cpu_has_mcheck)
1b505defe05174 James Hogan 2015-12-16 2526 set_except_vector(EXCCODE_MCHECK, handle_mcheck);
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2527
340ee4b98c0543 Ralf Baechle 2005-08-17 2528 if (cpu_has_mipsmt)
1b505defe05174 James Hogan 2015-12-16 2529 set_except_vector(EXCCODE_THREAD, handle_mt);
340ee4b98c0543 Ralf Baechle 2005-08-17 2530
1b505defe05174 James Hogan 2015-12-16 2531 set_except_vector(EXCCODE_DSPDIS, handle_dsp);
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2532
fcbf1dfde3da72 David Daney 2012-05-15 2533 if (board_cache_error_setup)
fcbf1dfde3da72 David Daney 2012-05-15 2534 board_cache_error_setup();
fcbf1dfde3da72 David Daney 2012-05-15 2535
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2536 if (cpu_has_vce)
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2537 /* Special exception: R4[04]00 uses also the divec space. */
2a0b24f56c2492 Steven J. Hill 2013-03-25 2538 set_handler(0x180, &except_vec3_r4000, 0x100);
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2539 else if (cpu_has_4kex)
2a0b24f56c2492 Steven J. Hill 2013-03-25 2540 set_handler(0x180, &except_vec3_generic, 0x80);
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2541 else
2a0b24f56c2492 Steven J. Hill 2013-03-25 2542 set_handler(0x080, &except_vec3_generic, 0x80);
e50c0a8fa60da9 Ralf Baechle 2005-05-31 2543
783454e2bc7ce4 Paul Burton 2019-04-30 2544 local_flush_icache_range(ebase, ebase + vec_size);
0510617b85758b Thomas Bogendoerfer 2008-08-04 2545
0510617b85758b Thomas Bogendoerfer 2008-08-04 2546 sort_extable(__start___dbe_table, __stop___dbe_table);
69f3a7de1f1ec9 Ralf Baechle 2009-11-24 2547
4483b159168d3d Ralf Baechle 2010-08-05 2548 cu2_notifier(default_cu2_call, 0x80000000); /* Run last */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2549 }
ae4ce45419f908 James Hogan 2014-03-04 2550
:::::: The code at line 2368 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
include/linux/seq_file.h:262:9: warning: 'strncpy' output may be truncated copying 4 bytes from a string of length 4
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 79e06c4c4950be2abd8ca5d2428a8c915aa62c24
commit: dd03762ab608e058c8f390ad9cf667e490089796 arm64: Enable KCSAN
date: 5 weeks ago
config: arm64-buildonly-randconfig-r001-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170456.6rWV7FEz-lk...)
compiler: aarch64-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout dd03762ab608e058c8f390ad9cf667e490089796
# 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=arm64 SHELL=/bin/bash drivers/char/ipmi/ drivers/pci/controller/ fs/ocfs2/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/seq_file_net.h:5,
from include/net/net_namespace.h:181,
from include/linux/inet.h:42,
from fs/ocfs2/super.c:21:
fs/ocfs2/super.c: In function 'ocfs2_show_options':
>> include/linux/seq_file.h:262:9: warning: 'strncpy' output may be truncated copying 4 bytes from a string of length 4 [-Wstringop-truncation]
262 | strncpy(val_buf, value, length); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ocfs2/super.c:1539:17: note: in expansion of macro 'seq_show_option_n'
1539 | seq_show_option_n(s, "cluster_stack", osb->osb_cluster_stack,
| ^~~~~~~~~~~~~~~~~
--
drivers/char/ipmi/ipmi_msghandler.c: In function 'send_panic_events':
>> drivers/char/ipmi/ipmi_msghandler.c:5283:17: warning: 'strncpy' specified bound 11 equals destination size [-Wstringop-truncation]
5283 | strncpy(data+5, p, 11);
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +262 include/linux/seq_file.h
a068acf2ee77693 Kees Cook 2015-09-04 248
a068acf2ee77693 Kees Cook 2015-09-04 249 /**
a068acf2ee77693 Kees Cook 2015-09-04 250 * seq_show_option_n - display mount options with appropriate escapes
a068acf2ee77693 Kees Cook 2015-09-04 251 * where @value must be a specific length.
a068acf2ee77693 Kees Cook 2015-09-04 252 * @m: the seq_file handle
a068acf2ee77693 Kees Cook 2015-09-04 253 * @name: the mount option name
a068acf2ee77693 Kees Cook 2015-09-04 254 * @value: the mount option name's value, cannot be NULL
a068acf2ee77693 Kees Cook 2015-09-04 255 * @length: the length of @value to display
a068acf2ee77693 Kees Cook 2015-09-04 256 *
a068acf2ee77693 Kees Cook 2015-09-04 257 * This is a macro since this uses "length" to define the size of the
a068acf2ee77693 Kees Cook 2015-09-04 258 * stack buffer.
a068acf2ee77693 Kees Cook 2015-09-04 259 */
a068acf2ee77693 Kees Cook 2015-09-04 260 #define seq_show_option_n(m, name, value, length) { \
a068acf2ee77693 Kees Cook 2015-09-04 261 char val_buf[length + 1]; \
a068acf2ee77693 Kees Cook 2015-09-04 @262 strncpy(val_buf, value, length); \
a068acf2ee77693 Kees Cook 2015-09-04 263 val_buf[length] = '\0'; \
a068acf2ee77693 Kees Cook 2015-09-04 264 seq_show_option(m, name, val_buf); \
a068acf2ee77693 Kees Cook 2015-09-04 265 }
a068acf2ee77693 Kees Cook 2015-09-04 266
:::::: The code at line 262 was first introduced by commit
:::::: a068acf2ee77693e0bf39d6e07139ba704f461c3 fs: create and use seq_show_option for escaping
:::::: TO: Kees Cook <keescook(a)chromium.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months
Re: [PATCH 2/2] PCI: rcar: Return all Fs from read which triggered an exception
by kernel test robot
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on next-20220116]
[cannot apply to v5.16]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/marek-vasut-gmail-com/PCI-rcar-F...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm-randconfig-c002-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170230.U9LeY58M-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c63a3175c2947e8c1a2d3bbe16a8586600705c54)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/f784bebf4a058d633fc77579892309b12...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review marek-vasut-gmail-com/PCI-rcar-Finish-transition-to-L1-state-in-rcar_pcie_config_access/20220116-102631
git checkout f784bebf4a058d633fc77579892309b12dd33edb
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/pci/controller/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/pcie-rcar-host.c:109:6: warning: no previous prototype for function 'rcar_pci_write_reg_workaround' [-Wmissing-prototypes]
void rcar_pci_write_reg_workaround(struct rcar_pcie *pcie, u32 val, unsigned int reg)
^
drivers/pci/controller/pcie-rcar-host.c:109:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void rcar_pci_write_reg_workaround(struct rcar_pcie *pcie, u32 val, unsigned int reg)
^
static
>> drivers/pci/controller/pcie-rcar-host.c:121:5: warning: no previous prototype for function 'rcar_pci_read_reg_workaround' [-Wmissing-prototypes]
u32 rcar_pci_read_reg_workaround(struct rcar_pcie *pcie, unsigned int reg)
^
drivers/pci/controller/pcie-rcar-host.c:121:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u32 rcar_pci_read_reg_workaround(struct rcar_pcie *pcie, unsigned int reg)
^
static
drivers/pci/controller/pcie-rcar-host.c:114:4: error: instruction requires: data-barriers
" isb\n"
^
<inline asm>:2:2: note: instantiated into assembly here
isb
^
drivers/pci/controller/pcie-rcar-host.c:129:4: error: instruction requires: data-barriers
" isb\n"
^
<inline asm>:3:2: note: instantiated into assembly here
isb
^
drivers/pci/controller/pcie-rcar-host.c:114:4: error: instruction requires: data-barriers
" isb\n"
^
<inline asm>:2:2: note: instantiated into assembly here
isb
^
drivers/pci/controller/pcie-rcar-host.c:127:3: error: symbol 'rcar_pci_read_reg_workaround_start' is already defined
"rcar_pci_read_reg_workaround_start:\n"
^
<inline asm>:1:2: note: instantiated into assembly here
rcar_pci_read_reg_workaround_start:
^
drivers/pci/controller/pcie-rcar-host.c:129:4: error: instruction requires: data-barriers
" isb\n"
^
<inline asm>:3:2: note: instantiated into assembly here
isb
^
2 warnings and 5 errors generated.
vim +/rcar_pci_write_reg_workaround +109 drivers/pci/controller/pcie-rcar-host.c
108
> 109 void rcar_pci_write_reg_workaround(struct rcar_pcie *pcie, u32 val, unsigned int reg)
110 {
111 #ifdef CONFIG_ARM
112 asm volatile(
113 " str %0, [%1]\n"
114 " isb\n"
115 ::"r"(val), "r"(pcie->base + reg):"memory");
116 #else
117 rcar_pci_write_reg(pcie, val, reg);
118 #endif
119 }
120
> 121 u32 rcar_pci_read_reg_workaround(struct rcar_pcie *pcie, unsigned int reg)
122 {
123 #ifdef CONFIG_ARM
124 u32 val;
125
126 asm volatile(
127 "rcar_pci_read_reg_workaround_start:\n"
128 "1: ldr %0, [%1]\n"
129 " isb\n"
130 : "=r"(val):"r"(pcie->base + reg):"memory");
131
132 return val;
133 #else
134 return rcar_pci_read_reg(pcie, reg);
135 #endif
136 }
137
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
Re: [PATCH 1/2] PCI: rcar: Finish transition to L1 state in rcar_pcie_config_access()
by kernel test robot
Hi,
I love your patch! Yet something to improve:
[auto build test ERROR on helgaas-pci/next]
[also build test ERROR on next-20220116]
[cannot apply to v5.16]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/marek-vasut-gmail-com/PCI-rcar-F...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: powerpc-randconfig-r004-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170208.glCZ5BJW-lk...)
compiler: powerpc-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/0day-ci/linux/commit/dff324f279a78c9ca7f04c3fcf603b40d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review marek-vasut-gmail-com/PCI-rcar-Finish-transition-to-L1-state-in-rcar_pcie_config_access/20220116-102631
git checkout dff324f279a78c9ca7f04c3fcf603b40d5a893fa
# 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=powerpc SHELL=/bin/bash drivers/pci/controller/
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/rwsem.h:15,
from include/linux/notifier.h:15,
from include/linux/clk.h:14,
from drivers/pci/controller/pcie-rcar-host.c:15:
drivers/pci/controller/pcie-rcar-host.c: In function 'rcar_pcie_config_access':
>> drivers/pci/controller/pcie-rcar-host.c:120:28: error: 'pmsr_lock' undeclared (first use in this function); did you mean 'pmd_lock'?
120 | spin_lock_irqsave(&pmsr_lock, flags);
| ^~~~~~~~~
include/linux/spinlock.h:242:48: note: in definition of macro 'raw_spin_lock_irqsave'
242 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
drivers/pci/controller/pcie-rcar-host.c:120:9: note: in expansion of macro 'spin_lock_irqsave'
120 | spin_lock_irqsave(&pmsr_lock, flags);
| ^~~~~~~~~~~~~~~~~
drivers/pci/controller/pcie-rcar-host.c:120:28: note: each undeclared identifier is reported only once for each function it appears in
120 | spin_lock_irqsave(&pmsr_lock, flags);
| ^~~~~~~~~
include/linux/spinlock.h:242:48: note: in definition of macro 'raw_spin_lock_irqsave'
242 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
drivers/pci/controller/pcie-rcar-host.c:120:9: note: in expansion of macro 'spin_lock_irqsave'
120 | spin_lock_irqsave(&pmsr_lock, flags);
| ^~~~~~~~~~~~~~~~~
>> drivers/pci/controller/pcie-rcar-host.c:121:15: error: implicit declaration of function 'rcar_pcie_wakeup' [-Werror=implicit-function-declaration]
121 | ret = rcar_pcie_wakeup(pcie->dev, pcie->base);
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +120 drivers/pci/controller/pcie-rcar-host.c
> 15 #include <linux/clk.h>
16 #include <linux/clk-provider.h>
17 #include <linux/delay.h>
18 #include <linux/interrupt.h>
19 #include <linux/irq.h>
20 #include <linux/irqdomain.h>
21 #include <linux/kernel.h>
22 #include <linux/init.h>
23 #include <linux/iopoll.h>
24 #include <linux/msi.h>
25 #include <linux/of_address.h>
26 #include <linux/of_irq.h>
27 #include <linux/of_platform.h>
28 #include <linux/pci.h>
29 #include <linux/phy/phy.h>
30 #include <linux/platform_device.h>
31 #include <linux/pm_runtime.h>
32
33 #include "pcie-rcar.h"
34
35 struct rcar_msi {
36 DECLARE_BITMAP(used, INT_PCI_MSI_NR);
37 struct irq_domain *domain;
38 struct mutex map_lock;
39 spinlock_t mask_lock;
40 int irq1;
41 int irq2;
42 };
43
44 #ifdef CONFIG_ARM
45 /*
46 * Here we keep a static copy of the remapped PCIe controller address.
47 * This is only used on aarch32 systems, all of which have one single
48 * PCIe controller, to provide quick access to the PCIe controller in
49 * the L1 link state fixup function, called from the ARM fault handler.
50 */
51 static void __iomem *pcie_base;
52 /*
53 * Static copy of PCIe device pointer, so we can check whether the
54 * device is runtime suspended or not.
55 */
56 static struct device *pcie_dev;
57
58 static DEFINE_SPINLOCK(pmsr_lock);
59 static int rcar_pcie_wakeup(struct device *pcie_dev, void __iomem *pcie_base)
60 {
61 u32 pmsr, val;
62 int ret = 0;
63
64 if (!pcie_base || pm_runtime_suspended(pcie_dev))
65 return 1;
66
67 pmsr = readl(pcie_base + PMSR);
68
69 /*
70 * Test if the PCIe controller received PM_ENTER_L1 DLLP and
71 * the PCIe controller is not in L1 link state. If true, apply
72 * fix, which will put the controller into L1 link state, from
73 * which it can return to L0s/L0 on its own.
74 */
75 if ((pmsr & PMEL1RX) && ((pmsr & PMSTATE) != PMSTATE_L1)) {
76 writel(L1IATN, pcie_base + PMCTLR);
77 ret = readl_poll_timeout_atomic(pcie_base + PMSR, val,
78 val & L1FAEG, 10, 1000);
79 WARN(ret, "Timeout waiting for L1 link state, ret=%d\n", ret);
80 writel(L1FAEG | PMEL1RX, pcie_base + PMSR);
81 }
82
83 return ret;
84 }
85 #endif
86
87 /* Structure representing the PCIe interface */
88 struct rcar_pcie_host {
89 struct rcar_pcie pcie;
90 struct phy *phy;
91 struct clk *bus_clk;
92 struct rcar_msi msi;
93 int (*phy_init_fn)(struct rcar_pcie_host *host);
94 };
95
96 static struct rcar_pcie_host *msi_to_host(struct rcar_msi *msi)
97 {
98 return container_of(msi, struct rcar_pcie_host, msi);
99 }
100
101 static u32 rcar_read_conf(struct rcar_pcie *pcie, int where)
102 {
103 unsigned int shift = BITS_PER_BYTE * (where & 3);
104 u32 val = rcar_pci_read_reg(pcie, where & ~3);
105
106 return val >> shift;
107 }
108
109 /* Serialization is provided by 'pci_lock' in drivers/pci/access.c */
110 static int rcar_pcie_config_access(struct rcar_pcie_host *host,
111 unsigned char access_type, struct pci_bus *bus,
112 unsigned int devfn, int where, u32 *data)
113 {
114 struct rcar_pcie *pcie = &host->pcie;
115 unsigned int dev, func, reg, index;
116 unsigned long flags;
117 int ret;
118
119 /* Wake the bus up in case it is in L1 state. */
> 120 spin_lock_irqsave(&pmsr_lock, flags);
> 121 ret = rcar_pcie_wakeup(pcie->dev, pcie->base);
122 spin_unlock_irqrestore(&pmsr_lock, flags);
123 if (ret)
124 return ret;
125
126 dev = PCI_SLOT(devfn);
127 func = PCI_FUNC(devfn);
128 reg = where & ~3;
129 index = reg / 4;
130
131 /*
132 * While each channel has its own memory-mapped extended config
133 * space, it's generally only accessible when in endpoint mode.
134 * When in root complex mode, the controller is unable to target
135 * itself with either type 0 or type 1 accesses, and indeed, any
136 * controller initiated target transfer to its own config space
137 * result in a completer abort.
138 *
139 * Each channel effectively only supports a single device, but as
140 * the same channel <-> device access works for any PCI_SLOT()
141 * value, we cheat a bit here and bind the controller's config
142 * space to devfn 0 in order to enable self-enumeration. In this
143 * case the regular ECAR/ECDR path is sidelined and the mangled
144 * config access itself is initiated as an internal bus transaction.
145 */
146 if (pci_is_root_bus(bus)) {
147 if (dev != 0)
148 return PCIBIOS_DEVICE_NOT_FOUND;
149
150 if (access_type == RCAR_PCI_ACCESS_READ)
151 *data = rcar_pci_read_reg(pcie, PCICONF(index));
152 else
153 rcar_pci_write_reg(pcie, *data, PCICONF(index));
154
155 return PCIBIOS_SUCCESSFUL;
156 }
157
158 /* Clear errors */
159 rcar_pci_write_reg(pcie, rcar_pci_read_reg(pcie, PCIEERRFR), PCIEERRFR);
160
161 /* Set the PIO address */
162 rcar_pci_write_reg(pcie, PCIE_CONF_BUS(bus->number) |
163 PCIE_CONF_DEV(dev) | PCIE_CONF_FUNC(func) | reg, PCIECAR);
164
165 /* Enable the configuration access */
166 if (pci_is_root_bus(bus->parent))
167 rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE0, PCIECCTLR);
168 else
169 rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE1, PCIECCTLR);
170
171 /* Check for errors */
172 if (rcar_pci_read_reg(pcie, PCIEERRFR) & UNSUPPORTED_REQUEST)
173 return PCIBIOS_DEVICE_NOT_FOUND;
174
175 /* Check for master and target aborts */
176 if (rcar_read_conf(pcie, RCONF(PCI_STATUS)) &
177 (PCI_STATUS_REC_MASTER_ABORT | PCI_STATUS_REC_TARGET_ABORT))
178 return PCIBIOS_DEVICE_NOT_FOUND;
179
180 if (access_type == RCAR_PCI_ACCESS_READ)
181 *data = rcar_pci_read_reg(pcie, PCIECDR);
182 else
183 rcar_pci_write_reg(pcie, *data, PCIECDR);
184
185 /* Disable the configuration access */
186 rcar_pci_write_reg(pcie, 0, PCIECCTLR);
187
188 return PCIBIOS_SUCCESSFUL;
189 }
190
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
Re: [PATCH 2/2] PCI: rcar: Return all Fs from read which triggered an exception
by kernel test robot
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on next-20220116]
[cannot apply to v5.16]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/marek-vasut-gmail-com/PCI-rcar-F...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm-randconfig-c002-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170248.g8zqyL3O-lk...)
compiler: arm-linux-gnueabi-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/0day-ci/linux/commit/f784bebf4a058d633fc77579892309b12...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review marek-vasut-gmail-com/PCI-rcar-Finish-transition-to-L1-state-in-rcar_pcie_config_access/20220116-102631
git checkout f784bebf4a058d633fc77579892309b12dd33edb
# 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=arm SHELL=/bin/bash drivers/pci/controller/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/pcie-rcar-host.c:109:6: warning: no previous prototype for 'rcar_pci_write_reg_workaround' [-Wmissing-prototypes]
109 | void rcar_pci_write_reg_workaround(struct rcar_pcie *pcie, u32 val, unsigned int reg)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/controller/pcie-rcar-host.c:121:5: warning: no previous prototype for 'rcar_pci_read_reg_workaround' [-Wmissing-prototypes]
121 | u32 rcar_pci_read_reg_workaround(struct rcar_pcie *pcie, unsigned int reg)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/cc0JJaba.s: Assembler messages:
/tmp/cc0JJaba.s:1425: Error: selected processor does not support `isb' in ARM mode
/tmp/cc0JJaba.s:1486: Error: selected processor does not support `isb' in ARM mode
/tmp/cc0JJaba.s:2594: Error: selected processor does not support `isb' in ARM mode
/tmp/cc0JJaba.s:2622: Error: symbol `rcar_pci_read_reg_workaround_start' is already defined
/tmp/cc0JJaba.s:2624: Error: selected processor does not support `isb' in ARM mode
vim +/rcar_pci_write_reg_workaround +109 drivers/pci/controller/pcie-rcar-host.c
108
> 109 void rcar_pci_write_reg_workaround(struct rcar_pcie *pcie, u32 val, unsigned int reg)
110 {
111 #ifdef CONFIG_ARM
112 asm volatile(
113 " str %0, [%1]\n"
114 " isb\n"
115 ::"r"(val), "r"(pcie->base + reg):"memory");
116 #else
117 rcar_pci_write_reg(pcie, val, reg);
118 #endif
119 }
120
> 121 u32 rcar_pci_read_reg_workaround(struct rcar_pcie *pcie, unsigned int reg)
122 {
123 #ifdef CONFIG_ARM
124 u32 val;
125
126 asm volatile(
127 "rcar_pci_read_reg_workaround_start:\n"
128 "1: ldr %0, [%1]\n"
129 " isb\n"
130 : "=r"(val):"r"(pcie->base + reg):"memory");
131
132 return val;
133 #else
134 return rcar_pci_read_reg(pcie, reg);
135 #endif
136 }
137
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4d66020dcef83314092f2c8c89152a8d122627e2
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date: 3 months ago
config: arm-randconfig-s031-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170148.vIvPQRko-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block
vim +210 arch/arm/mach-ep93xx/clock.c
205
206 static int ep93xx_mux_determine_rate(struct clk_hw *hw,
207 struct clk_rate_request *req)
208 {
209 unsigned long rate = req->rate;
> 210 struct clk *best_parent = 0;
211 unsigned long __parent_rate;
212 unsigned long best_rate = 0, actual_rate, mclk_rate;
213 unsigned long best_parent_rate;
214 int __div = 0, __pdiv = 0;
215 int i;
216
217 /*
218 * Try the two pll's and the external clock
219 * Because the valid predividers are 2, 2.5 and 3, we multiply
220 * all the clocks by 2 to avoid floating point math.
221 *
222 * This is based on the algorithm in the ep93xx raster guide:
223 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
224 *
225 */
226 for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
227 struct clk *parent = clk_get_sys(mux_parents[i], NULL);
228
229 __parent_rate = clk_get_rate(parent);
230 mclk_rate = __parent_rate * 2;
231
232 /* Try each predivider value */
233 for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
234 __div = mclk_rate / (rate * __pdiv);
235 if (__div < 2 || __div > 127)
236 continue;
237
238 actual_rate = mclk_rate / (__pdiv * __div);
239 if (is_best(rate, actual_rate, best_rate)) {
240 best_rate = actual_rate;
241 best_parent_rate = __parent_rate;
242 best_parent = parent;
243 }
244 }
245 }
246
247 if (!best_parent)
248 return -EINVAL;
249
250 req->best_parent_rate = best_parent_rate;
251 req->best_parent_hw = __clk_get_hw(best_parent);
252 req->rate = best_rate;
253
254 return 0;
255 }
256
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week