Re: [PATCH 06/25] mm/arm64: Use mm_fault_accounting()
by kernel test robot
Hi Peter,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on sparc/master]
[cannot apply to mmotm/master sparc-next/master linus/master linux/master v5.8-rc1 next-20200616]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Peter-Xu/mm-Page-fault-accountin...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git master
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>, old ones prefixed by <<):
arch/arm64/mm/fault.c: In function 'do_page_fault':
>> arch/arm64/mm/fault.c:538:38: error: 'address' undeclared (first use in this function); did you mean 'addr'?
538 | mm_fault_accounting(current, regs, address, major);
| ^~~~~~~
| addr
arch/arm64/mm/fault.c:538:38: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/mm/fault.c: At top level:
arch/arm64/mm/fault.c:725:6: warning: no previous prototype for 'do_el0_irq_bp_hardening' [-Wmissing-prototypes]
725 | void do_el0_irq_bp_hardening(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +538 arch/arm64/mm/fault.c
441
442 static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
443 struct pt_regs *regs)
444 {
445 const struct fault_info *inf;
446 struct mm_struct *mm = current->mm;
447 vm_fault_t fault, major = 0;
448 unsigned long vm_flags = VM_ACCESS_FLAGS;
449 unsigned int mm_flags = FAULT_FLAG_DEFAULT;
450
451 if (kprobe_page_fault(regs, esr))
452 return 0;
453
454 /*
455 * If we're in an interrupt or have no user context, we must not take
456 * the fault.
457 */
458 if (faulthandler_disabled() || !mm)
459 goto no_context;
460
461 if (user_mode(regs))
462 mm_flags |= FAULT_FLAG_USER;
463
464 if (is_el0_instruction_abort(esr)) {
465 vm_flags = VM_EXEC;
466 mm_flags |= FAULT_FLAG_INSTRUCTION;
467 } else if (is_write_abort(esr)) {
468 vm_flags = VM_WRITE;
469 mm_flags |= FAULT_FLAG_WRITE;
470 }
471
472 if (is_ttbr0_addr(addr) && is_el1_permission_fault(addr, esr, regs)) {
473 /* regs->orig_addr_limit may be 0 if we entered from EL0 */
474 if (regs->orig_addr_limit == KERNEL_DS)
475 die_kernel_fault("access to user memory with fs=KERNEL_DS",
476 addr, esr, regs);
477
478 if (is_el1_instruction_abort(esr))
479 die_kernel_fault("execution of user memory",
480 addr, esr, regs);
481
482 if (!search_exception_tables(regs->pc))
483 die_kernel_fault("access to user memory outside uaccess routines",
484 addr, esr, regs);
485 }
486
487 /*
488 * As per x86, we may deadlock here. However, since the kernel only
489 * validly references user space from well defined areas of the code,
490 * we can bug out early if this is from code which shouldn't.
491 */
492 if (!down_read_trylock(&mm->mmap_sem)) {
493 if (!user_mode(regs) && !search_exception_tables(regs->pc))
494 goto no_context;
495 retry:
496 down_read(&mm->mmap_sem);
497 } else {
498 /*
499 * The above down_read_trylock() might have succeeded in which
500 * case, we'll have missed the might_sleep() from down_read().
501 */
502 might_sleep();
503 #ifdef CONFIG_DEBUG_VM
504 if (!user_mode(regs) && !search_exception_tables(regs->pc)) {
505 up_read(&mm->mmap_sem);
506 goto no_context;
507 }
508 #endif
509 }
510
511 fault = __do_page_fault(mm, addr, mm_flags, vm_flags);
512 major |= fault & VM_FAULT_MAJOR;
513
514 /* Quick path to respond to signals */
515 if (fault_signal_pending(fault, regs)) {
516 if (!user_mode(regs))
517 goto no_context;
518 return 0;
519 }
520
521 if (fault & VM_FAULT_RETRY) {
522 if (mm_flags & FAULT_FLAG_ALLOW_RETRY) {
523 mm_flags |= FAULT_FLAG_TRIED;
524 goto retry;
525 }
526 }
527 up_read(&mm->mmap_sem);
528
529 /*
530 * Handle the "normal" (no error) case first.
531 */
532 if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP |
533 VM_FAULT_BADACCESS)))) {
534 /*
535 * Major/minor page fault accounting is only done
536 * once.
537 */
> 538 mm_fault_accounting(current, regs, address, major);
539 return 0;
540 }
541
542 /*
543 * If we are in kernel mode at this point, we have no context to
544 * handle this fault with.
545 */
546 if (!user_mode(regs))
547 goto no_context;
548
549 if (fault & VM_FAULT_OOM) {
550 /*
551 * We ran out of memory, call the OOM killer, and return to
552 * userspace (which will retry the fault, or kill us if we got
553 * oom-killed).
554 */
555 pagefault_out_of_memory();
556 return 0;
557 }
558
559 inf = esr_to_fault_info(esr);
560 set_thread_esr(addr, esr);
561 if (fault & VM_FAULT_SIGBUS) {
562 /*
563 * We had some memory, but were unable to successfully fix up
564 * this page fault.
565 */
566 arm64_force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)addr,
567 inf->name);
568 } else if (fault & (VM_FAULT_HWPOISON_LARGE | VM_FAULT_HWPOISON)) {
569 unsigned int lsb;
570
571 lsb = PAGE_SHIFT;
572 if (fault & VM_FAULT_HWPOISON_LARGE)
573 lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault));
574
575 arm64_force_sig_mceerr(BUS_MCEERR_AR, (void __user *)addr, lsb,
576 inf->name);
577 } else {
578 /*
579 * Something tried to access memory that isn't in our memory
580 * map.
581 */
582 arm64_force_sig_fault(SIGSEGV,
583 fault == VM_FAULT_BADACCESS ? SEGV_ACCERR : SEGV_MAPERR,
584 (void __user *)addr,
585 inf->name);
586 }
587
588 return 0;
589
590 no_context:
591 __do_kernel_fault(addr, esr, regs);
592 return 0;
593 }
594
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[ath6kl:ath11k-qca6390-bringup 67/67] drivers/net/wireless/ath/ath11k/pci.c:362:6: warning: no previous prototype for function 'ath11k_pci_soc_global_reset'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath11k-qca6390-bringup
head: 682bd79bb8fe637b426947462daa7bdf155b198a
commit: 682bd79bb8fe637b426947462daa7bdf155b198a [67/67] ath11k: reset MHI during power down and power up
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 682bd79bb8fe637b426947462daa7bdf155b198a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>, old ones prefixed by <<):
>> drivers/net/wireless/ath/ath11k/pci.c:362:6: warning: no previous prototype for function 'ath11k_pci_soc_global_reset' [-Wmissing-prototypes]
void ath11k_pci_soc_global_reset(struct ath11k_base *ab)
^
drivers/net/wireless/ath/ath11k/pci.c:362:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ath11k_pci_soc_global_reset(struct ath11k_base *ab)
^
static
>> drivers/net/wireless/ath/ath11k/pci.c:389:6: warning: no previous prototype for function 'ath11k_pci_clear_dbg_registers' [-Wmissing-prototypes]
void ath11k_pci_clear_dbg_registers(struct ath11k_base *ab)
^
drivers/net/wireless/ath/ath11k/pci.c:389:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ath11k_pci_clear_dbg_registers(struct ath11k_base *ab)
^
static
>> drivers/net/wireless/ath/ath11k/pci.c:419:6: warning: no previous prototype for function 'ath11k_pci_force_wake' [-Wmissing-prototypes]
void ath11k_pci_force_wake(struct ath11k_base *ab)
^
drivers/net/wireless/ath/ath11k/pci.c:419:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ath11k_pci_force_wake(struct ath11k_base *ab)
^
static
>> drivers/net/wireless/ath/ath11k/pci.c:425:6: warning: no previous prototype for function 'ath11k_pci_force_wake_release' [-Wmissing-prototypes]
void ath11k_pci_force_wake_release(struct ath11k_base *ab)
^
drivers/net/wireless/ath/ath11k/pci.c:425:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ath11k_pci_force_wake_release(struct ath11k_base *ab)
^
static
>> drivers/net/wireless/ath/ath11k/pci.c:431:6: warning: no previous prototype for function 'ath11k_pci_sw_reset' [-Wmissing-prototypes]
void ath11k_pci_sw_reset(struct ath11k_base *ab)
^
drivers/net/wireless/ath/ath11k/pci.c:431:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ath11k_pci_sw_reset(struct ath11k_base *ab)
^
static
5 warnings generated.
vim +/ath11k_pci_soc_global_reset +362 drivers/net/wireless/ath/ath11k/pci.c
361
> 362 void ath11k_pci_soc_global_reset(struct ath11k_base *ab)
363 {
364 u32 val;
365 u32 delay;
366
367 val = ath11k_pci_read32(ab, PCIE_SOC_GLOBAL_RESET);
368
369 val |= PCIE_SOC_GLOBAL_RESET_V;
370
371 ath11k_pci_write32(ab, PCIE_SOC_GLOBAL_RESET, val);
372
373 /* TODO: exact time to sleep is uncertain */
374 delay = 10;
375 mdelay(delay);
376
377 /* Need to toggle V bit back otherwise stuck in reset status */
378 val &= ~PCIE_SOC_GLOBAL_RESET_V;
379
380 ath11k_pci_write32(ab, PCIE_SOC_GLOBAL_RESET, val);
381
382 mdelay(delay);
383
384 val = ath11k_pci_read32(ab, PCIE_SOC_GLOBAL_RESET);
385 if (val == 0xffffffff)
386 ath11k_err(ab, "%s link down error\n", __func__);
387 }
388
> 389 void ath11k_pci_clear_dbg_registers(struct ath11k_base *ab)
390 {
391 u32 val;
392
393 /* read cookie */
394 val = ath11k_pci_read32(ab, PCIE_Q6_COOKIE_ADDR);
395 ath11k_dbg(ab, ATH11K_DBG_PCI, "cookie:0x%x\n", val);
396
397 val = ath11k_pci_read32(ab, WLAON_WARM_SW_ENTRY);
398 ath11k_dbg(ab, ATH11K_DBG_PCI, "WLAON_WARM_SW_ENTRY 0x%x\n", val);
399
400 /* TODO: exact time to sleep is uncertain */
401 mdelay(10);
402
403 /* write 0 to WLAON_WARM_SW_ENTRY to prevent Q6 from
404 * continuing warm path and entering dead loop.
405 */
406 ath11k_pci_write32(ab, WLAON_WARM_SW_ENTRY, 0);
407 mdelay(10);
408
409 val = ath11k_pci_read32(ab, WLAON_WARM_SW_ENTRY);
410 ath11k_dbg(ab, ATH11K_DBG_PCI, "WLAON_WARM_SW_ENTRY 0x%x\n", val);
411
412 /* A read clear register. clear the register to prevent
413 * Q6 from entering wrong code path.
414 */
415 val = ath11k_pci_read32(ab, WLAON_SOC_RESET_CAUSE_REG);
416 ath11k_dbg(ab, ATH11K_DBG_PCI, "soc reset cause:%d\n", val);
417 }
418
> 419 void ath11k_pci_force_wake(struct ath11k_base *ab)
420 {
421 ath11k_pci_write32(ab, PCIE_SOC_WAKE_PCIE_LOCAL_REG, 1);
422 mdelay(5);
423 }
424
> 425 void ath11k_pci_force_wake_release(struct ath11k_base *ab)
426 {
427 ath11k_pci_write32(ab, PCIE_SOC_WAKE_PCIE_LOCAL_REG, 0);
428 mdelay(5);
429 }
430
> 431 void ath11k_pci_sw_reset(struct ath11k_base *ab)
432 {
433 ath11k_pci_soc_global_reset(ab);
434 ath11k_mhi_clear_vector(ab);
435 ath11k_pci_soc_global_reset(ab);
436 ath11k_mhi_set_mhictrl_reset(ab);
437 ath11k_pci_clear_dbg_registers(ab);
438 }
439
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[ath6kl:ath11k-qca6390-bringup 67/67] drivers/net/wireless/ath/ath11k/pci.c:362:6: warning: no previous prototype for 'ath11k_pci_soc_global_reset'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath11k-qca6390-bringup
head: 682bd79bb8fe637b426947462daa7bdf155b198a
commit: 682bd79bb8fe637b426947462daa7bdf155b198a [67/67] ath11k: reset MHI during power down and power up
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 682bd79bb8fe637b426947462daa7bdf155b198a
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>, old ones prefixed by <<):
>> drivers/net/wireless/ath/ath11k/pci.c:362:6: warning: no previous prototype for 'ath11k_pci_soc_global_reset' [-Wmissing-prototypes]
362 | void ath11k_pci_soc_global_reset(struct ath11k_base *ab)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath11k/pci.c:389:6: warning: no previous prototype for 'ath11k_pci_clear_dbg_registers' [-Wmissing-prototypes]
389 | void ath11k_pci_clear_dbg_registers(struct ath11k_base *ab)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath11k/pci.c:419:6: warning: no previous prototype for 'ath11k_pci_force_wake' [-Wmissing-prototypes]
419 | void ath11k_pci_force_wake(struct ath11k_base *ab)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath11k/pci.c:425:6: warning: no previous prototype for 'ath11k_pci_force_wake_release' [-Wmissing-prototypes]
425 | void ath11k_pci_force_wake_release(struct ath11k_base *ab)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath11k/pci.c:431:6: warning: no previous prototype for 'ath11k_pci_sw_reset' [-Wmissing-prototypes]
431 | void ath11k_pci_sw_reset(struct ath11k_base *ab)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/pci.c: In function 'ath11k_pci_start':
>> drivers/net/wireless/ath/ath11k/pci.c:1078:21: warning: variable 'ar_pci' set but not used [-Wunused-but-set-variable]
1078 | struct ath11k_pci *ar_pci;
| ^~~~~~
vim +/ath11k_pci_soc_global_reset +362 drivers/net/wireless/ath/ath11k/pci.c
361
> 362 void ath11k_pci_soc_global_reset(struct ath11k_base *ab)
363 {
364 u32 val;
365 u32 delay;
366
367 val = ath11k_pci_read32(ab, PCIE_SOC_GLOBAL_RESET);
368
369 val |= PCIE_SOC_GLOBAL_RESET_V;
370
371 ath11k_pci_write32(ab, PCIE_SOC_GLOBAL_RESET, val);
372
373 /* TODO: exact time to sleep is uncertain */
374 delay = 10;
375 mdelay(delay);
376
377 /* Need to toggle V bit back otherwise stuck in reset status */
378 val &= ~PCIE_SOC_GLOBAL_RESET_V;
379
380 ath11k_pci_write32(ab, PCIE_SOC_GLOBAL_RESET, val);
381
382 mdelay(delay);
383
384 val = ath11k_pci_read32(ab, PCIE_SOC_GLOBAL_RESET);
385 if (val == 0xffffffff)
386 ath11k_err(ab, "%s link down error\n", __func__);
387 }
388
> 389 void ath11k_pci_clear_dbg_registers(struct ath11k_base *ab)
390 {
391 u32 val;
392
393 /* read cookie */
394 val = ath11k_pci_read32(ab, PCIE_Q6_COOKIE_ADDR);
395 ath11k_dbg(ab, ATH11K_DBG_PCI, "cookie:0x%x\n", val);
396
397 val = ath11k_pci_read32(ab, WLAON_WARM_SW_ENTRY);
398 ath11k_dbg(ab, ATH11K_DBG_PCI, "WLAON_WARM_SW_ENTRY 0x%x\n", val);
399
400 /* TODO: exact time to sleep is uncertain */
401 mdelay(10);
402
403 /* write 0 to WLAON_WARM_SW_ENTRY to prevent Q6 from
404 * continuing warm path and entering dead loop.
405 */
406 ath11k_pci_write32(ab, WLAON_WARM_SW_ENTRY, 0);
407 mdelay(10);
408
409 val = ath11k_pci_read32(ab, WLAON_WARM_SW_ENTRY);
410 ath11k_dbg(ab, ATH11K_DBG_PCI, "WLAON_WARM_SW_ENTRY 0x%x\n", val);
411
412 /* A read clear register. clear the register to prevent
413 * Q6 from entering wrong code path.
414 */
415 val = ath11k_pci_read32(ab, WLAON_SOC_RESET_CAUSE_REG);
416 ath11k_dbg(ab, ATH11K_DBG_PCI, "soc reset cause:%d\n", val);
417 }
418
> 419 void ath11k_pci_force_wake(struct ath11k_base *ab)
420 {
421 ath11k_pci_write32(ab, PCIE_SOC_WAKE_PCIE_LOCAL_REG, 1);
422 mdelay(5);
423 }
424
> 425 void ath11k_pci_force_wake_release(struct ath11k_base *ab)
426 {
427 ath11k_pci_write32(ab, PCIE_SOC_WAKE_PCIE_LOCAL_REG, 0);
428 mdelay(5);
429 }
430
> 431 void ath11k_pci_sw_reset(struct ath11k_base *ab)
432 {
433 ath11k_pci_soc_global_reset(ab);
434 ath11k_mhi_clear_vector(ab);
435 ath11k_pci_soc_global_reset(ab);
436 ath11k_mhi_set_mhictrl_reset(ab);
437 ath11k_pci_clear_dbg_registers(ab);
438 }
439
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[chrome-os:chromeos-4.19 56/59] kernel/sched/core.c:7117:46: error: 'struct task_struct' has no member named 'sched_task_group'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 45baa007ba13bc516470dbd9379b2f7525a087e1
commit: 33b634a147c282f733336dfe39d8b7c4bf11509a [56/59] CHROMIUM: sched: Add a per-thread core scheduling interface
config: x86_64-randconfig-s022-20200615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-3-g55607964-dirty
git checkout 33b634a147c282f733336dfe39d8b7c4bf11509a
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>, old ones prefixed by <<):
kernel/sched/core.c:313:6: sparse: sparse: symbol 'sched_core_get' was not declared. Should it be static?
kernel/sched/core.c:321:6: sparse: sparse: symbol 'sched_core_put' was not declared. Should it be static?
kernel/sched/core.c:911:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:911:9: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/core.c:911:9: sparse: struct sched_domain *
kernel/sched/core.c:1980:6: sparse: sparse: symbol 'sched_set_stop_task' was not declared. Should it be static?
kernel/sched/core.c:2039:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:2039:17: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/core.c:2039:17: sparse: struct sched_domain *
kernel/sched/core.c:2227:27: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:2227:27: sparse: struct task_struct [noderef] <asn:4> *
kernel/sched/core.c:2227:27: sparse: struct task_struct *
kernel/sched/core.c:4193:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:4193:9: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/core.c:4193:9: sparse: struct sched_domain *
kernel/sched/core.c:7117:60: sparse: sparse: no member 'sched_task_group' in struct task_struct
kernel/sched/core.c:5875:28: sparse: sparse: context imbalance in '__cond_resched_lock' - unexpected unlock
kernel/sched/core.c:313:6: warning: no previous prototype for 'sched_core_get' [-Wmissing-prototypes]
313 | void sched_core_get(void)
| ^~~~~~~~~~~~~~
kernel/sched/core.c:321:6: warning: no previous prototype for 'sched_core_put' [-Wmissing-prototypes]
321 | void sched_core_put(void)
| ^~~~~~~~~~~~~~
kernel/sched/core.c:1980:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
1980 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:4577:35: warning: no previous prototype for 'preempt_schedule_irq' [-Wmissing-prototypes]
4577 | asmlinkage __visible void __sched preempt_schedule_irq(void)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c: In function 'sched_init':
kernel/sched/core.c:6835:32: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
6835 | unsigned long alloc_size = 0, ptr;
| ^~~
kernel/sched/core.c: In function 'task_set_core_sched':
>> kernel/sched/core.c:7117:46: error: 'struct task_struct' has no member named 'sched_task_group'
7117 | (tsk->core_cookie == (unsigned long)tsk->sched_task_group)) {
| ^~
--
kernel/sched/core.c:313:6: warning: no previous prototype for 'sched_core_get' [-Wmissing-prototypes]
313 | void sched_core_get(void)
| ^~~~~~~~~~~~~~
kernel/sched/core.c:321:6: warning: no previous prototype for 'sched_core_put' [-Wmissing-prototypes]
321 | void sched_core_put(void)
| ^~~~~~~~~~~~~~
kernel/sched/core.c:1980:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
1980 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:4577:35: warning: no previous prototype for 'preempt_schedule_irq' [-Wmissing-prototypes]
4577 | asmlinkage __visible void __sched preempt_schedule_irq(void)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c: In function 'sched_init':
kernel/sched/core.c:6835:32: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
6835 | unsigned long alloc_size = 0, ptr;
| ^~~
kernel/sched/core.c: In function 'task_set_core_sched':
>> kernel/sched/core.c:7117:46: error: 'struct task_struct' has no member named 'sched_task_group'
7117 | (tsk->core_cookie == (unsigned long)tsk->sched_task_group)) {
| ^~
vim +7117 kernel/sched/core.c
7090
7091 int task_set_core_sched(int set, struct task_struct *tsk)
7092 {
7093 if (!tsk)
7094 tsk = current;
7095
7096 // if (!capable(CAP_SYS_ADMIN))
7097 // return -EPERM;
7098
7099 if (set > 1)
7100 return -ERANGE;
7101
7102 if (!static_branch_likely(&sched_smt_present))
7103 return -EINVAL;
7104
7105 /*
7106 * If cookie was set previously, return -EBUSY if either of the
7107 * following are true:
7108 * 1. Task was previously tagged by CGroup method.
7109 * 2. Task or its parent were tagged by prctl().
7110 *
7111 * Note that, if CGroup tagging is done after prctl(), then that would
7112 * override the cookie. However, if prctl() is done after task was
7113 * added to tagged CGroup, then the prctl() returns -EBUSY.
7114 */
7115 if (!!tsk->core_cookie == set) {
7116 if ((tsk->core_cookie == (unsigned long)tsk) ||
> 7117 (tsk->core_cookie == (unsigned long)tsk->sched_task_group)) {
7118 return -EBUSY;
7119 }
7120 }
7121
7122 if (set)
7123 sched_core_get();
7124
7125 tsk->core_cookie = set ? (unsigned long)tsk : 0;
7126
7127 stop_machine(task_set_core_sched_stopper, NULL, NULL);
7128
7129 if (!set)
7130 sched_core_put();
7131
7132 pr_alert("coresched: prctl success: %s/%d %lx (fork: %d)\n", tsk->comm,
7133 tsk->pid, tsk->core_cookie, tsk != current);
7134 return 0;
7135 }
7136 #endif
7137
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[chrome-os:chromeos-4.19 8/59] /tmp/indirect-654573.s:210: Error: bad expression
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 45baa007ba13bc516470dbd9379b2f7525a087e1
commit: ce635702ec34d2266381ec68a9b79a1956a4b10c [8/59] Revert "CHROMIUM: bluetooth/sco - Keep HCI SCO packet header in transparent mode"
config: s390-randconfig-r006-20200615 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390-linux-gnu
git checkout ce635702ec34d2266381ec68a9b79a1956a4b10c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the chrome-os/chromeos-4.19 HEAD 45baa007ba13bc516470dbd9379b2f7525a087e1 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/bio.h:28:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:499:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | ^
In file included from fs/ext4/indirect.c:24:
In file included from fs/ext4/ext4_jbd2.h:17:
In file included from fs/ext4/ext4.h:21:
In file included from include/linux/blkdev.h:21:
In file included from include/linux/bio.h:28:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:499:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | ^
In file included from fs/ext4/indirect.c:24:
In file included from fs/ext4/ext4_jbd2.h:17:
In file included from fs/ext4/ext4.h:21:
In file included from include/linux/blkdev.h:21:
In file included from include/linux/bio.h:28:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:499:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from fs/ext4/indirect.c:24:
In file included from fs/ext4/ext4_jbd2.h:17:
In file included from fs/ext4/ext4.h:21:
In file included from include/linux/blkdev.h:21:
In file included from include/linux/bio.h:28:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:499:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from fs/ext4/indirect.c:24:
In file included from fs/ext4/ext4_jbd2.h:17:
In file included from fs/ext4/ext4.h:21:
In file included from include/linux/blkdev.h:21:
In file included from include/linux/bio.h:28:
In file included from arch/s390/include/asm/io.h:79:
include/asm-generic/io.h:510:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:520:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:530:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:592:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:600:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:608:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:626:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:635:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
32 warnings generated.
/tmp/indirect-654573.s: Assembler messages:
>> /tmp/indirect-654573.s:210: Error: bad expression
>> /tmp/indirect-654573.s:210: Error: junk at end of line, first unrecognized character is `r'
/tmp/indirect-654573.s:1596: Error: bad expression
/tmp/indirect-654573.s:1596: Error: junk at end of line, first unrecognized character is `r'
clang-11: error: assembler command failed with exit code 1 (use -v to see invocation)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[peterz-queue:x86/static_call 11/18] check.c:524:32: error: passing argument 1 of 'elf_rebuild_reloc_section' from incompatible pointer type
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/static_call
head: 9d17d094385c304e7cc17d2a28d727ee58fa15a7
commit: ff27410577751bfe88e2ec99fbf53b44a10b2832 [11/18] x86/static_call: Add inline static call implementation for x86-64
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout ff27410577751bfe88e2ec99fbf53b44a10b2832
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>, old ones prefixed by <<):
check.c: In function 'create_static_call_sections':
>> check.c:524:32: error: passing argument 1 of 'elf_rebuild_reloc_section' from incompatible pointer type [-Werror=incompatible-pointer-types]
524 | if (elf_rebuild_reloc_section(reloc_sec))
| ^~~~~~~~~
| |
| struct section *
In file included from objtool.h:13,
from arch.h:11,
from check.c:11:
elf.h:143:43: note: expected 'struct elf *' but argument is of type 'struct section *'
143 | int elf_rebuild_reloc_section(struct elf *elf, struct section *sec);
| ~~~~~~~~~~~~^~~
>> check.c:524:6: error: too few arguments to function 'elf_rebuild_reloc_section'
524 | if (elf_rebuild_reloc_section(reloc_sec))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from objtool.h:13,
from arch.h:11,
from check.c:11:
elf.h:143:5: note: declared here
143 | int elf_rebuild_reloc_section(struct elf *elf, struct section *sec);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.check.o.tmp': No such file or directory
make[4]: *** [tools/build/Makefile.build:96: tools/objtool/check.o] Error 1
make[4]: Target '__build' not remade because of errors.
make[3]: *** [Makefile:64: tools/objtool/objtool-in.o] Error 2
make[3]: Target 'all' not remade because of errors.
make[2]: *** [Makefile:68: objtool] Error 2
make[1]: *** [Makefile:1866: tools/objtool] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[chrome-os:chromeos-4.19 52/59] kernel/sched/fair.c:505:9: error: 'struct sched_entity' has no member named 'my_q'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 45baa007ba13bc516470dbd9379b2f7525a087e1
commit: 1727d28632e4f124f314bc19ad4f40ec183fe60e [52/59] FROMLIST: sched/fair: core wide vruntime comparison
config: x86_64-randconfig-s022-20200615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-3-g55607964-dirty
git checkout 1727d28632e4f124f314bc19ad4f40ec183fe60e
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>, old ones prefixed by <<):
kernel/sched/fair.c:10095:9: sparse: struct sched_domain *
kernel/sched/fair.c:10173:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10173:9: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10173:9: sparse: struct sched_domain *
kernel/sched/fair.c:10365:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10365:15: sparse: struct sched_domain_shared [noderef] <asn:4> *
kernel/sched/fair.c:10365:15: sparse: struct sched_domain_shared *
kernel/sched/fair.c:10379:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10379:14: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10379:14: sparse: struct sched_domain *
kernel/sched/fair.c:10388:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10388:14: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10388:14: sparse: struct sched_domain *
kernel/sched/fair.c:10413:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10413:14: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10413:14: sparse: struct sched_domain *
kernel/sched/fair.c:10443:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10443:14: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10443:14: sparse: struct sched_domain *
kernel/sched/fair.c:10732:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10732:22: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10732:22: sparse: struct sched_domain *
kernel/sched/fair.c:10746:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10746:9: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10746:9: sparse: struct sched_domain *
kernel/sched/fair.c:11366:6: sparse: sparse: symbol 'free_fair_sched_group' was not declared. Should it be static?
kernel/sched/fair.c:11368:5: sparse: sparse: symbol 'alloc_fair_sched_group' was not declared. Should it be static?
kernel/sched/fair.c:11373:6: sparse: sparse: symbol 'online_fair_sched_group' was not declared. Should it be static?
kernel/sched/fair.c:11375:6: sparse: sparse: symbol 'unregister_fair_sched_group' was not declared. Should it be static?
kernel/sched/fair.c:5192:35: sparse: sparse: marked inline, but without a definition
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/fair.c:6333:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:6333:15: sparse: struct sched_domain_shared [noderef] <asn:4> *
kernel/sched/fair.c:6333:15: sparse: struct sched_domain_shared *
kernel/sched/fair.c:6324:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:6324:15: sparse: struct sched_domain_shared [noderef] <asn:4> *
kernel/sched/fair.c:6324:15: sparse: struct sched_domain_shared *
kernel/sched/fair.c:6333:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:6333:15: sparse: struct sched_domain_shared [noderef] <asn:4> *
kernel/sched/fair.c:6333:15: sparse: struct sched_domain_shared *
kernel/sched/fair.c:6324:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:6324:15: sparse: struct sched_domain_shared [noderef] <asn:4> *
kernel/sched/fair.c:6324:15: sparse: struct sched_domain_shared *
kernel/sched/fair.c:6305:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:6305:17: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:6305:17: sparse: struct sched_domain *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/fair.c:10263:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10263:16: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10263:16: sparse: struct sched_domain *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/fair.c:10263:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:10263:16: sparse: struct sched_domain [noderef] <asn:4> *
kernel/sched/fair.c:10263:16: sparse: struct sched_domain *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/sched.h:2393:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2393:16: sparse: struct update_util_data [noderef] <asn:4> *
kernel/sched/sched.h:2393:16: sparse: struct update_util_data *
kernel/sched/fair.c: In function 'coresched_adjust_vruntime':
>> kernel/sched/fair.c:505:9: error: 'struct sched_entity' has no member named 'my_q'
505 | if (se->my_q)
| ^~
kernel/sched/fair.c:506:32: error: 'struct sched_entity' has no member named 'my_q'
506 | coresched_adjust_vruntime(se->my_q, delta);
| ^~
kernel/sched/fair.c: In function 'cfs_prio_less':
kernel/sched/fair.c:539:11: error: implicit declaration of function 'is_same_group' [-Werror=implicit-function-declaration]
539 | while (!is_same_group(sea, seb)) {
| ^~~~~~~~~~~~~
kernel/sched/fair.c:540:23: error: 'struct sched_entity' has no member named 'depth'
540 | int sea_depth = sea->depth;
| ^~
kernel/sched/fair.c:541:23: error: 'struct sched_entity' has no member named 'depth'
541 | int seb_depth = seb->depth;
| ^~
kernel/sched/fair.c:554:12: error: 'struct sched_entity' has no member named 'parent'
554 | while (sea->parent)
| ^~
kernel/sched/fair.c:555:12: error: 'struct sched_entity' has no member named 'parent'
555 | sea = sea->parent;
| ^~
kernel/sched/fair.c:556:12: error: 'struct sched_entity' has no member named 'parent'
556 | while (seb->parent)
| ^~
kernel/sched/fair.c:557:12: error: 'struct sched_entity' has no member named 'parent'
557 | seb = seb->parent;
| ^~
kernel/sched/fair.c: At top level:
kernel/sched/fair.c:3744:6: warning: no previous prototype for 'sync_entity_load_avg' [-Wmissing-prototypes]
3744 | void sync_entity_load_avg(struct sched_entity *se)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:3757:6: warning: no previous prototype for 'remove_entity_load_avg' [-Wmissing-prototypes]
3757 | void remove_entity_load_avg(struct sched_entity *se)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:5214:6: warning: no previous prototype for 'init_cfs_bandwidth' [-Wmissing-prototypes]
5214 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
| ^~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:6698:15: warning: no previous prototype for 'capacity_curr_of' [-Wmissing-prototypes]
6698 | unsigned long capacity_curr_of(int cpu)
| ^~~~~~~~~~~~~~~~
kernel/sched/fair.c: In function 'find_best_target':
kernel/sched/fair.c:6713:16: warning: variable 'target_util' set but not used [-Wunused-but-set-variable]
6713 | unsigned long target_util = ULONG_MAX;
| ^~~~~~~~~~~
kernel/sched/fair.c: At top level:
kernel/sched/fair.c:11366:6: warning: no previous prototype for 'free_fair_sched_group' [-Wmissing-prototypes]
11366 | void free_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11368:5: warning: no previous prototype for 'alloc_fair_sched_group' [-Wmissing-prototypes]
11368 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11373:6: warning: no previous prototype for 'online_fair_sched_group' [-Wmissing-prototypes]
11373 | void online_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11375:6: warning: no previous prototype for 'unregister_fair_sched_group' [-Wmissing-prototypes]
11375 | void unregister_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
kernel/sched/fair.c: In function 'coresched_adjust_vruntime':
>> kernel/sched/fair.c:505:9: error: 'struct sched_entity' has no member named 'my_q'
505 | if (se->my_q)
| ^~
kernel/sched/fair.c:506:32: error: 'struct sched_entity' has no member named 'my_q'
506 | coresched_adjust_vruntime(se->my_q, delta);
| ^~
kernel/sched/fair.c: In function 'cfs_prio_less':
kernel/sched/fair.c:539:11: error: implicit declaration of function 'is_same_group' [-Werror=implicit-function-declaration]
539 | while (!is_same_group(sea, seb)) {
| ^~~~~~~~~~~~~
kernel/sched/fair.c:540:23: error: 'struct sched_entity' has no member named 'depth'
540 | int sea_depth = sea->depth;
| ^~
kernel/sched/fair.c:541:23: error: 'struct sched_entity' has no member named 'depth'
541 | int seb_depth = seb->depth;
| ^~
kernel/sched/fair.c:554:12: error: 'struct sched_entity' has no member named 'parent'
554 | while (sea->parent)
| ^~
kernel/sched/fair.c:555:12: error: 'struct sched_entity' has no member named 'parent'
555 | sea = sea->parent;
| ^~
kernel/sched/fair.c:556:12: error: 'struct sched_entity' has no member named 'parent'
556 | while (seb->parent)
| ^~
kernel/sched/fair.c:557:12: error: 'struct sched_entity' has no member named 'parent'
557 | seb = seb->parent;
| ^~
kernel/sched/fair.c: At top level:
kernel/sched/fair.c:3744:6: warning: no previous prototype for 'sync_entity_load_avg' [-Wmissing-prototypes]
3744 | void sync_entity_load_avg(struct sched_entity *se)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:3757:6: warning: no previous prototype for 'remove_entity_load_avg' [-Wmissing-prototypes]
3757 | void remove_entity_load_avg(struct sched_entity *se)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:5214:6: warning: no previous prototype for 'init_cfs_bandwidth' [-Wmissing-prototypes]
5214 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
| ^~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:6698:15: warning: no previous prototype for 'capacity_curr_of' [-Wmissing-prototypes]
6698 | unsigned long capacity_curr_of(int cpu)
| ^~~~~~~~~~~~~~~~
kernel/sched/fair.c: In function 'find_best_target':
kernel/sched/fair.c:6713:16: warning: variable 'target_util' set but not used [-Wunused-but-set-variable]
6713 | unsigned long target_util = ULONG_MAX;
| ^~~~~~~~~~~
kernel/sched/fair.c: At top level:
kernel/sched/fair.c:11366:6: warning: no previous prototype for 'free_fair_sched_group' [-Wmissing-prototypes]
11366 | void free_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11368:5: warning: no previous prototype for 'alloc_fair_sched_group' [-Wmissing-prototypes]
11368 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11373:6: warning: no previous prototype for 'online_fair_sched_group' [-Wmissing-prototypes]
11373 | void online_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11375:6: warning: no previous prototype for 'unregister_fair_sched_group' [-Wmissing-prototypes]
11375 | void unregister_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +505 kernel/sched/fair.c
491
492 #ifdef CONFIG_SCHED_CORE
493 static void coresched_adjust_vruntime(struct cfs_rq *cfs_rq, u64 delta)
494 {
495 struct sched_entity *se, *next;
496
497 if (!cfs_rq)
498 return;
499
500 cfs_rq->min_vruntime -= delta;
501 rbtree_postorder_for_each_entry_safe(se, next,
502 &cfs_rq->tasks_timeline.rb_root, run_node) {
503 if (se->vruntime > delta)
504 se->vruntime -= delta;
> 505 if (se->my_q)
506 coresched_adjust_vruntime(se->my_q, delta);
507 }
508 }
509
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[chrome-os:chromeos-4.19 52/59] kernel/sched/fair.c:539:11: error: implicit declaration of function 'is_same_group'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 45baa007ba13bc516470dbd9379b2f7525a087e1
commit: 1727d28632e4f124f314bc19ad4f40ec183fe60e [52/59] FROMLIST: sched/fair: core wide vruntime comparison
config: x86_64-allnoconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 1727d28632e4f124f314bc19ad4f40ec183fe60e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>, old ones prefixed by <<):
In file included from kernel/sched/fair.c:23:
kernel/sched/sched.h:1208:15: warning: variable 'cookie' is uninitialized when used here [-Wuninitialized]
rf->cookie = lockdep_pin_lock(rq_lockp(rq));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:455:60: note: expanded from macro 'lockdep_pin_lock'
#define lockdep_pin_lock(l) ({ struct pin_cookie cookie; cookie; })
^~~~~~
kernel/sched/sched.h:1208:15: note: variable 'cookie' is declared here
include/linux/lockdep.h:455:34: note: expanded from macro 'lockdep_pin_lock'
#define lockdep_pin_lock(l) ({ struct pin_cookie cookie; cookie; })
^
<< In file included from kernel/sched/fair.c:23:
>> kernel/sched/fair.c:539:11: error: implicit declaration of function 'is_same_group' [-Werror,-Wimplicit-function-declaration]
while (!is_same_group(sea, seb)) {
^
<< In file included from kernel/sched/fair.c:23:
>> kernel/sched/fair.c:540:25: error: no member named 'depth' in 'struct sched_entity'
int sea_depth = sea->depth;
~~~ ^
kernel/sched/fair.c:541:25: error: no member named 'depth' in 'struct sched_entity'
int seb_depth = seb->depth;
~~~ ^
<< In file included from kernel/sched/fair.c:23:
>> kernel/sched/fair.c:554:14: error: no member named 'parent' in 'struct sched_entity'
while (sea->parent)
~~~ ^
kernel/sched/fair.c:555:14: error: no member named 'parent' in 'struct sched_entity'
sea = sea->parent;
~~~ ^
kernel/sched/fair.c:556:14: error: no member named 'parent' in 'struct sched_entity'
while (seb->parent)
~~~ ^
kernel/sched/fair.c:557:14: error: no member named 'parent' in 'struct sched_entity'
seb = seb->parent;
~~~ ^
kernel/sched/fair.c:5214:6: warning: no previous prototype for function 'init_cfs_bandwidth' [-Wmissing-prototypes]
void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
^
kernel/sched/fair.c:5214:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
^
static
kernel/sched/fair.c:11366:6: warning: no previous prototype for function 'free_fair_sched_group' [-Wmissing-prototypes]
void free_fair_sched_group(struct task_group *tg) { }
^
kernel/sched/fair.c:11366:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void free_fair_sched_group(struct task_group *tg) { }
^
static
kernel/sched/fair.c:11368:5: warning: no previous prototype for function 'alloc_fair_sched_group' [-Wmissing-prototypes]
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
^
kernel/sched/fair.c:11368:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
^
static
kernel/sched/fair.c:11373:6: warning: no previous prototype for function 'online_fair_sched_group' [-Wmissing-prototypes]
void online_fair_sched_group(struct task_group *tg) { }
^
kernel/sched/fair.c:11373:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void online_fair_sched_group(struct task_group *tg) { }
^
static
kernel/sched/fair.c:11375:6: warning: no previous prototype for function 'unregister_fair_sched_group' [-Wmissing-prototypes]
void unregister_fair_sched_group(struct task_group *tg) { }
^
kernel/sched/fair.c:11375:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void unregister_fair_sched_group(struct task_group *tg) { }
^
static
6 warnings and 7 errors generated.
vim +/is_same_group +539 kernel/sched/fair.c
528
529 bool cfs_prio_less(struct task_struct *a, struct task_struct *b)
530 {
531 struct sched_entity *sea = &a->se;
532 struct sched_entity *seb = &b->se;
533 bool samecpu = task_cpu(a) == task_cpu(b);
534 struct task_struct *p;
535 s64 delta;
536
537 if (samecpu) {
538 /* vruntime is per cfs_rq */
> 539 while (!is_same_group(sea, seb)) {
> 540 int sea_depth = sea->depth;
541 int seb_depth = seb->depth;
542
543 if (sea_depth >= seb_depth)
544 sea = parent_entity(sea);
545 if (sea_depth <= seb_depth)
546 seb = parent_entity(seb);
547 }
548
549 delta = (s64)(sea->vruntime - seb->vruntime);
550 goto out;
551 }
552
553 /* crosscpu: compare root level se's vruntime to decide priority */
> 554 while (sea->parent)
555 sea = sea->parent;
556 while (seb->parent)
557 seb = seb->parent;
558 delta = (s64)(sea->vruntime - seb->vruntime);
559
560 out:
561 p = delta > 0 ? b : a;
562 trace_printk("picked %s/%d %s: %Ld %Ld %Ld\n", p->comm, p->pid,
563 samecpu ? "samecpu" : "crosscpu",
564 sea->vruntime, seb->vruntime, delta);
565
566 return delta > 0;
567 }
568
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[chrome-os:chromeos-4.19 44/59] kernel/sched/core.c:109:6: warning: no previous prototype for function 'sched_core_get'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 45baa007ba13bc516470dbd9379b2f7525a087e1
commit: 56b6a5dcf7349d151c47201626e0f1b62334febf [44/59] FROMLIST: sched: Core-wide rq->lock
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 56b6a5dcf7349d151c47201626e0f1b62334febf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>, old ones prefixed by <<):
>> kernel/sched/core.c:109:6: warning: no previous prototype for function 'sched_core_get' [-Wmissing-prototypes]
void sched_core_get(void)
^
kernel/sched/core.c:109:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sched_core_get(void)
^
static
>> kernel/sched/core.c:117:6: warning: no previous prototype for function 'sched_core_put' [-Wmissing-prototypes]
void sched_core_put(void)
^
kernel/sched/core.c:117:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sched_core_put(void)
^
static
kernel/sched/core.c:1642:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
kernel/sched/core.c:1642:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
static
kernel/sched/core.c:3843:35: warning: no previous prototype for function 'preempt_schedule_irq' [-Wmissing-prototypes]
asmlinkage __visible void __sched preempt_schedule_irq(void)
^
kernel/sched/core.c:3843:22: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage __visible void __sched preempt_schedule_irq(void)
^
static
kernel/sched/core.c:6785:5: warning: no previous prototype for function 'tg_set_cfs_quota' [-Wmissing-prototypes]
int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
^
kernel/sched/core.c:6785:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
^
static
kernel/sched/core.c:6800:6: warning: no previous prototype for function 'tg_get_cfs_quota' [-Wmissing-prototypes]
long tg_get_cfs_quota(struct task_group *tg)
^
kernel/sched/core.c:6800:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
long tg_get_cfs_quota(struct task_group *tg)
^
static
kernel/sched/core.c:6813:5: warning: no previous prototype for function 'tg_set_cfs_period' [-Wmissing-prototypes]
int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
^
kernel/sched/core.c:6813:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
^
static
kernel/sched/core.c:6826:6: warning: no previous prototype for function 'tg_get_cfs_period' [-Wmissing-prototypes]
long tg_get_cfs_period(struct task_group *tg)
^
kernel/sched/core.c:6826:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
long tg_get_cfs_period(struct task_group *tg)
^
static
8 warnings generated.
vim +/sched_core_get +109 kernel/sched/core.c
108
> 109 void sched_core_get(void)
110 {
111 mutex_lock(&sched_core_mutex);
112 if (!sched_core_count++)
113 __sched_core_enable();
114 mutex_unlock(&sched_core_mutex);
115 }
116
> 117 void sched_core_put(void)
118 {
119 mutex_lock(&sched_core_mutex);
120 if (!--sched_core_count)
121 __sched_core_disable();
122 mutex_unlock(&sched_core_mutex);
123 }
124
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[slave-dma:next 6/6] drivers/dma/dw-edma/dw-edma-pcie.c:129:6: error: 'PCI_IRQ_MSI_TYPES' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git next
head: 1886761f031b93936149c8fde71a90ab76bf2a2a
commit: 1886761f031b93936149c8fde71a90ab76bf2a2a [6/6] dmaengine: dw-edma: use PCI_IRQ_MSI_TYPES where appropriate
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.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
git checkout 1886761f031b93936149c8fde71a90ab76bf2a2a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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 >>, old ones prefixed by <<):
drivers/dma/dw-edma/dw-edma-pcie.c: In function 'dw_edma_pcie_probe':
>> drivers/dma/dw-edma/dw-edma-pcie.c:129:6: error: 'PCI_IRQ_MSI_TYPES' undeclared (first use in this function); did you mean 'PCI_IRQ_ALL_TYPES'?
129 | PCI_IRQ_MSI_TYPES);
| ^~~~~~~~~~~~~~~~~
| PCI_IRQ_ALL_TYPES
drivers/dma/dw-edma/dw-edma-pcie.c:129:6: note: each undeclared identifier is reported only once for each function it appears in
vim +129 drivers/dma/dw-edma/dw-edma-pcie.c
65
66 static int dw_edma_pcie_probe(struct pci_dev *pdev,
67 const struct pci_device_id *pid)
68 {
69 const struct dw_edma_pcie_data *pdata = (void *)pid->driver_data;
70 struct device *dev = &pdev->dev;
71 struct dw_edma_chip *chip;
72 int err, nr_irqs;
73 struct dw_edma *dw;
74
75 /* Enable PCI device */
76 err = pcim_enable_device(pdev);
77 if (err) {
78 pci_err(pdev, "enabling device failed\n");
79 return err;
80 }
81
82 /* Mapping PCI BAR regions */
83 err = pcim_iomap_regions(pdev, BIT(pdata->rg_bar) |
84 BIT(pdata->ll_bar) |
85 BIT(pdata->dt_bar),
86 pci_name(pdev));
87 if (err) {
88 pci_err(pdev, "eDMA BAR I/O remapping failed\n");
89 return err;
90 }
91
92 pci_set_master(pdev);
93
94 /* DMA configuration */
95 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
96 if (!err) {
97 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
98 if (err) {
99 pci_err(pdev, "consistent DMA mask 64 set failed\n");
100 return err;
101 }
102 } else {
103 pci_err(pdev, "DMA mask 64 set failed\n");
104
105 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
106 if (err) {
107 pci_err(pdev, "DMA mask 32 set failed\n");
108 return err;
109 }
110
111 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
112 if (err) {
113 pci_err(pdev, "consistent DMA mask 32 set failed\n");
114 return err;
115 }
116 }
117
118 /* Data structure allocation */
119 chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
120 if (!chip)
121 return -ENOMEM;
122
123 dw = devm_kzalloc(dev, sizeof(*dw), GFP_KERNEL);
124 if (!dw)
125 return -ENOMEM;
126
127 /* IRQs allocation */
128 nr_irqs = pci_alloc_irq_vectors(pdev, 1, pdata->irqs,
> 129 PCI_IRQ_MSI_TYPES);
130 if (nr_irqs < 1) {
131 pci_err(pdev, "fail to alloc IRQ vector (number of IRQs=%u)\n",
132 nr_irqs);
133 return -EPERM;
134 }
135
136 /* Data structure initialization */
137 chip->dw = dw;
138 chip->dev = dev;
139 chip->id = pdev->devfn;
140 chip->irq = pdev->irq;
141
142 dw->rg_region.vaddr = pcim_iomap_table(pdev)[pdata->rg_bar];
143 dw->rg_region.vaddr += pdata->rg_off;
144 dw->rg_region.paddr = pdev->resource[pdata->rg_bar].start;
145 dw->rg_region.paddr += pdata->rg_off;
146 dw->rg_region.sz = pdata->rg_sz;
147
148 dw->ll_region.vaddr = pcim_iomap_table(pdev)[pdata->ll_bar];
149 dw->ll_region.vaddr += pdata->ll_off;
150 dw->ll_region.paddr = pdev->resource[pdata->ll_bar].start;
151 dw->ll_region.paddr += pdata->ll_off;
152 dw->ll_region.sz = pdata->ll_sz;
153
154 dw->dt_region.vaddr = pcim_iomap_table(pdev)[pdata->dt_bar];
155 dw->dt_region.vaddr += pdata->dt_off;
156 dw->dt_region.paddr = pdev->resource[pdata->dt_bar].start;
157 dw->dt_region.paddr += pdata->dt_off;
158 dw->dt_region.sz = pdata->dt_sz;
159
160 dw->version = pdata->version;
161 dw->mode = pdata->mode;
162 dw->nr_irqs = nr_irqs;
163 dw->ops = &dw_edma_pcie_core_ops;
164
165 /* Debug info */
166 pci_dbg(pdev, "Version:\t%u\n", dw->version);
167
168 pci_dbg(pdev, "Mode:\t%s\n",
169 dw->mode == EDMA_MODE_LEGACY ? "Legacy" : "Unroll");
170
171 pci_dbg(pdev, "Registers:\tBAR=%u, off=0x%.8lx, sz=0x%zx bytes, addr(v=%p, p=%pa)\n",
172 pdata->rg_bar, pdata->rg_off, pdata->rg_sz,
173 dw->rg_region.vaddr, &dw->rg_region.paddr);
174
175 pci_dbg(pdev, "L. List:\tBAR=%u, off=0x%.8lx, sz=0x%zx bytes, addr(v=%p, p=%pa)\n",
176 pdata->ll_bar, pdata->ll_off, pdata->ll_sz,
177 dw->ll_region.vaddr, &dw->ll_region.paddr);
178
179 pci_dbg(pdev, "Data:\tBAR=%u, off=0x%.8lx, sz=0x%zx bytes, addr(v=%p, p=%pa)\n",
180 pdata->dt_bar, pdata->dt_off, pdata->dt_sz,
181 dw->dt_region.vaddr, &dw->dt_region.paddr);
182
183 pci_dbg(pdev, "Nr. IRQs:\t%u\n", dw->nr_irqs);
184
185 /* Validating if PCI interrupts were enabled */
186 if (!pci_dev_msi_enabled(pdev)) {
187 pci_err(pdev, "enable interrupt failed\n");
188 return -EPERM;
189 }
190
191 dw->irq = devm_kcalloc(dev, nr_irqs, sizeof(*dw->irq), GFP_KERNEL);
192 if (!dw->irq)
193 return -ENOMEM;
194
195 /* Starting eDMA driver */
196 err = dw_edma_probe(chip);
197 if (err) {
198 pci_err(pdev, "eDMA probe failed\n");
199 return err;
200 }
201
202 /* Saving data structure reference */
203 pci_set_drvdata(pdev, chip);
204
205 return 0;
206 }
207
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months