aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-02-19 07:35:22 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-04-16 03:00:14 -0400
commitef339f241b08a16af58897e6288ba200e0c7a8c7 (patch)
tree6e9984ccbccc87017c3beb97567002926b5ae549 /arch/sh/mm
parentef53fdeb7e0cb139aff33665635b886700137abb (diff)
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,
56 * P1/P2 space, ioremap() will already do the right thing, 56 * P1/P2 space, ioremap() will already do the right thing,
57 * and we'll never get this far. 57 * and we'll never get this far.
58 */ 58 */
59 if (is_pci_memaddr(phys_addr) && is_pci_memaddr(last_addr)) 59 if (__is_pci_memory(phys_addr, size))
60 return (void __iomem *)phys_addr; 60 return (void __iomem *)phys_addr;
61 61
62#if !defined(CONFIG_PMB_FIXED) 62#if !defined(CONFIG_PMB_FIXED)
@@ -121,7 +121,7 @@ void __iounmap(void __iomem *addr)
121 unsigned long seg = PXSEG(vaddr); 121 unsigned long seg = PXSEG(vaddr);
122 struct vm_struct *p; 122 struct vm_struct *p;
123 123
124 if (seg < P3SEG || vaddr >= P3_ADDR_MAX || is_pci_memaddr(vaddr)) 124 if (seg < P3SEG || vaddr >= P3_ADDR_MAX || __is_pci_memory(vaddr, 0))
125 return; 125 return;
126 126
127#ifdef CONFIG_PMB 127#ifdef CONFIG_PMB