[ARM] mm 6: allow mem_types table to specify extended pte attributes
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sat, 21 Apr 2007 09:52:32 +0000 (10:52 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 21 Apr 2007 19:36:02 +0000 (20:36 +0100)
Add prot_pte_ext to the mem_types table to allow the extended pte
attributes to be passed to set_pte_ext(), thereby permitting us to
specify memory type information for the hardware PTE entries.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/ioremap.c
arch/arm/mm/mm.h
arch/arm/mm/mmu.c

index b26b36109d541c8d548fde4dca8e094ed533fe84..216623eece352d45da46230b492960ccdef54f5c 100644 (file)
@@ -55,7 +55,8 @@ static int remap_area_pte(pmd_t *pmd, unsigned long addr, unsigned long end,
                if (!pte_none(*pte))
                        goto bad;
 
-               set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot), 0);
+               set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot),
+                           type->prot_pte_ext);
                phys_addr += PAGE_SIZE;
        } while (pte++, addr += PAGE_SIZE, addr != end);
        return 0;
index 66f8612c5e5b9cdbab3127013b65a16c0a264d2e..7647c597fc597ce82b5c08c587ca4b1f1c7b9724 100644 (file)
@@ -18,6 +18,7 @@ static inline pmd_t *pmd_off_k(unsigned long virt)
 
 struct mem_type {
        unsigned int prot_pte;
+       unsigned int prot_pte_ext;
        unsigned int prot_l1;
        unsigned int prot_sect;
        unsigned int domain;
index 6cb80b4973d2db0db22021d043d71b49b136991d..360405515bbdd0197809eb77e9132acc84d30a03 100644 (file)
@@ -391,7 +391,8 @@ static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr,
 
        pte = pte_offset_kernel(pmd, addr);
        do {
-               set_pte_ext(pte, pfn_pte(pfn, __pgprot(type->prot_pte)), 0);
+               set_pte_ext(pte, pfn_pte(pfn, __pgprot(type->prot_pte)),
+                           type->prot_pte_ext);
                pfn++;
        } while (pte++, addr += PAGE_SIZE, addr != end);
 }