aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/io.h12
-rw-r--r--arch/powerpc/lib/devres.c6
-rw-r--r--arch/powerpc/mm/pgtable_32.c4
-rw-r--r--arch/powerpc/mm/pgtable_64.c4
-rw-r--r--arch/powerpc/platforms/ps3/spu.c4
-rw-r--r--arch/powerpc/sysdev/axonram.c2
-rw-r--r--arch/powerpc/sysdev/fsl_85xx_cache_sram.c4
7 files changed, 17 insertions, 19 deletions
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 662d2edae768..45698d55cd6a 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -624,9 +624,8 @@ static inline void iosync(void)
624 * * ioremap is the standard one and provides non-cacheable guarded mappings 624 * * ioremap is the standard one and provides non-cacheable guarded mappings
625 * and can be hooked by the platform via ppc_md 625 * and can be hooked by the platform via ppc_md
626 * 626 *
627 * * ioremap_flags allows to specify the page flags as an argument and can 627 * * ioremap_prot allows to specify the page flags as an argument and can
628 * also be hooked by the platform via ppc_md. ioremap_prot is the exact 628 * also be hooked by the platform via ppc_md.
629 * same thing as ioremap_flags.
630 * 629 *
631 * * ioremap_nocache is identical to ioremap 630 * * ioremap_nocache is identical to ioremap
632 * 631 *
@@ -639,7 +638,7 @@ static inline void iosync(void)
639 * currently be hooked. Must be page aligned. 638 * currently be hooked. Must be page aligned.
640 * 639 *
641 * * __ioremap is the low level implementation used by ioremap and 640 * * __ioremap is the low level implementation used by ioremap and
642 * ioremap_flags and cannot be hooked (but can be used by a hook on one 641 * ioremap_prot and cannot be hooked (but can be used by a hook on one
643 * of the previous ones) 642 * of the previous ones)
644 * 643 *
645 * * __ioremap_caller is the same as above but takes an explicit caller 644 * * __ioremap_caller is the same as above but takes an explicit caller
@@ -650,11 +649,10 @@ static inline void iosync(void)
650 * 649 *
651 */ 650 */
652extern void __iomem *ioremap(phys_addr_t address, unsigned long size); 651extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
653extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size, 652extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size,
654 unsigned long flags); 653 unsigned long flags);
655extern void __iomem *ioremap_wc(phys_addr_t address, unsigned long size); 654extern void __iomem *ioremap_wc(phys_addr_t address, unsigned long size);
656#define ioremap_nocache(addr, size) ioremap((addr), (size)) 655#define ioremap_nocache(addr, size) ioremap((addr), (size))
657#define ioremap_prot(addr, size, prot) ioremap_flags((addr), (size), (prot))
658 656
659extern void iounmap(volatile void __iomem *addr); 657extern void iounmap(volatile void __iomem *addr);
660 658
diff --git a/arch/powerpc/lib/devres.c b/arch/powerpc/lib/devres.c
index deac4d30daf4..e91615abae66 100644
--- a/arch/powerpc/lib/devres.c
+++ b/arch/powerpc/lib/devres.c
@@ -9,11 +9,11 @@
9 9
10#include <linux/device.h> /* devres_*(), devm_ioremap_release() */ 10#include <linux/device.h> /* devres_*(), devm_ioremap_release() */
11#include <linux/gfp.h> 11#include <linux/gfp.h>
12#include <linux/io.h> /* ioremap_flags() */ 12#include <linux/io.h> /* ioremap_prot() */
13#include <linux/module.h> /* EXPORT_SYMBOL() */ 13#include <linux/module.h> /* EXPORT_SYMBOL() */
14 14
15/** 15/**
16 * devm_ioremap_prot - Managed ioremap_flags() 16 * devm_ioremap_prot - Managed ioremap_prot()
17 * @dev: Generic device to remap IO address for 17 * @dev: Generic device to remap IO address for
18 * @offset: BUS offset to map 18 * @offset: BUS offset to map
19 * @size: Size of map 19 * @size: Size of map
@@ -31,7 +31,7 @@ void __iomem *devm_ioremap_prot(struct device *dev, resource_size_t offset,
31 if (!ptr) 31 if (!ptr)
32 return NULL; 32 return NULL;
33 33
34 addr = ioremap_flags(offset, size, flags); 34 addr = ioremap_prot(offset, size, flags);
35 if (addr) { 35 if (addr) {
36 *ptr = addr; 36 *ptr = addr;
37 devres_add(dev, ptr); 37 devres_add(dev, ptr);
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index fca98f8fb600..51f87956f8f8 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -141,7 +141,7 @@ ioremap_wc(phys_addr_t addr, unsigned long size)
141EXPORT_SYMBOL(ioremap_wc); 141EXPORT_SYMBOL(ioremap_wc);
142 142
143void __iomem * 143void __iomem *
144ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags) 144ioremap_prot(phys_addr_t addr, unsigned long size, unsigned long flags)
145{ 145{
146 /* writeable implies dirty for kernel addresses */ 146 /* writeable implies dirty for kernel addresses */
147 if (flags & _PAGE_RW) 147 if (flags & _PAGE_RW)
@@ -160,7 +160,7 @@ ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags)
160 160
161 return __ioremap_caller(addr, size, flags, __builtin_return_address(0)); 161 return __ioremap_caller(addr, size, flags, __builtin_return_address(0));
162} 162}
163EXPORT_SYMBOL(ioremap_flags); 163EXPORT_SYMBOL(ioremap_prot);
164 164
165void __iomem * 165void __iomem *
166__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) 166__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 1146fc6e8921..6e595f6496d4 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -265,7 +265,7 @@ void __iomem * ioremap_wc(phys_addr_t addr, unsigned long size)
265 return __ioremap_caller(addr, size, flags, caller); 265 return __ioremap_caller(addr, size, flags, caller);
266} 266}
267 267
268void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size, 268void __iomem * ioremap_prot(phys_addr_t addr, unsigned long size,
269 unsigned long flags) 269 unsigned long flags)
270{ 270{
271 void *caller = __builtin_return_address(0); 271 void *caller = __builtin_return_address(0);
@@ -322,7 +322,7 @@ void iounmap(volatile void __iomem *token)
322 322
323EXPORT_SYMBOL(ioremap); 323EXPORT_SYMBOL(ioremap);
324EXPORT_SYMBOL(ioremap_wc); 324EXPORT_SYMBOL(ioremap_wc);
325EXPORT_SYMBOL(ioremap_flags); 325EXPORT_SYMBOL(ioremap_prot);
326EXPORT_SYMBOL(__ioremap); 326EXPORT_SYMBOL(__ioremap);
327EXPORT_SYMBOL(__ioremap_at); 327EXPORT_SYMBOL(__ioremap_at);
328EXPORT_SYMBOL(iounmap); 328EXPORT_SYMBOL(iounmap);
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 39a472e9e80f..375a9f92158d 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -197,7 +197,7 @@ static void spu_unmap(struct spu *spu)
197 * The current HV requires the spu shadow regs to be mapped with the 197 * The current HV requires the spu shadow regs to be mapped with the
198 * PTE page protection bits set as read-only (PP=3). This implementation 198 * PTE page protection bits set as read-only (PP=3). This implementation
199 * uses the low level __ioremap() to bypass the page protection settings 199 * uses the low level __ioremap() to bypass the page protection settings
200 * inforced by ioremap_flags() to get the needed PTE bits set for the 200 * inforced by ioremap_prot() to get the needed PTE bits set for the
201 * shadow regs. 201 * shadow regs.
202 */ 202 */
203 203
@@ -214,7 +214,7 @@ static int __init setup_areas(struct spu *spu)
214 goto fail_ioremap; 214 goto fail_ioremap;
215 } 215 }
216 216
217 spu->local_store = (__force void *)ioremap_flags(spu->local_store_phys, 217 spu->local_store = (__force void *)ioremap_prot(spu->local_store_phys,
218 LS_SIZE, _PAGE_NO_CACHE); 218 LS_SIZE, _PAGE_NO_CACHE);
219 219
220 if (!spu->local_store) { 220 if (!spu->local_store) {
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 1636dd896707..bd0d54060b94 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -216,7 +216,7 @@ static int axon_ram_probe(struct platform_device *device)
216 AXON_RAM_DEVICE_NAME, axon_ram_bank_id, bank->size >> 20); 216 AXON_RAM_DEVICE_NAME, axon_ram_bank_id, bank->size >> 20);
217 217
218 bank->ph_addr = resource.start; 218 bank->ph_addr = resource.start;
219 bank->io_addr = (unsigned long) ioremap_flags( 219 bank->io_addr = (unsigned long) ioremap_prot(
220 bank->ph_addr, bank->size, _PAGE_NO_CACHE); 220 bank->ph_addr, bank->size, _PAGE_NO_CACHE);
221 if (bank->io_addr == 0) { 221 if (bank->io_addr == 0) {
222 dev_err(&device->dev, "ioremap() failed\n"); 222 dev_err(&device->dev, "ioremap() failed\n");
diff --git a/arch/powerpc/sysdev/fsl_85xx_cache_sram.c b/arch/powerpc/sysdev/fsl_85xx_cache_sram.c
index 54fb1922fe30..116415899176 100644
--- a/arch/powerpc/sysdev/fsl_85xx_cache_sram.c
+++ b/arch/powerpc/sysdev/fsl_85xx_cache_sram.c
@@ -106,10 +106,10 @@ int __init instantiate_cache_sram(struct platform_device *dev,
106 goto out_free; 106 goto out_free;
107 } 107 }
108 108
109 cache_sram->base_virt = ioremap_flags(cache_sram->base_phys, 109 cache_sram->base_virt = ioremap_prot(cache_sram->base_phys,
110 cache_sram->size, _PAGE_COHERENT | PAGE_KERNEL); 110 cache_sram->size, _PAGE_COHERENT | PAGE_KERNEL);
111 if (!cache_sram->base_virt) { 111 if (!cache_sram->base_virt) {
112 dev_err(&dev->dev, "%s: ioremap_flags failed\n", 112 dev_err(&dev->dev, "%s: ioremap_prot failed\n",
113 dev->dev.of_node->full_name); 113 dev->dev.of_node->full_name);
114 ret = -ENOMEM; 114 ret = -ENOMEM;
115 goto out_release; 115 goto out_release;