aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-02-19 21:35:22 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-04-16 16:00:14 +0900
commitef339f241b08a16af58897e6288ba200e0c7a8c7 (patch)
tree6e9984ccbccc87017c3beb97567002926b5ae549 /arch/sh/mm
parentsh: add io_base member to pci_channel (diff)
downloadlinux-dev-ef339f241b08a16af58897e6288ba200e0c7a8c7.tar.xz
linux-dev-ef339f241b08a16af58897e6288ba200e0c7a8c7.zip
sh: pci memory range checking code
This patch changes the code to use __is_pci_memory() instead of is_pci_memaddr(). __is_pci_memory() loops through all the pci channels on the system to match memory windows. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r--arch/sh/mm/ioremap_32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/mm/ioremap_32.c b/arch/sh/mm/ioremap_32.c
index 60cc486d2c2c..7e04cc8f3b9b 100644
--- a/arch/sh/mm/ioremap_32.c
+++ b/arch/sh/mm/ioremap_32.c
@@ -56,7 +56,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
* P1/P2 space, ioremap() will already do the right thing,
* and we'll never get this far.
*/
- if (is_pci_memaddr(phys_addr) && is_pci_memaddr(last_addr))
+ if (__is_pci_memory(phys_addr, size))
return (void __iomem *)phys_addr;
#if !defined(CONFIG_PMB_FIXED)
@@ -121,7 +121,7 @@ void __iounmap(void __iomem *addr)
unsigned long seg = PXSEG(vaddr);
struct vm_struct *p;
- if (seg < P3SEG || vaddr >= P3_ADDR_MAX || is_pci_memaddr(vaddr))
+ if (seg < P3SEG || vaddr >= P3_ADDR_MAX || __is_pci_memory(vaddr, 0))
return;
#ifdef CONFIG_PMB