[PATCH 3/3] x86-64: make flush_tlb_kernel_range() a static inlinefunction

From: Jeff Garzik
Date: Wed Jul 18 2007 - 01:56:46 EST



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@xxxxxxxxxx>
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@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/