The change below makes us walk from PAGE_OFFSET up to the top
of virtual address space (instead of up to the top of phys ram),
and ignores the rest of the loop apart from the PMD alloc for
that upper region (above the 1-1 phys-virt mapping region).
Thanks to Dave for doing the actual patch creation and testing.
It's designed to be minimally invasive, rather than desperately
efficient.
M.
diff -Nru a/arch/i386/mm/init.c b/arch/i386/mm/init.c
--- a/arch/i386/mm/init.c Tue Dec 3 15:54:44 2002
+++ b/arch/i386/mm/init.c Tue Dec 3 15:54:44 2002
@@ -134,8 +134,10 @@
pgd = pgd_base + pgd_ofs;
pfn = 0;
- for (; pgd_ofs < PTRS_PER_PGD && pfn < max_low_pfn; pgd++, pgd_ofs++) {
+ for (; pgd_ofs < PTRS_PER_PGD; pgd++, pgd_ofs++) {
pmd = one_md_table_init(pgd);
+ if (pfn >= max_low_pfn)
+ continue;
for (pmd_ofs = 0; pmd_ofs < PTRS_PER_PMD && pfn < max_low_pfn; pmd++, pmd_ofs++) {
/* Map with big pages if possible, otherwise create normal page tables. */
if (cpu_has_pse) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/