[arm-platforms:arm64/tlbi-range-hacks 12/17] drivers/pci/controller/pcie-apple.c:460:40: error: implicit declaration of function 'FIELD_PREP'

kernel test robot lkp at intel.com
Fri Mar 21 20:43:40 PDT 2025


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git arm64/tlbi-range-hacks
head:   89a08aa9682594d44c11df1b6e168e38bdb7f0c3
commit: b2817638e680079b58e1bf67c6d9fa1d5f48b636 [12/17] PCI: apple: Add T602x PCIe support
config: csky-allmodconfig (https://download.01.org/0day-ci/archive/20250322/202503221117.9esJe5iq-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250322/202503221117.9esJe5iq-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503221117.9esJe5iq-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pci/controller/pcie-apple.c: In function 'apple_pcie_port_setup_irq':
>> drivers/pci/controller/pcie-apple.c:460:40: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
     460 |                         writel_relaxed(FIELD_PREP(PORT_MSIMAP_TARGET, i) |
         |                                        ^~~~~~~~~~


vim +/FIELD_PREP +460 drivers/pci/controller/pcie-apple.c

   423	
   424	static int apple_pcie_port_setup_irq(struct apple_pcie_port *port)
   425	{
   426		struct fwnode_handle *fwnode = &port->np->fwnode;
   427		struct apple_pcie *pcie = port->pcie;
   428		unsigned int irq;
   429		u32 val = 0;
   430	
   431		/* FIXME: consider moving each interrupt under each port */
   432		irq = irq_of_parse_and_map(to_of_node(dev_fwnode(port->pcie->dev)),
   433					   port->idx);
   434		if (!irq)
   435			return -ENXIO;
   436	
   437		port->domain = irq_domain_create_linear(fwnode, 32,
   438							&apple_port_irq_domain_ops,
   439							port);
   440		if (!port->domain)
   441			return -ENOMEM;
   442	
   443		/* Disable all interrupts */
   444		writel_relaxed(~0, port->base + PORT_INTMSK);
   445		writel_relaxed(~0, port->base + PORT_INTSTAT);
   446		writel_relaxed(~0, port->base + PORT_LINKCMDSTS);
   447	
   448		irq_set_chained_handler_and_data(irq, apple_port_irq_handler, port);
   449	
   450		/* Configure MSI base address */
   451		BUILD_BUG_ON(upper_32_bits(DOORBELL_ADDR));
   452		writel_relaxed(lower_32_bits(DOORBELL_ADDR),
   453			       port->base + pcie->hw->port_msiaddr);
   454		if (pcie->hw->port_msiaddr_hi)
   455			writel_relaxed(0, port->base + pcie->hw->port_msiaddr_hi);
   456	
   457		/* Enable MSIs, shared between all ports */
   458		if (pcie->hw->port_msimap) {
   459			for (int i = 0; i < pcie->nvecs; i++)
 > 460				writel_relaxed(FIELD_PREP(PORT_MSIMAP_TARGET, i) |
   461					       PORT_MSIMAP_ENABLE,
   462					       port->base + pcie->hw->port_msimap + 4 * i);
   463		} else {
   464			writel_relaxed(0, port->base + PORT_MSIBASE);
   465			val = ilog2(pcie->nvecs) << PORT_MSICFG_L2MSINUM_SHIFT;
   466		}
   467	
   468		writel_relaxed(val | PORT_MSICFG_EN, port->base + PORT_MSICFG);
   469		return 0;
   470	}
   471	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the linux-arm-kernel mailing list