Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ace63e3743ae59fc0cce48450bd2e410776b4148
Commit:     ace63e3743ae59fc0cce48450bd2e410776b4148
Parent:     f5a50ce1bf53a07cb7d0bab1a87e62cc4f34f0ab
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:34:03 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:34:03 2008 +0100

    x86: add kernel_map_pages() to 64-bit
    
    needed for DEBUG_PAGEALLOC support and for unification.
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/mm/pageattr_64.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/pageattr_64.c b/arch/x86/mm/pageattr_64.c
index 4053832..e1c8608 100644
--- a/arch/x86/mm/pageattr_64.c
+++ b/arch/x86/mm/pageattr_64.c
@@ -260,3 +260,33 @@ void global_flush_tlb(void)
        on_each_cpu(flush_kernel_map, NULL, 1, 1);
 }
 EXPORT_SYMBOL(global_flush_tlb);
+
+#ifdef CONFIG_DEBUG_PAGEALLOC
+void kernel_map_pages(struct page *page, int numpages, int enable)
+{
+       if (PageHighMem(page))
+               return;
+       if (!enable) {
+               debug_check_no_locks_freed(page_address(page),
+                                          numpages * PAGE_SIZE);
+       }
+
+       /*
+        * If page allocator is not up yet then do not call c_p_a():
+        */
+       if (!debug_pagealloc_enabled)
+               return;
+
+       /*
+        * the return value is ignored - the calls cannot fail,
+        * large pages are disabled at boot time.
+        */
+       change_page_attr(page, numpages, enable ? PAGE_KERNEL : __pgprot(0));
+
+       /*
+        * we should perform an IPI and flush all tlbs,
+        * but that can deadlock->flush only current cpu.
+        */
+       __flush_tlb_all();
+}
+#endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to