diff options
Diffstat (limited to 'include/asm-i386/pgtable.h')
-rw-r--r-- | include/asm-i386/pgtable.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index e6a4723f0eb1..c3b58d473a55 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -263,6 +263,7 @@ static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return p | |||
263 | */ | 263 | */ |
264 | #define pte_update(mm, addr, ptep) do { } while (0) | 264 | #define pte_update(mm, addr, ptep) do { } while (0) |
265 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | 265 | #define pte_update_defer(mm, addr, ptep) do { } while (0) |
266 | #define paravirt_map_pt_hook(slot, va, pfn) do { } while (0) | ||
266 | #endif | 267 | #endif |
267 | 268 | ||
268 | /* | 269 | /* |
@@ -469,10 +470,24 @@ extern pte_t *lookup_address(unsigned long address); | |||
469 | #endif | 470 | #endif |
470 | 471 | ||
471 | #if defined(CONFIG_HIGHPTE) | 472 | #if defined(CONFIG_HIGHPTE) |
472 | #define pte_offset_map(dir, address) \ | 473 | #define pte_offset_map(dir, address) \ |
473 | ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address)) | 474 | ({ \ |
474 | #define pte_offset_map_nested(dir, address) \ | 475 | pte_t *__ptep; \ |
475 | ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address)) | 476 | unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT; \ |
477 | __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE0);\ | ||
478 | paravirt_map_pt_hook(KM_PTE0,__ptep, pfn); \ | ||
479 | __ptep = __ptep + pte_index(address); \ | ||
480 | __ptep; \ | ||
481 | }) | ||
482 | #define pte_offset_map_nested(dir, address) \ | ||
483 | ({ \ | ||
484 | pte_t *__ptep; \ | ||
485 | unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT; \ | ||
486 | __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE1);\ | ||
487 | paravirt_map_pt_hook(KM_PTE1,__ptep, pfn); \ | ||
488 | __ptep = __ptep + pte_index(address); \ | ||
489 | __ptep; \ | ||
490 | }) | ||
476 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) | 491 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) |
477 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) | 492 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) |
478 | #else | 493 | #else |