diff options
Diffstat (limited to 'arch/sh/mm/ioremap_32.c')
-rw-r--r-- | arch/sh/mm/ioremap_32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/mm/ioremap_32.c b/arch/sh/mm/ioremap_32.c index 8dc77026a0b5..60cc486d2c2c 100644 --- a/arch/sh/mm/ioremap_32.c +++ b/arch/sh/mm/ioremap_32.c | |||
@@ -59,11 +59,13 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
59 | if (is_pci_memaddr(phys_addr) && is_pci_memaddr(last_addr)) | 59 | if (is_pci_memaddr(phys_addr) && is_pci_memaddr(last_addr)) |
60 | return (void __iomem *)phys_addr; | 60 | return (void __iomem *)phys_addr; |
61 | 61 | ||
62 | #if !defined(CONFIG_PMB_FIXED) | ||
62 | /* | 63 | /* |
63 | * Don't allow anybody to remap normal RAM that we're using.. | 64 | * Don't allow anybody to remap normal RAM that we're using.. |
64 | */ | 65 | */ |
65 | if (phys_addr < virt_to_phys(high_memory)) | 66 | if (phys_addr < virt_to_phys(high_memory)) |
66 | return NULL; | 67 | return NULL; |
68 | #endif | ||
67 | 69 | ||
68 | /* | 70 | /* |
69 | * Mappings have to be page-aligned | 71 | * Mappings have to be page-aligned |
@@ -81,7 +83,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
81 | area->phys_addr = phys_addr; | 83 | area->phys_addr = phys_addr; |
82 | orig_addr = addr = (unsigned long)area->addr; | 84 | orig_addr = addr = (unsigned long)area->addr; |
83 | 85 | ||
84 | #ifdef CONFIG_32BIT | 86 | #ifdef CONFIG_PMB |
85 | /* | 87 | /* |
86 | * First try to remap through the PMB once a valid VMA has been | 88 | * First try to remap through the PMB once a valid VMA has been |
87 | * established. Smaller allocations (or the rest of the size | 89 | * established. Smaller allocations (or the rest of the size |
@@ -122,7 +124,7 @@ void __iounmap(void __iomem *addr) | |||
122 | if (seg < P3SEG || vaddr >= P3_ADDR_MAX || is_pci_memaddr(vaddr)) | 124 | if (seg < P3SEG || vaddr >= P3_ADDR_MAX || is_pci_memaddr(vaddr)) |
123 | return; | 125 | return; |
124 | 126 | ||
125 | #ifdef CONFIG_32BIT | 127 | #ifdef CONFIG_PMB |
126 | /* | 128 | /* |
127 | * Purge any PMB entries that may have been established for this | 129 | * Purge any PMB entries that may have been established for this |
128 | * mapping, then proceed with conventional VMA teardown. | 130 | * mapping, then proceed with conventional VMA teardown. |