Skip to content

Commit

Permalink
[ARM] mm 6: allow mem_types table to specify extended pte attributes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Russell King committed Apr 21, 2007
1 parent b29e9f5 commit c172cc9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion arch/arm/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mm/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c172cc9

Please sign in to comment.