@@ -716,7 +716,11 @@ static void __init srmmu_allocate_ptable_skeleton(unsigned long start,
}
}
-/* These flush types are not available on all chips... */
+/* Probe the MMU for an entry in one of the page tables.
+ * If the virtual address does not result in a match then return 0.
+ *
+ * These flush types are not available on all chips...
+ */
static inline unsigned long srmmu_probe(unsigned long vaddr)
{
unsigned long retval;
@@ -764,6 +768,11 @@ static void __init srmmu_inherit_prom_mappings(unsigned long start,
what = 0;
addr = start - PAGE_SIZE;
+ /* Find out which level this entry belongs to.
+ * If the probe of the last page return the same entry
+ * as the first page - then we know the type.
+ * Try PGDIR last as this is the largest entries.
+ */
if (!(start & ~(SRMMU_REAL_PMD_MASK))) {
if (srmmu_probe(addr + SRMMU_REAL_PMD_SIZE) == probed)
what = 1;