]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/mm: Use a helper for finding pte bits mapping I/O area
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 29 Apr 2016 13:25:37 +0000 (23:25 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 1 May 2016 08:32:32 +0000 (18:32 +1000)
Use a helper instead of open coding with constants. A later patch will
drop the WIMG bits and use PowerISA 3.0 defines.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/btext.c
arch/powerpc/kernel/isa-bridge.c
arch/powerpc/kernel/pci_64.c
arch/powerpc/mm/pgtable_64.c
arch/powerpc/platforms/ps3/spu.c
drivers/pcmcia/electra_cf.c

index 41c011cb60706638145534514195741f27f65e1a..8275858a434d9fc2fe9ad8ba8700ac46b1e80125 100644 (file)
@@ -162,7 +162,7 @@ void btext_map(void)
        offset = ((unsigned long) dispDeviceBase) - base;
        size = dispDeviceRowBytes * dispDeviceRect[3] + offset
                + dispDeviceRect[0];
-       vbase = __ioremap(base, size, _PAGE_NO_CACHE);
+       vbase = __ioremap(base, size, pgprot_val(pgprot_noncached_wc(__pgprot(0))));
        if (vbase == 0)
                return;
        logicalDisplayBase = vbase + offset;
index 0f19970979608208b385aa0606c5461747673238..ae1316106e2b59ac7de6803982b3751b8afa8918 100644 (file)
@@ -109,14 +109,14 @@ static void pci_process_ISA_OF_ranges(struct device_node *isa_node,
                size = 0x10000;
 
        __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
-                    size, _PAGE_NO_CACHE|_PAGE_GUARDED);
+                    size, pgprot_val(pgprot_noncached(__pgprot(0))));
        return;
 
 inval_range:
        printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
               "mapping 64k\n");
        __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
-                    0x10000, _PAGE_NO_CACHE|_PAGE_GUARDED);
+                    0x10000, pgprot_val(pgprot_noncached(__pgprot(0))));
 }
 
 
index 60bb187cb46ac0cc64c67a4f19fb1687492a25f1..41503d7d53a1350364d256e43456c9d6c96885b2 100644 (file)
@@ -159,7 +159,7 @@ static int pcibios_map_phb_io_space(struct pci_controller *hose)
 
        /* Establish the mapping */
        if (__ioremap_at(phys_page, area->addr, size_page,
-                        _PAGE_NO_CACHE | _PAGE_GUARDED) == NULL)
+                        pgprot_val(pgprot_noncached(__pgprot(0)))) == NULL)
                return -ENOMEM;
 
        /* Fixup hose IO resource */
index 9e0553eafcb7043a16a9f79fafeb22137175409d..ea60a24c17a635b911ef67d489704410b832fd7f 100644 (file)
@@ -253,7 +253,7 @@ void __iomem * __ioremap(phys_addr_t addr, unsigned long size,
 
 void __iomem * ioremap(phys_addr_t addr, unsigned long size)
 {
-       unsigned long flags = _PAGE_NO_CACHE | _PAGE_GUARDED;
+       unsigned long flags = pgprot_val(pgprot_noncached(__pgprot(0)));
        void *caller = __builtin_return_address(0);
 
        if (ppc_md.ioremap)
@@ -263,7 +263,7 @@ void __iomem * ioremap(phys_addr_t addr, unsigned long size)
 
 void __iomem * ioremap_wc(phys_addr_t addr, unsigned long size)
 {
-       unsigned long flags = _PAGE_NO_CACHE;
+       unsigned long flags = pgprot_val(pgprot_noncached_wc(__pgprot(0)));
        void *caller = __builtin_return_address(0);
 
        if (ppc_md.ioremap)
index 5e8a40f9739f914851bb33030acbd635757f2802..492b2575e0d2e7048dc52df2a67ea985234c944a 100644 (file)
@@ -216,7 +216,7 @@ static int __init setup_areas(struct spu *spu)
        }
 
        spu->local_store = (__force void *)ioremap_prot(spu->local_store_phys,
-               LS_SIZE, _PAGE_NO_CACHE);
+               LS_SIZE, pgprot_val(pgprot_noncached_wc(__pgprot(0))));
 
        if (!spu->local_store) {
                pr_debug("%s:%d: ioremap local_store failed\n",
index 61cf61ac621ebc8d253dd59afc36eda535378a67..4d7bc3f4124a58110c4573337f37499efa63f188 100644 (file)
@@ -228,7 +228,7 @@ static int electra_cf_probe(struct platform_device *ofdev)
 
        if (!cf->mem_base || !cf->io_virt || !cf->gpio_base ||
            (__ioremap_at(io.start, cf->io_virt, cf->io_size,
-               _PAGE_NO_CACHE | _PAGE_GUARDED) == NULL)) {
+                 pgprot_val(pgprot_noncached(__pgprot(0)))) == NULL)) {
                dev_err(device, "can't ioremap ranges\n");
                status = -ENOMEM;
                goto fail1;