p += (address >> 21) * 2;
printk(KERN_ALERT "%08lx -> *pme = %08lx:%08lx\n",
page, p[1], p[0]);
-#ifndef CONFIG_HIGHPTE
+ mfn = (p[0] >> PAGE_SHIFT) | (p[1] << 20);
+#ifdef CONFIG_HIGHPTE
+ if (mfn_to_pfn(mfn) >= highstart_pfn)
+ return;
+#endif
if (p[0] & 1) {
- mfn = (p[0] >> PAGE_SHIFT) | (p[1] << 20);
page = mfn_to_pfn(mfn) << PAGE_SHIFT;
p = (unsigned long *) __va(page);
address &= 0x001fffff;
printk(KERN_ALERT "%08lx -> *pte = %08lx:%08lx\n",
page, p[1], p[0]);
}
-#endif
}
}
#else
page = ((unsigned long *) __va(page))[address >> 22];
printk(KERN_ALERT "*pde = ma %08lx pa %08lx\n", page,
machine_to_phys(page));
+#ifdef CONFIG_HIGHPTE
/*
* We must not directly access the pte in the highpte
- * case, the page table might be allocated in highmem.
+ * case if the page table is located in highmem.
* And lets rather not kmap-atomic the pte, just in case
* it's allocated already.
*/
-#ifndef CONFIG_HIGHPTE
+ if ((page >> PAGE_SHIFT) >= highstart_pfn)
+ return;
+#endif
if (page & 1) {
page &= PAGE_MASK;
address &= 0x003ff000;
printk(KERN_ALERT "*pte = ma %08lx pa %08lx\n", page,
machine_to_phys(page));
}
-#endif
}
#endif