diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-12-13 09:34:43 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-12-13 09:34:43 -0500 |
commit | ad1ae2fe7fe68414ef29eab3c87b48841f8b72f2 (patch) | |
tree | f23fc22424f874c1295318904b273c08d00654ab /include/asm-arm/pgtable.h | |
parent | f06b97ffd1ed7a96d5022d52f795fba8483afb75 (diff) |
[ARM] Unuse another Linux PTE bit
L_PTE_ASID is not really required to be stored in every PTE, since we
can identify it via the address passed to set_pte_at(). So, create
set_pte_ext() which takes the address of the PTE to set, the Linux
PTE value, and the additional CPU PTE bits which aren't encoded in
the Linux PTE value.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/pgtable.h')
-rw-r--r-- | include/asm-arm/pgtable.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 88cd5c784ef0..b8cf2d5ec304 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <asm/memory.h> | 22 | #include <asm/memory.h> |
23 | #include <asm/arch/vmalloc.h> | 23 | #include <asm/arch/vmalloc.h> |
24 | #include <asm/pgtable-hwdef.h> | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * Just any arbitrary offset to the start of the vmalloc VM area: the | 27 | * Just any arbitrary offset to the start of the vmalloc VM area: the |
@@ -170,7 +171,6 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
170 | #define L_PTE_EXEC (1 << 6) | 171 | #define L_PTE_EXEC (1 << 6) |
171 | #define L_PTE_DIRTY (1 << 7) | 172 | #define L_PTE_DIRTY (1 << 7) |
172 | #define L_PTE_SHARED (1 << 10) /* shared(v6), coherent(xsc3) */ | 173 | #define L_PTE_SHARED (1 << 10) /* shared(v6), coherent(xsc3) */ |
173 | #define L_PTE_ASID (1 << 11) /* non-global (use ASID, v6) */ | ||
174 | 174 | ||
175 | #ifndef __ASSEMBLY__ | 175 | #ifndef __ASSEMBLY__ |
176 | 176 | ||
@@ -228,7 +228,7 @@ extern struct page *empty_zero_page; | |||
228 | #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) | 228 | #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) |
229 | 229 | ||
230 | #define pte_none(pte) (!pte_val(pte)) | 230 | #define pte_none(pte) (!pte_val(pte)) |
231 | #define pte_clear(mm,addr,ptep) set_pte_at((mm),(addr),(ptep), __pte(0)) | 231 | #define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0) |
232 | #define pte_page(pte) (pfn_to_page(pte_pfn(pte))) | 232 | #define pte_page(pte) (pfn_to_page(pte_pfn(pte))) |
233 | #define pte_offset_kernel(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) | 233 | #define pte_offset_kernel(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) |
234 | #define pte_offset_map(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) | 234 | #define pte_offset_map(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) |
@@ -236,8 +236,11 @@ extern struct page *empty_zero_page; | |||
236 | #define pte_unmap(pte) do { } while (0) | 236 | #define pte_unmap(pte) do { } while (0) |
237 | #define pte_unmap_nested(pte) do { } while (0) | 237 | #define pte_unmap_nested(pte) do { } while (0) |
238 | 238 | ||
239 | #define set_pte(ptep, pte) cpu_set_pte(ptep,pte) | 239 | #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext) |
240 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | 240 | |
241 | #define set_pte_at(mm,addr,ptep,pteval) do { \ | ||
242 | set_pte_ext(ptep, pteval, (addr) >= PAGE_OFFSET ? 0 : PTE_EXT_NG); \ | ||
243 | } while (0) | ||
241 | 244 | ||
242 | /* | 245 | /* |
243 | * The following only work if pte_present() is true. | 246 | * The following only work if pte_present() is true. |