Merge branch 'simplify_PRT' into release
[pandora-kernel.git] / arch / arm / mm / fault.c
index 22c9530..0455557 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
+#include <linux/page-flags.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -84,13 +85,14 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
                        break;
                }
 
-#ifndef CONFIG_HIGHMEM
                /* We must not map this if we have highmem enabled */
+               if (PageHighMem(pfn_to_page(pmd_val(*pmd) >> PAGE_SHIFT)))
+                       break;
+
                pte = pte_offset_map(pmd, addr);
                printk(", *pte=%08lx", pte_val(*pte));
                printk(", *ppte=%08lx", pte_val(pte[-PTRS_PER_PTE]));
                pte_unmap(pte);
-#endif
        } while(0);
 
        printk("\n");