Re: [irqchip: irq/irqchip-next] genirq: Use irq_resolve_mapping() to implement __handle_domain_irq() and co

From: kernel test robot
Date: Sun Jun 06 2021 - 10:22:16 EST


Hi irqchip-bot,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on tip/irq/core linus/master v5.13-rc4 next-20210604]
[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/irqchip-bot-for-Marc-Zyngier/genirq-Use-irq_resolve_mapping-to-implement-__handle_domain_irq-and-co/20210606-204819
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd860052c99b1e088352bdd4fb7aef46f8d2ef47
config: riscv-nommu_k210_defconfig (attached as .config)
compiler: riscv64-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
# https://github.com/0day-ci/linux/commit/e684b127b014b361df0088dca184273cdd73d79e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review irqchip-bot-for-Marc-Zyngier/genirq-Use-irq_resolve_mapping-to-implement-__handle_domain_irq-and-co/20210606-204819
git checkout e684b127b014b361df0088dca184273cdd73d79e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:683:10: error: implicit declaration of function 'irq_resolve_mapping'; did you mean 'irq_create_mapping'? [-Werror=implicit-function-declaration]
683 | desc = irq_resolve_mapping(domain, hwirq);
| ^~~~~~~~~~~~~~~~~~~
| irq_create_mapping
>> kernel/irq/irqdesc.c:683:8: warning: assignment to 'struct irq_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
683 | desc = irq_resolve_mapping(domain, hwirq);
| ^
kernel/irq/irqdesc.c: In function 'handle_domain_nmi':
kernel/irq/irqdesc.c:730:7: warning: assignment to 'struct irq_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
730 | desc = irq_resolve_mapping(domain, hwirq);
| ^
cc1: some warnings being treated as errors


vim +683 kernel/irq/irqdesc.c

661
662 #ifdef CONFIG_HANDLE_DOMAIN_IRQ
663 /**
664 * __handle_domain_irq - Invoke the handler for a HW irq belonging to a domain
665 * @domain: The domain where to perform the lookup
666 * @hwirq: The HW irq number to convert to a logical one
667 * @lookup: Whether to perform the domain lookup or not
668 * @regs: Register file coming from the low-level handling code
669 *
670 * Returns: 0 on success, or -EINVAL if conversion has failed
671 */
672 int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq,
673 bool lookup, struct pt_regs *regs)
674 {
675 struct pt_regs *old_regs = set_irq_regs(regs);
676 struct irq_desc *desc;
677 int ret = 0;
678
679 irq_enter();
680
681 if (likely(IS_ENABLED(CONFIG_IRQ_DOMAIN) && lookup)) {
682 /* The irqdomain code provides boundary checks */
> 683 desc = irq_resolve_mapping(domain, hwirq);
684 } else {
685 /*
686 * Some hardware gives randomly wrong interrupts. Rather
687 * than crashing, do something sensible.
688 */
689 if (unlikely(!hwirq || hwirq >= nr_irqs)) {
690 ack_bad_irq(hwirq);
691 desc = NULL;
692 } else {
693 desc = irq_to_desc(hwirq);
694 }
695 }
696
697 if (likely(desc))
698 handle_irq_desc(desc);
699 else
700 ret = -EINVAL;
701
702 irq_exit();
703 set_irq_regs(old_regs);
704 return ret;
705 }
706

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip