diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2005-06-21 20:15:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 21:46:26 -0400 |
commit | 20cee16ced631f70a62c97bdebae08a1c9470448 (patch) | |
tree | f980db4e2b19dfcd4413e6cba4f667eb1d8c79cd /include/asm-ppc64/pgtable.h | |
parent | 6879dc137ea4efad65cab8bf8a7c0b742bcf92cc (diff) |
[PATCH] ppc64: Abolish ioremap_mm
Currently ppc64 has two mm_structs for the kernel, init_mm and also
ioremap_mm. The latter really isn't necessary: this patch abolishes it,
instead restricting vmallocs to the lower 1TB of the init_mm's range and
placing io mappings in the upper 1TB. This simplifies the code in a number
of places and eliminates an unecessary set of pagetables. It also tweaks
the unmap/free path a little, allowing us to remove the unmap_im_area() set
of page table walkers, replacing them with unmap_vm_area().
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64/pgtable.h')
-rw-r--r-- | include/asm-ppc64/pgtable.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h index 264c4f7993be..46cf61c2ff69 100644 --- a/include/asm-ppc64/pgtable.h +++ b/include/asm-ppc64/pgtable.h | |||
@@ -53,7 +53,8 @@ | |||
53 | * Define the address range of the vmalloc VM area. | 53 | * Define the address range of the vmalloc VM area. |
54 | */ | 54 | */ |
55 | #define VMALLOC_START (0xD000000000000000ul) | 55 | #define VMALLOC_START (0xD000000000000000ul) |
56 | #define VMALLOC_END (VMALLOC_START + EADDR_MASK) | 56 | #define VMALLOC_SIZE (0x10000000000UL) |
57 | #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) | ||
57 | 58 | ||
58 | /* | 59 | /* |
59 | * Bits in a linux-style PTE. These match the bits in the | 60 | * Bits in a linux-style PTE. These match the bits in the |
@@ -239,9 +240,6 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) | |||
239 | /* This now only contains the vmalloc pages */ | 240 | /* This now only contains the vmalloc pages */ |
240 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) | 241 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) |
241 | 242 | ||
242 | /* to find an entry in the ioremap page-table-directory */ | ||
243 | #define pgd_offset_i(address) (ioremap_pgd + pgd_index(address)) | ||
244 | |||
245 | /* | 243 | /* |
246 | * The following only work if pte_present() is true. | 244 | * The following only work if pte_present() is true. |
247 | * Undefined behaviour if not.. | 245 | * Undefined behaviour if not.. |
@@ -459,15 +457,12 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long addr, | |||
459 | #define __HAVE_ARCH_PTE_SAME | 457 | #define __HAVE_ARCH_PTE_SAME |
460 | #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HPTEFLAGS) == 0) | 458 | #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HPTEFLAGS) == 0) |
461 | 459 | ||
462 | extern unsigned long ioremap_bot, ioremap_base; | ||
463 | |||
464 | #define pmd_ERROR(e) \ | 460 | #define pmd_ERROR(e) \ |
465 | printk("%s:%d: bad pmd %08x.\n", __FILE__, __LINE__, pmd_val(e)) | 461 | printk("%s:%d: bad pmd %08x.\n", __FILE__, __LINE__, pmd_val(e)) |
466 | #define pgd_ERROR(e) \ | 462 | #define pgd_ERROR(e) \ |
467 | printk("%s:%d: bad pgd %08x.\n", __FILE__, __LINE__, pgd_val(e)) | 463 | printk("%s:%d: bad pgd %08x.\n", __FILE__, __LINE__, pgd_val(e)) |
468 | 464 | ||
469 | extern pgd_t swapper_pg_dir[]; | 465 | extern pgd_t swapper_pg_dir[]; |
470 | extern pgd_t ioremap_dir[]; | ||
471 | 466 | ||
472 | extern void paging_init(void); | 467 | extern void paging_init(void); |
473 | 468 | ||