summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Piggin <nickpiggin@yahoo.com.au>2004-12-31 22:01:54 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2004-12-31 22:01:54 -0800
commit63e6b85474d3baedca6f90cd490f4734eb48dc62 (patch)
tree0bd991a78092808e97d68671d64fc41c7d9e40a0 /include
parenta85729c955e74f034dd098576aa9648690c788a6 (diff)
[PATCH] convert ia64 to generic nopud header
Convert ia64 architecture over to handle 4 level pagetables. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/pgalloc.h5
-rw-r--r--include/asm-ia64/pgtable.h16
-rw-r--r--include/asm-ia64/tlb.h6
3 files changed, 16 insertions, 11 deletions
diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h
index 973316828f02..2bd68d4aa77c 100644
--- a/include/asm-ia64/pgalloc.h
+++ b/include/asm-ia64/pgalloc.h
@@ -79,12 +79,11 @@ pgd_free (pgd_t *pgd)
}
static inline void
-pgd_populate (struct mm_struct *mm, pgd_t *pgd_entry, pmd_t *pmd)
+pud_populate (struct mm_struct *mm, pud_t *pud_entry, pmd_t *pmd)
{
- pgd_val(*pgd_entry) = __pa(pmd);
+ pud_val(*pud_entry) = __pa(pmd);
}
-
static inline pmd_t*
pmd_alloc_one_fast (struct mm_struct *mm, unsigned long addr)
{
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index 443cbaa863c0..304b0494294b 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -1,8 +1,6 @@
#ifndef _ASM_IA64_PGTABLE_H
#define _ASM_IA64_PGTABLE_H
-#include <asm-generic/4level-fixup.h>
-
/*
* This file contains the functions and defines necessary to modify and use
* the IA-64 page table tree.
@@ -256,11 +254,12 @@ ia64_phys_addr_valid (unsigned long addr)
#define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & _PFN_MASK))
#define pmd_page(pmd) virt_to_page((pmd_val(pmd) + PAGE_OFFSET))
-#define pgd_none(pgd) (!pgd_val(pgd))
-#define pgd_bad(pgd) (!ia64_phys_addr_valid(pgd_val(pgd)))
-#define pgd_present(pgd) (pgd_val(pgd) != 0UL)
-#define pgd_clear(pgdp) (pgd_val(*(pgdp)) = 0UL)
-#define pgd_page(pgd) ((unsigned long) __va(pgd_val(pgd) & _PFN_MASK))
+#define pud_none(pud) (!pud_val(pud))
+#define pud_bad(pud) (!ia64_phys_addr_valid(pud_val(pud)))
+#define pud_present(pud) (pud_val(pud) != 0UL)
+#define pud_clear(pudp) (pud_val(*(pudp)) = 0UL)
+
+#define pud_page(pud) ((unsigned long) __va(pud_val(pud) & _PFN_MASK))
/*
* The following have defined behavior only work if pte_present() is true.
@@ -330,7 +329,7 @@ pgd_offset (struct mm_struct *mm, unsigned long address)
/* Find an entry in the second-level page table.. */
#define pmd_offset(dir,addr) \
- ((pmd_t *) pgd_page(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
+ ((pmd_t *) pud_page(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
/*
* Find an entry in the third-level page table. This looks more complicated than it
@@ -563,5 +562,6 @@ do { \
#define __HAVE_ARCH_PTE_SAME
#define __HAVE_ARCH_PGD_OFFSET_GATE
#include <asm-generic/pgtable.h>
+#include <asm-generic/pgtable-nopud.h>
#endif /* _ASM_IA64_PGTABLE_H */
diff --git a/include/asm-ia64/tlb.h b/include/asm-ia64/tlb.h
index aefe2e87b41c..aec6e832ddbc 100644
--- a/include/asm-ia64/tlb.h
+++ b/include/asm-ia64/tlb.h
@@ -236,4 +236,10 @@ do { \
__pmd_free_tlb(tlb, ptep); \
} while (0)
+#define pud_free_tlb(tlb, pudp) \
+do { \
+ tlb->need_flush = 1; \
+ __pud_free_tlb(tlb, pudp); \
+} while (0)
+
#endif /* _ASM_IA64_TLB_H */