lkml.org 
[lkml]   [2007]   [Jul]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateWed, 18 Jul 2007 01:56:35 -0400
FromJeff Garzik <>
Subject[PATCH 3/3] x86-64: make flush_tlb_kernel_range() a static inline function
The following change was checked into 'warnings' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git

commit b1c9131343597967d8fcc042f59e4ed36ea2855f
Author: Jeff Garzik <jeff@garzik.org>
Date:   Wed Jul 18 01:47:39 2007 -0400

    [X86-64] make flush_tlb_kernel_range() a static inline function

    On x86-64, without this change, the following warning is emitted

    mm/vmalloc.c: In function ‘unmap_kernel_range’:
    mm/vmalloc.c:75: warning: unused variable ‘start’

    because, x86-64, flush_tlb_kernel_range(start,end) evaluates down to
    flush_tlb_all(void) in a macro.

    Avoid this warning by implementing x86-64's flush_tlb_kernel_range() as
    a type-safe static inline, rather than a macro.

    Signed-off-by: Jeff Garzik <jeff@garzik.org>

 include/asm-x86_64/tlbflush.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
b1c9131343597967d8fcc042f59e4ed36ea2855f
diff --git a/include/asm-x86_64/tlbflush.h b/include/asm-x86_64/tlbflush.h
index 8516225..a82464c 100644
--- a/include/asm-x86_64/tlbflush.h
+++ b/include/asm-x86_64/tlbflush.h
@@ -92,7 +92,11 @@ static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long st
 
 #endif
 
-#define flush_tlb_kernel_range(start, end) flush_tlb_all()
+static inline void flush_tlb_kernel_range(unsigned long start,
+					  unsigned long end)
+{
+	flush_tlb_all();
+}
 
 static inline void flush_tlb_pgtables(struct mm_struct *mm,
 				      unsigned long start, unsigned long end)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-07-18 07:59    [from the cache]
©2003-2008