[PATCH 2.6.10-rc3-mm1] m32r: Update 4-level page table support(was Re: [PATCH 8/17] 4level support for m32r)

From: Hirokazu Takata
Date: Fri Dec 17 2004 - 08:12:39 EST


Hello,

More updates for 4-level support for m32r.
This patch is needed to fix compile error of -mm tree for m32r.
Please apply.

Regards,

Signed-off-by: Hirokazu Takata <takata@xxxxxxxxxxxxxx>
---

diff -ruNp a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
--- a/arch/m32r/mm/fault.c 2004-12-16 11:37:01.000000000 +0900
+++ b/arch/m32r/mm/fault.c 2004-12-16 11:37:46.000000000 +0900
@@ -122,7 +122,7 @@ asmlinkage void do_page_fault(struct pt_

/*
* We fault-in kernel-space virtual memory on-demand. The
- * 'reference' page table is init_mm.pgd.
+ * 'reference' page table is init_mm.pml4.
*
* NOTE! We MUST NOT take any locks for this case. We may
* be in an interrupt or a critical region, and should
@@ -343,7 +343,7 @@ vmalloc_fault:

pgd = (pgd_t *)*(unsigned long *)MPTB;
pgd = offset + (pgd_t *)pgd;
- pgd_k = init_mm.pgd + offset;
+ pgd_k = init_mm.pml4 + offset;

if (!pgd_present(*pgd_k))
goto no_context;
diff -ruNp a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c
--- a/arch/m32r/mm/init.c 2004-12-16 11:37:01.000000000 +0900
+++ b/arch/m32r/mm/init.c 2004-12-15 13:02:27.000000000 +0900
@@ -142,7 +142,7 @@ void __init paging_init(void)
/* We don't need kernel mapping as hardware support that. */
pg_dir = swapper_pg_dir;

- for (i = 0 ; i < USER_PTRS_PER_PGD * 2 ; i++)
+ for (i = 0 ; i < USER_PGDS_IN_LAST_PML4 * 2 ; i++)
pgd_val(pg_dir[i]) = 0;
#endif /* CONFIG_MMU */
hole_pages = zone_sizes_init();

--
Hirokazu Takata <takata@xxxxxxxxxxxxxx>
Linux/M32R Project: http://www.linux-m32r.org/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/