Re: [PATCH] MIPS: Expose missing pci_io{map,unmap} declarations

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

 



On Mon, Jun 17, 2013 at 10:09:00AM +0100, Markos Chandras wrote:

> The GENERIC_PCI_IOMAP does not depend on CONFIG_PCI so move
> it to the CONFIG_MIPS symbol so it's always selected for MIPS.
> This fixes the missing pci_iomap declaration for MIPS.
> Moreover, the pci_iounmap function was not defined in the
> io.h header file if the CONFIG_PCI symbol is not set,
> but it should since MIPS is not using CONFIG_GENERIC_IOMAP.
> 
> This fixes the following problem on a allyesconfig:
> 
> drivers/net/ethernet/3com/3c59x.c:1031:2: error: implicit declaration of
> function 'pci_iomap' [-Werror=implicit-function-declaration]
> drivers/net/ethernet/3com/3c59x.c:1044:3: error: implicit declaration of
> function 'pci_iounmap' [-Werror=implicit-function-declaration]
> 
> Signed-off-by: Markos Chandras <markos.chandras@xxxxxxxxxx>
> Acked-by: Steven J. Hill <Steven.Hill@xxxxxxxxxx> 

Hmm...  Looking at the code I find that it appears that GENERIC_PCI_IOMAP
was never really meant to be enabled with PCI (though some architectures
are using that) so I was wondering if maybe something like below would
have been better.  Either way, you sent the first patch, so I'm applying
that one.

Thanks!

  Ralf

 arch/mips/include/asm/io.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index b7e5985..dc81131 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -620,4 +620,17 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
  */
 #define xlate_dev_kmem_ptr(p)	p
 
+#ifndef CONFIG_PCI
+struct pci_dev;
+
+static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar,
+	unsigned long max)
+{
+	return NULL;
+}
+
+static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {}
+
+#endif /* CONFIG_PCI */
+
 #endif /* _ASM_IO_H */


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux