Re: linux-next: build failure after merge of the staging tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stephen,

[+cc Thomas Bogendoerfer as mips maintainer]

On Fri, Oct 8, 2021 at 6:15 AM Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> Hi all,
>
> After merging the staging tree, today's linux-next build (mips
> nlm_xlp_defconfig) failed like this:
>
> drivers/pci/pci.c:4210: undefined reference to `pci_remap_iospace'
>
> Caused by commit
>
>   9f76779f2418 ("MIPS: implement architecture-specific 'pci_remap_iospace()'")
>
> CONFIG_PCI_DRIVERS_GENERIC is not set for this build, so
> arch/mips/pci/pci-generic.c is not built.

I don't know what should be the correct fix for this.
'pci_remap_iospace' for mips is added in 'pci-generic.c' which in only
compiled when 'CONFIG_PCI_DRIVERS_GENERIC' is selected. In mips there
is also 'CONFIG_PCI_DRIVERS_LEGACY' option that include 'pci-legacy.c'
and drivers in 'arch/mips/pci' are normally defining this
'CONFIG_PCI_DRIVERS_LEGACY'. For the failing build
mips_nlm_xlp_defconfig, none of them are defined and code (I guess
./arch/mips/pci/pci-xlp.c) is just initializing PCI calling
'pcibios_init' and not using PCI core apis and 'pci_remap_iospace' at
all like other drivers inside 'arch/mips/pci'. So I think the correct
thing to do would be just move this mips architecture dependent define
to be dependant of CONFIG_PCI_DRIVERS_GENERIC. The following patch
would be enough:

diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h
index 35270984a5f0..421231f55935 100644
--- a/arch/mips/include/asm/pci.h
+++ b/arch/mips/include/asm/pci.h
@@ -20,7 +20,9 @@
 #include <linux/list.h>
 #include <linux/of.h>

+#ifdef CONFIG_PCI_DRIVERS_GENERIC
 #define pci_remap_iospace pci_remap_iospace
+#endif

 #ifdef CONFIG_PCI_DRIVERS_LEGACY

Thomas, if you are ok with this, let me know and I'll send this patch
to be added to staging tree for fixing this issue.

Best regards,
    Sergio Paracuellos

>
> --
> Cheers,
> Stephen Rothwell



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux