diff -ruNp 403-debug-pagealloc-support.patch-old/arch/i386/mm/pageattr.c 403-debug-pagealloc-support.patch-new/arch/i386/mm/pageattr.c
--- 403-debug-pagealloc-support.patch-old/arch/i386/mm/pageattr.c 2005-06-20 11:46:43.000000000 +1000
+++ 403-debug-pagealloc-support.patch-new/arch/i386/mm/pageattr.c 2005-07-04 23:14:19.000000000 +1000
@@ -217,5 +217,46 @@ void kernel_map_pages(struct page *page,
}
#endif
+#ifdef CONFIG_SUSPEND2
+#ifdef CONFIG_DEBUG_PAGEALLOC
+static int page_is_kernel_mapped(struct page * page)
+{
+ pte_t *kpte;
+ unsigned long address;
+
+ if (PageHighMem(page))
+ return 0;
+
+ address = (unsigned long)page_address(page);
+
+ kpte = lookup_address(address);
+ if (!kpte)
+ return 0;
+
+ if (pte_same(*kpte, mk_pte(page, PAGE_KERNEL)))
+ return 1;
+
+ return 0;
+}
+
+int suspend_map_kernel_page(struct page * page, int enable)
+{
+ int is_already_mapped = page_is_kernel_mapped(page);
+
+ if (enable == is_already_mapped)
+ return 1;
+
+ kernel_map_pages(page, 1, enable);
+
+ return 0;
+}
+#else
+int suspend_map_kernel_page(struct page * page, int enable)
+{
+ return (enable == 1);
+}
+#endif
+#endif
+
EXPORT_SYMBOL(change_page_attr);
EXPORT_SYMBOL(global_flush_tlb);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|