linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-pci@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Bjorn Helgaas <bhelgaas@google.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	George Cherian <george.cherian@marvell.com>,
	Yang Yingliang <yangyingliang@huawei.com>
Subject: [PATCH 1/2] sparc32: Move ioremap/iounmap declaration before asm-generic/io.h include
Date: Tue, 15 Sep 2020 10:32:02 +0100	[thread overview]
Message-ID: <20200915093203.16934-2-lorenzo.pieralisi@arm.com> (raw)
In-Reply-To: <20200915093203.16934-1-lorenzo.pieralisi@arm.com>

Move the ioremap/iounmap declaration before asm-generic/io.h is
included so that it is visible within it.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: "David S. Miller" <davem@davemloft.net>
---
 arch/sparc/include/asm/io_32.h | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h
index 9a52d9506f80..042201c79ad1 100644
--- a/arch/sparc/include/asm/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
@@ -11,6 +11,16 @@
 #define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz)
 #define memcpy_toio(d,s,sz)   _memcpy_toio(d,s,sz)
 
+#ifdef __KERNEL__
+
+/*
+ * Bus number may be embedded in the higher bits of the physical address.
+ * This is why we have no bus number argument to ioremap().
+ */
+void __iomem *ioremap(phys_addr_t offset, size_t size);
+void iounmap(volatile void __iomem *addr);
+#endif
+
 #include <asm-generic/io.h>
 
 static inline void _memset_io(volatile void __iomem *dst,
@@ -123,12 +133,6 @@ static inline void sbus_memcpy_toio(volatile void __iomem *dst,
 
 #ifdef __KERNEL__
 
-/*
- * Bus number may be embedded in the higher bits of the physical address.
- * This is why we have no bus number argument to ioremap().
- */
-void __iomem *ioremap(phys_addr_t offset, size_t size);
-void iounmap(volatile void __iomem *addr);
 /* Create a virtual mapping cookie for an IO port range */
 void __iomem *ioport_map(unsigned long port, unsigned int nr);
 void ioport_unmap(void __iomem *);
-- 
2.26.1


  reply	other threads:[~2020-09-15  9:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15  9:32 [PATCH 0/2] Fix pci_iounmap() on !CONFIG_GENERIC_IOMAP Lorenzo Pieralisi
2020-09-15  9:32 ` Lorenzo Pieralisi [this message]
2020-09-15 14:14   ` [PATCH 1/2] sparc32: Move ioremap/iounmap declaration before asm-generic/io.h include Christoph Hellwig
2020-09-15 14:54     ` Lorenzo Pieralisi
2020-09-15 20:11   ` David Miller
2020-10-02 14:50     ` Lorenzo Pieralisi
2020-10-02 22:44       ` David Miller
2020-09-15  9:32 ` [PATCH 2/2] asm-generic/io.h: Fix !CONFIG_GENERIC_IOMAP pci_iounmap() implementation Lorenzo Pieralisi
2020-09-16 11:06 ` [PATCH v2 0/3] Fix pci_iounmap() on !CONFIG_GENERIC_IOMAP Lorenzo Pieralisi
2020-09-16 11:06   ` [PATCH v2 1/3] sparc32: Remove useless io_32.h __KERNEL__ preprocessor guard Lorenzo Pieralisi
2020-09-16 11:06   ` [PATCH v2 2/3] sparc32: Move ioremap/iounmap declaration before asm-generic/io.h include Lorenzo Pieralisi
2020-09-16 11:06   ` [PATCH v2 3/3] asm-generic/io.h: Fix !CONFIG_GENERIC_IOMAP pci_iounmap() implementation Lorenzo Pieralisi
2020-09-16 14:51     ` Catalin Marinas
2020-09-17  9:29       ` Lorenzo Pieralisi
2020-09-18 11:45   ` [PATCH v2 0/3] Fix pci_iounmap() on !CONFIG_GENERIC_IOMAP Lorenzo Pieralisi
2020-09-18 19:58     ` Arnd Bergmann
2020-09-28  9:31       ` Lorenzo Pieralisi

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=20200915093203.16934-2-lorenzo.pieralisi@arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=george.cherian@marvell.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=will@kernel.org \
    --cc=yangyingliang@huawei.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;
as well as URLs for NNTP newsgroup(s).