[arm-platforms:irq/domain_cleanup 6/31] drivers/mfd/ioc3.c:86:26: error: incomplete definition of type 'struct irq_domain'
kernel test robot
lkp at intel.com
Sun May 16 09:47:50 PDT 2021
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head: 2360898eeecf0ff64ae1edf24f632228a09badef
commit: 1831090db122e348023e4c53849586df3991b17e [6/31] MIPS: Do not include linux/irqdomain.h from asm/irq.h
config: mips-randconfig-r031-20210516 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a80a5036a1f6b9a9eb4038b30458f9ab349efff8)
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/maz/arm-platforms.git/commit/?id=1831090db122e348023e4c53849586df3991b17e
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms irq/domain_cleanup
git checkout 1831090db122e348023e4c53849586df3991b17e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/mfd/ioc3.c:86:26: error: incomplete definition of type 'struct irq_domain'
irq_set_chip_data(irq, d->host_data);
~^
include/linux/irq.h:128:8: note: forward declaration of 'struct irq_domain'
struct irq_domain;
^
>> drivers/mfd/ioc3.c:96:36: error: variable has incomplete type 'const struct irq_domain_ops'
static const struct irq_domain_ops ioc3_irq_domain_ops = {
^
drivers/mfd/ioc3.c:96:21: note: forward declaration of 'struct irq_domain_ops'
static const struct irq_domain_ops ioc3_irq_domain_ops = {
^
drivers/mfd/ioc3.c:104:37: error: incomplete definition of type 'struct irq_domain'
struct ioc3_priv_data *ipd = domain->host_data;
~~~~~~^
include/linux/irq.h:128:8: note: forward declaration of 'struct irq_domain'
struct irq_domain;
^
drivers/mfd/ioc3.c:114:9: error: implicit declaration of function 'irq_find_mapping' [-Werror,-Wimplicit-function-declaration]
irq = irq_find_mapping(domain, __ffs(pending));
^
>> drivers/mfd/ioc3.c:140:7: error: implicit declaration of function 'irq_domain_alloc_named_fwnode' [-Werror,-Wimplicit-function-declaration]
fn = irq_domain_alloc_named_fwnode("IOC3");
^
>> drivers/mfd/ioc3.c:140:5: warning: incompatible integer to pointer conversion assigning to 'struct fwnode_handle *' from 'int' [-Wint-conversion]
fn = irq_domain_alloc_named_fwnode("IOC3");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/mfd/ioc3.c:144:11: error: implicit declaration of function 'irq_domain_create_linear' [-Werror,-Wimplicit-function-declaration]
domain = irq_domain_create_linear(fn, 24, &ioc3_irq_domain_ops, ipd);
^
>> drivers/mfd/ioc3.c:146:3: error: implicit declaration of function 'irq_domain_free_fwnode' [-Werror,-Wimplicit-function-declaration]
irq_domain_free_fwnode(fn);
^
drivers/mfd/ioc3.c:619:42: error: incomplete definition of type 'struct irq_domain'
struct fwnode_handle *fn = ipd->domain->fwnode;
~~~~~~~~~~~^
include/linux/irq.h:128:8: note: forward declaration of 'struct irq_domain'
struct irq_domain;
^
>> drivers/mfd/ioc3.c:621:4: error: implicit declaration of function 'irq_domain_remove' [-Werror,-Wimplicit-function-declaration]
irq_domain_remove(ipd->domain);
^
drivers/mfd/ioc3.c:622:4: error: implicit declaration of function 'irq_domain_free_fwnode' [-Werror,-Wimplicit-function-declaration]
irq_domain_free_fwnode(fn);
^
>> drivers/mfd/ioc3.c:582:46: warning: shift count >= width of type [-Wshift-count-overflow]
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/mfd/ioc3.c:649:41: error: incomplete definition of type 'struct irq_domain'
struct fwnode_handle *fn = ipd->domain->fwnode;
~~~~~~~~~~~^
include/linux/irq.h:128:8: note: forward declaration of 'struct irq_domain'
struct irq_domain;
^
drivers/mfd/ioc3.c:651:3: error: implicit declaration of function 'irq_domain_remove' [-Werror,-Wimplicit-function-declaration]
irq_domain_remove(ipd->domain);
^
drivers/mfd/ioc3.c:652:3: error: implicit declaration of function 'irq_domain_free_fwnode' [-Werror,-Wimplicit-function-declaration]
irq_domain_free_fwnode(fn);
^
2 warnings and 13 errors generated.
vim +86 drivers/mfd/ioc3.c
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 76
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 77 static int ioc3_irq_domain_map(struct irq_domain *d, unsigned int irq,
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 78 irq_hw_number_t hwirq)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 79 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 80 /* Set level IRQs for every interrupt contained in IOC3_LVL_MASK */
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 81 if (BIT(hwirq) & IOC3_LVL_MASK)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 82 irq_set_chip_and_handler(irq, &ioc3_irq_chip, handle_level_irq);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 83 else
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 84 irq_set_chip_and_handler(irq, &ioc3_irq_chip, handle_edge_irq);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 85
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 @86 irq_set_chip_data(irq, d->host_data);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 87 return 0;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 88 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 89
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 90 static void ioc3_irq_domain_unmap(struct irq_domain *d, unsigned int irq)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 91 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 92 irq_set_chip_and_handler(irq, NULL, NULL);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 93 irq_set_chip_data(irq, NULL);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 94 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 95
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 @96 static const struct irq_domain_ops ioc3_irq_domain_ops = {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 97 .map = ioc3_irq_domain_map,
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 98 .unmap = ioc3_irq_domain_unmap,
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 99 };
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 100
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 101 static void ioc3_irq_handler(struct irq_desc *desc)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 102 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 103 struct irq_domain *domain = irq_desc_get_handler_data(desc);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 104 struct ioc3_priv_data *ipd = domain->host_data;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 105 struct ioc3 __iomem *regs = ipd->regs;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 106 u32 pending, mask;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 107 unsigned int irq;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 108
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 109 pending = readl(®s->sio_ir);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 110 mask = readl(®s->sio_ies);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 111 pending &= mask; /* Mask off not enabled interrupts */
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 112
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 113 if (pending) {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 114 irq = irq_find_mapping(domain, __ffs(pending));
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 115 if (irq)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 116 generic_handle_irq(irq);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 117 } else {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 118 spurious_interrupt();
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 119 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 120 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 121
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 122 /*
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 123 * System boards/BaseIOs use more interrupt pins of the bridge ASIC
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 124 * to which the IOC3 is connected. Since the IOC3 MFD driver
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 125 * knows wiring of these extra pins, we use the map_irq function
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 126 * to get interrupts activated
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 127 */
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 128 static int ioc3_map_irq(struct pci_dev *pdev, int slot, int pin)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 129 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 130 struct pci_host_bridge *hbrg = pci_find_host_bridge(pdev->bus);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 131
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 132 return hbrg->map_irq(pdev, slot, pin);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 133 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 134
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 135 static int ioc3_irq_domain_setup(struct ioc3_priv_data *ipd, int irq)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 136 {
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 137 struct irq_domain *domain;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 138 struct fwnode_handle *fn;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 139
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 @140 fn = irq_domain_alloc_named_fwnode("IOC3");
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 141 if (!fn)
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 142 goto err;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 143
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 @144 domain = irq_domain_create_linear(fn, 24, &ioc3_irq_domain_ops, ipd);
e3beca48a45b5e Thomas Gleixner 2020-07-09 145 if (!domain) {
e3beca48a45b5e Thomas Gleixner 2020-07-09 @146 irq_domain_free_fwnode(fn);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 147 goto err;
e3beca48a45b5e Thomas Gleixner 2020-07-09 148 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 149
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 150 ipd->domain = domain;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 151
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 152 irq_set_chained_handler_and_data(irq, ioc3_irq_handler, domain);
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 153 ipd->domain_irq = irq;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 154 return 0;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 155
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 156 err:
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 157 dev_err(&ipd->pdev->dev, "irq domain setup failed\n");
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 158 return -ENOMEM;
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 159 }
0ce5ebd24d25f0 Thomas Bogendoerfer 2020-01-09 160
:::::: The code at line 86 was first introduced by commit
:::::: 0ce5ebd24d25f02c73940f047b12733d84b125e8 mfd: ioc3: Add driver for SGI IOC3 chip
:::::: TO: Thomas Bogendoerfer <tbogendoerfer at suse.de>
:::::: CC: Paul Burton <paulburton at kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 26683 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210517/a9cf4443/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list