Linux PCI subsystem development
 help / color / mirror / Atom feed
* [pci:controller/rockchip 11/11] drivers/pci/controller/dwc/pcie-dw-rockchip.c:491:undefined reference to `pci_epc_init_notify'
@ 2024-06-26 23:54 kernel test robot
  2024-06-27  8:33 ` Niklas Cassel
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2024-06-26 23:54 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: oe-kbuild-all, linux-pci, Krzysztof Wilczyński

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git controller/rockchip
head:   246afbe0f6fca433d8d918b740719170b1b082cc
commit: 246afbe0f6fca433d8d918b740719170b1b082cc [11/11] PCI: dw-rockchip: Use pci_epc_init_notify() directly
config: loongarch-randconfig-r081-20240626 (https://download.01.org/0day-ci/archive/20240627/202406270721.a8SQi2hn-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240627/202406270721.a8SQi2hn-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406270721.a8SQi2hn-lkp@intel.com/

All errors (new ones prefixed by >>):

   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_init_notify':
   drivers/pci/controller/dwc/pcie-designware-ep.c:26:(.text+0x1e4): undefined reference to `pci_epc_init_notify'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_deinit':
   drivers/pci/controller/dwc/pcie-designware-ep.c:640:(.text+0x83c): undefined reference to `pci_epc_mem_free_addr'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.c:643:(.text+0x854): undefined reference to `pci_epc_mem_exit'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_linkup':
   drivers/pci/controller/dwc/pcie-designware-ep.c:811:(.text+0x924): undefined reference to `pci_epc_linkup'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_linkdown':
   drivers/pci/controller/dwc/pcie-designware-ep.c:836:(.text+0x964): undefined reference to `pci_epc_linkdown'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_init':
   drivers/pci/controller/dwc/pcie-designware-ep.c:875:(.text+0xe90): undefined reference to `__devm_pci_epc_create'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.c:888:(.text+0xf20): undefined reference to `pci_epc_mem_init'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.c:895:(.text+0xf54): undefined reference to `pci_epc_mem_alloc_addr'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.c:906:(.text+0xf74): undefined reference to `pci_epc_mem_exit'
   loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-dw-rockchip.o: in function `rockchip_pcie_configure_ep':
>> drivers/pci/controller/dwc/pcie-dw-rockchip.c:491:(.text+0x7cc): undefined reference to `pci_epc_init_notify'


vim +491 drivers/pci/controller/dwc/pcie-dw-rockchip.c

   441	
   442	static int rockchip_pcie_configure_ep(struct platform_device *pdev,
   443					      struct rockchip_pcie *rockchip)
   444	{
   445		struct device *dev = &pdev->dev;
   446		int irq, ret;
   447		u32 val;
   448	
   449		if (!IS_ENABLED(CONFIG_PCIE_ROCKCHIP_DW_EP))
   450			return -ENODEV;
   451	
   452		irq = platform_get_irq_byname(pdev, "sys");
   453		if (irq < 0) {
   454			dev_err(dev, "missing sys IRQ resource\n");
   455			return irq;
   456		}
   457	
   458		ret = devm_request_threaded_irq(dev, irq, NULL,
   459						rockchip_pcie_ep_sys_irq_thread,
   460						IRQF_ONESHOT, "pcie-sys", rockchip);
   461		if (ret) {
   462			dev_err(dev, "failed to request PCIe sys IRQ\n");
   463			return ret;
   464		}
   465	
   466		/* LTSSM enable control mode */
   467		val = HIWORD_UPDATE_BIT(PCIE_LTSSM_ENABLE_ENHANCE);
   468		rockchip_pcie_writel_apb(rockchip, val, PCIE_CLIENT_HOT_RESET_CTRL);
   469	
   470		rockchip_pcie_writel_apb(rockchip, PCIE_CLIENT_EP_MODE,
   471					 PCIE_CLIENT_GENERAL_CONTROL);
   472	
   473		rockchip->pci.ep.ops = &rockchip_pcie_ep_ops;
   474		rockchip->pci.ep.page_size = SZ_64K;
   475	
   476		dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
   477	
   478		ret = dw_pcie_ep_init(&rockchip->pci.ep);
   479		if (ret) {
   480			dev_err(dev, "failed to initialize endpoint\n");
   481			return ret;
   482		}
   483	
   484		ret = dw_pcie_ep_init_registers(&rockchip->pci.ep);
   485		if (ret) {
   486			dev_err(dev, "failed to initialize DWC endpoint registers\n");
   487			dw_pcie_ep_deinit(&rockchip->pci.ep);
   488			return ret;
   489		}
   490	
 > 491		pci_epc_init_notify(rockchip->pci.ep.epc);
   492	
   493		/* unmask DLL up/down indicator and hot reset/link-down reset */
   494		rockchip_pcie_writel_apb(rockchip, 0x60000, PCIE_CLIENT_INTR_MASK_MISC);
   495	
   496		return ret;
   497	}
   498	

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pci:controller/rockchip 11/11] drivers/pci/controller/dwc/pcie-dw-rockchip.c:491:undefined reference to `pci_epc_init_notify'
  2024-06-26 23:54 [pci:controller/rockchip 11/11] drivers/pci/controller/dwc/pcie-dw-rockchip.c:491:undefined reference to `pci_epc_init_notify' kernel test robot
@ 2024-06-27  8:33 ` Niklas Cassel
  2024-06-27  8:51   ` Niklas Cassel
  0 siblings, 1 reply; 4+ messages in thread
From: Niklas Cassel @ 2024-06-27  8:33 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-pci, Krzysztof Wilczyński

On Thu, Jun 27, 2024 at 07:54:05AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git controller/rockchip
> head:   246afbe0f6fca433d8d918b740719170b1b082cc
> commit: 246afbe0f6fca433d8d918b740719170b1b082cc [11/11] PCI: dw-rockchip: Use pci_epc_init_notify() directly
> config: loongarch-randconfig-r081-20240626 (https://download.01.org/0day-ci/archive/20240627/202406270721.a8SQi2hn-lkp@intel.com/config)
> compiler: loongarch64-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240627/202406270721.a8SQi2hn-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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202406270721.a8SQi2hn-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_init_notify':
>    drivers/pci/controller/dwc/pcie-designware-ep.c:26:(.text+0x1e4): undefined reference to `pci_epc_init_notify'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_deinit':
>    drivers/pci/controller/dwc/pcie-designware-ep.c:640:(.text+0x83c): undefined reference to `pci_epc_mem_free_addr'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.c:643:(.text+0x854): undefined reference to `pci_epc_mem_exit'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_linkup':
>    drivers/pci/controller/dwc/pcie-designware-ep.c:811:(.text+0x924): undefined reference to `pci_epc_linkup'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_linkdown':
>    drivers/pci/controller/dwc/pcie-designware-ep.c:836:(.text+0x964): undefined reference to `pci_epc_linkdown'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.o: in function `dw_pcie_ep_init':
>    drivers/pci/controller/dwc/pcie-designware-ep.c:875:(.text+0xe90): undefined reference to `__devm_pci_epc_create'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.c:888:(.text+0xf20): undefined reference to `pci_epc_mem_init'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.c:895:(.text+0xf54): undefined reference to `pci_epc_mem_alloc_addr'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-designware-ep.c:906:(.text+0xf74): undefined reference to `pci_epc_mem_exit'
>    loongarch64-linux-ld: drivers/pci/controller/dwc/pcie-dw-rockchip.o: in function `rockchip_pcie_configure_ep':
> >> drivers/pci/controller/dwc/pcie-dw-rockchip.c:491:(.text+0x7cc): undefined reference to `pci_epc_init_notify'

Hello Krzysztof,

This is the same problem that the kernel test robot previously reported,
and is fixed by:
https://lore.kernel.org/linux-pci/20240626191325.4074794-2-cassel@kernel.org/



Like I wrote in the other kernel test robot report, depending on .config,
we could also see another build error if we don't have:
7a847796e509 ("PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers")
(from the pci/endpoint branch).

You have also previously cherry-picked:
3d2e425263e2 ("PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle Link Down event")
(from the pci/controller/dwc branch) which we also depend on.


Perhaps the smartest thing right now is to just recreate the
pci/controller/rockchip branch, by:
1) reset the rockchip branch to v6.10-rc1
2) merge the pci/controller/dwc branch to the rockchip branch
3) merge the pci/endpoint branch to to the rockchip branch
4) pick all the patches that are currently on the pci/controller/rockchip
5) squash: 246afbe0f6fc ("PCI: dw-rockchip: Use pci_epc_init_notify() directly")
   into the commit that adds dw-rockchip endpoint mode support
   (9b2ba393b3a6 ("PCI: dw-rockchip: Add endpoint mode support"))
6) squash: https://lore.kernel.org/linux-pci/20240626191325.4074794-2-cassel@kernel.org/
   into the commit that adds dw-rockchip endpoint mode support
   (9b2ba393b3a6 ("PCI: dw-rockchip: Add endpoint mode support"))


This way:
- All commits will build as individual patches, so no build errors from the
  test robot (even when it builds a patch that is in the middle (e.g. 10/11)).
- Even if futher commits are applied to pci/controller/dwc or pci/endpoint,
  we will not depend on any newly applied patches to these branches, so there
  will be no need to "re-merge" the branches to the rockchip branch.


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pci:controller/rockchip 11/11] drivers/pci/controller/dwc/pcie-dw-rockchip.c:491:undefined reference to `pci_epc_init_notify'
  2024-06-27  8:33 ` Niklas Cassel
@ 2024-06-27  8:51   ` Niklas Cassel
  2024-06-28  0:27     ` Krzysztof Wilczyński
  0 siblings, 1 reply; 4+ messages in thread
From: Niklas Cassel @ 2024-06-27  8:51 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-pci, Krzysztof Wilczyński

On Thu, Jun 27, 2024 at 10:33:24AM +0200, Niklas Cassel wrote:
> 
> Perhaps the smartest thing right now is to just recreate the
> pci/controller/rockchip branch, by:
> 1) reset the rockchip branch to v6.10-rc1
> 2) merge the pci/controller/dwc branch to the rockchip branch
> 3) merge the pci/endpoint branch to to the rockchip branch
> 4) pick all the patches that are currently on the pci/controller/rockchip
> 5) squash: 246afbe0f6fc ("PCI: dw-rockchip: Use pci_epc_init_notify() directly")
>    into the commit that adds dw-rockchip endpoint mode support
>    (9b2ba393b3a6 ("PCI: dw-rockchip: Add endpoint mode support"))
> 6) squash: https://lore.kernel.org/linux-pci/20240626191325.4074794-2-cassel@kernel.org/
>    into the commit that adds dw-rockchip endpoint mode support
>    (9b2ba393b3a6 ("PCI: dw-rockchip: Add endpoint mode support"))
> 
> 
> This way:
> - All commits will build as individual patches, so no build errors from the
>   test robot (even when it builds a patch that is in the middle (e.g. 10/11)).
> - Even if futher commits are applied to pci/controller/dwc or pci/endpoint,
>   we will not depend on any newly applied patches to these branches, so there
>   will be no need to "re-merge" the branches to the rockchip branch.

The end result would look like this:
https://github.com/floatious/linux/commits/dw-rockchip-remerge-example/

(Just in case you want to git diff to see that we did the same thing...)


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pci:controller/rockchip 11/11] drivers/pci/controller/dwc/pcie-dw-rockchip.c:491:undefined reference to `pci_epc_init_notify'
  2024-06-27  8:51   ` Niklas Cassel
@ 2024-06-28  0:27     ` Krzysztof Wilczyński
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Wilczyński @ 2024-06-28  0:27 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: kernel test robot, oe-kbuild-all, linux-pci

Hello,

> > Perhaps the smartest thing right now is to just recreate the
> > pci/controller/rockchip branch, by:
> > 1) reset the rockchip branch to v6.10-rc1
> > 2) merge the pci/controller/dwc branch to the rockchip branch
> > 3) merge the pci/endpoint branch to to the rockchip branch
> > 4) pick all the patches that are currently on the pci/controller/rockchip
> > 5) squash: 246afbe0f6fc ("PCI: dw-rockchip: Use pci_epc_init_notify() directly")
> >    into the commit that adds dw-rockchip endpoint mode support
> >    (9b2ba393b3a6 ("PCI: dw-rockchip: Add endpoint mode support"))
> > 6) squash: https://lore.kernel.org/linux-pci/20240626191325.4074794-2-cassel@kernel.org/
> >    into the commit that adds dw-rockchip endpoint mode support
> >    (9b2ba393b3a6 ("PCI: dw-rockchip: Add endpoint mode support"))
> > 
> > 
> > This way:
> > - All commits will build as individual patches, so no build errors from the
> >   test robot (even when it builds a patch that is in the middle (e.g. 10/11)).
> > - Even if futher commits are applied to pci/controller/dwc or pci/endpoint,
> >   we will not depend on any newly applied patches to these branches, so there
> >   will be no need to "re-merge" the branches to the rockchip branch.
> 
> The end result would look like this:
> https://github.com/floatious/linux/commits/dw-rockchip-remerge-example/
> 
> (Just in case you want to git diff to see that we did the same thing...)

Thank you for this!

I did some work on the branch with an aim to fix the issues bot kindly
reported to us, a bit before I saw your message.  Hopfully, I got things
right this time, and if not, then I will apply your steps/suggestion.

	Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-28  0:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26 23:54 [pci:controller/rockchip 11/11] drivers/pci/controller/dwc/pcie-dw-rockchip.c:491:undefined reference to `pci_epc_init_notify' kernel test robot
2024-06-27  8:33 ` Niklas Cassel
2024-06-27  8:51   ` Niklas Cassel
2024-06-28  0:27     ` Krzysztof Wilczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox