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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
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 <[email protected]>

 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 [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]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux