diff options
| author | Jeff Dike <jdike@addtoit.com> | 2008-02-05 01:31:06 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:29 -0500 |
| commit | 909e90d3c410b684e564729145f7c20dad887757 (patch) | |
| tree | 31c4e5ade894f185a7eeb04ce7023cb7da6b9277 /include/asm-um | |
| parent | 1adfd6095e1c654dce5a692db5aa5a2b2a8d6b0d (diff) | |
uml: 64-bit tlb fixes
Some 64-bit tlb fixes -
moved pmd_page_vaddr to pgtable.h since it's the same for both
2-level and 3-level page tables
fixed a bogus cast on pud_page_vaddr
made the address checking in update_*_range more careful
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-um')
| -rw-r--r-- | include/asm-um/pgtable-2level.h | 3 | ||||
| -rw-r--r-- | include/asm-um/pgtable-3level.h | 3 | ||||
| -rw-r--r-- | include/asm-um/pgtable.h | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/include/asm-um/pgtable-2level.h b/include/asm-um/pgtable-2level.h index 172a75fde51..f534b73e753 100644 --- a/include/asm-um/pgtable-2level.h +++ b/include/asm-um/pgtable-2level.h | |||
| @@ -41,9 +41,6 @@ static inline void pgd_mkuptodate(pgd_t pgd) { } | |||
| 41 | #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) | 41 | #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) |
| 42 | #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) | 42 | #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) |
| 43 | 43 | ||
| 44 | #define pmd_page_vaddr(pmd) \ | ||
| 45 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | ||
| 46 | |||
| 47 | /* | 44 | /* |
| 48 | * Bits 0 through 4 are taken | 45 | * Bits 0 through 4 are taken |
| 49 | */ | 46 | */ |
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h index 48f8f5d96d2..0446f456b42 100644 --- a/include/asm-um/pgtable-3level.h +++ b/include/asm-um/pgtable-3level.h | |||
| @@ -87,8 +87,7 @@ static inline void pud_clear (pud_t *pud) | |||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | #define pud_page(pud) phys_to_page(pud_val(pud) & PAGE_MASK) | 89 | #define pud_page(pud) phys_to_page(pud_val(pud) & PAGE_MASK) |
| 90 | #define pud_page_vaddr(pud) \ | 90 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PAGE_MASK)) |
| 91 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) | ||
| 92 | 91 | ||
| 93 | /* Find an entry in the second-level page table.. */ | 92 | /* Find an entry in the second-level page table.. */ |
| 94 | #define pmd_offset(pud, address) ((pmd_t *) pud_page_vaddr(*(pud)) + \ | 93 | #define pmd_offset(pud, address) ((pmd_t *) pud_page_vaddr(*(pud)) + \ |
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index fb477774a2e..4102b443e92 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
| @@ -308,6 +308,9 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
| 308 | #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | 308 | #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) |
| 309 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) | 309 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) |
| 310 | 310 | ||
| 311 | #define pmd_page_vaddr(pmd) \ | ||
| 312 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | ||
| 313 | |||
| 311 | /* | 314 | /* |
| 312 | * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE] | 315 | * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE] |
| 313 | * | 316 | * |
