Skip to content

Commit 8642685

Browse files
jmahlerIngo Molnar
authored andcommitted
x86/mm: Fix sparse 'tlb_single_page_flush_ceiling' warning and make the variable read-mostly
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 <[email protected]> Signed-off-by: Jeremiah Mahler <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Mel Gorman <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 7c7f154 commit 8642685

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/mm/tlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void flush_tlb_current_task(void)
180180
*
181181
* This is in units of pages.
182182
*/
183-
unsigned long tlb_single_page_flush_ceiling = 33;
183+
static unsigned long tlb_single_page_flush_ceiling __read_mostly = 33;
184184

185185
void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
186186
unsigned long end, unsigned long vmflag)

0 commit comments

Comments
 (0)