From: Thierry Reding <thierry.reding@gmail.com>
To: Russell King <linux@arm.linux.org.uk>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Jason Cooper <jason@lakedaemon.net>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
Thierry Reding <treding@nvidia.com>
Subject: [RFC 1/3] ARM: Allow unmapping of fixed PCI I/O mappings
Date: Tue, 13 Aug 2013 13:12:24 +0200 [thread overview]
Message-ID: <1376392346-14127-2-git-send-email-treding@nvidia.com> (raw)
In-Reply-To: <1376392346-14127-1-git-send-email-treding@nvidia.com>
The new pci_iounmap_io() function can be used to unmap a fixed PCI I/O
mapping as established by pci_ioremap_io(). This will be useful to
support unbinding of PCI host drivers.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
arch/arm/include/asm/io.h | 1 +
arch/arm/mm/ioremap.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index d070741..80c3826 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -172,6 +172,7 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
#define PCI_IO_VIRT_BASE 0xfee00000
extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr);
+extern void pci_iounmap_io(unsigned int offset);
/*
* Now, pick up the machine-defined IO definitions
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index f123d6e..c7504c9 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -448,4 +448,10 @@ int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
__pgprot(get_mem_type(MT_DEVICE)->prot_pte));
}
EXPORT_SYMBOL_GPL(pci_ioremap_io);
+
+void pci_iounmap_io(unsigned int offset)
+{
+ unmap_kernel_range(PCI_IO_VIRT_BASE + offset, SZ_64K);
+}
+EXPORT_SYMBOL_GPL(pci_iounmap_io);
#endif
--
1.8.3.4
next prev parent reply other threads:[~2013-08-13 11:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 11:12 [RFC 0/3] ARM: Allow PCI host drivers to be unloaded Thierry Reding
2013-08-13 11:12 ` Thierry Reding [this message]
2013-08-13 11:12 ` [RFC 2/3] ARM: Introduce pci_common_exit() Thierry Reding
2013-08-13 11:12 ` [RFC 3/3] PCI: tegra: Support driver unbinding Thierry Reding
[not found] ` <1376392346-14127-4-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-08-14 21:43 ` Stephen Warren
2013-08-15 10:34 ` Thierry Reding
2013-08-15 15:21 ` Stephen Warren
2013-08-19 20:16 ` Thierry Reding
2013-08-19 20:55 ` Stephen Warren
[not found] ` <52128650.7090009-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-08-19 21:52 ` Thierry Reding
2013-08-19 21:59 ` Stephen Warren
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=1376392346-14127-2-git-send-email-treding@nvidia.com \
--to=thierry.reding@gmail.com \
--cc=bhelgaas@google.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sebastian.hesselbarth@gmail.com \
--cc=swarren@wwwdotorg.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=treding@nvidia.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