Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: Expose missing pci_io{map,unmap} declarations
Date: Thu, 27 Jun 2013 15:58:40 +0200	[thread overview]
Message-ID: <20130627135840.GA10727@linux-mips.org> (raw)
In-Reply-To: <1371460140-5626-1-git-send-email-markos.chandras@imgtec.com>

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@imgtec.com>
> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> 

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 */

  parent reply	other threads:[~2013-06-27 13:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17  9:09 [PATCH] MIPS: Expose missing pci_io{map,unmap} declarations Markos Chandras
2013-06-17  9:09 ` Markos Chandras
2013-06-27 13:58 ` Ralf Baechle [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-06-17  8:09 Markos Chandras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130627135840.GA10727@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=markos.chandras@imgtec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox