]> git.hungrycats.org Git - linux/commitdiff
x86/mm: Fix sparse 'tlb_single_page_flush_ceiling' warning and make the variable...
authorJeremiah Mahler <jmmahler@gmail.com>
Sat, 9 Aug 2014 07:38:33 +0000 (00:38 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 9 Jan 2018 00:35:06 +0000 (00:35 +0000)
commit 86426851c38d3fe84dee34d7daa71d26c174d409 upstream.

A sparse warning is generated about
'tlb_single_page_flush_ceiling' not being declared.

  arch/x86/mm/tlb.c:177:15: warning: symbol
  'tlb_single_page_flush_ceiling' was not declared. Should it be static?

Since it isn't used anywhere outside this file, fix the warning
by making it static.

Also, optimize the use of this variable by adding the
__read_mostly directive, as suggested by David Rientjes.

Suggested-by: David Rientjes <rientjes@google.com>
Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Link: http://lkml.kernel.org/r/1407569913-4035-1-git-send-email-jmmahler@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/mm/tlb.c

index 62c0aa9487c135aa21773397369b099e37256af6..0742e549ac65f7a9070c6260b5e511d19f8b6964 100644 (file)
@@ -169,7 +169,7 @@ void flush_tlb_current_task(void)
  *
  * This is in units of pages.
  */
-unsigned long tlb_single_page_flush_ceiling = 33;
+static unsigned long tlb_single_page_flush_ceiling __read_mostly = 33;
 
 void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
                                unsigned long end, unsigned long vmflag)