aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 20:15:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 20:15:45 -0400
commitce4747963252a30613ebf1c1df3d83b9526a342e (patch)
tree6c61d1b1045a72965006324ae3805280be296e53 /arch/x86/kernel/cpu/common.c
parent76f09aa464a1913efd596dd0edbf88f932fde08c (diff)
parenta5102476a24bce364b74f1110005542a2c964103 (diff)
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm changes from Ingo Molnar: "The main change in this cycle is the rework of the TLB range flushing code, to simplify, fix and consolidate the code. By Dave Hansen" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Set TLB flush tunable to sane value (33) x86/mm: New tunable for single vs full TLB flush x86/mm: Add tracepoints for TLB flushes x86/mm: Unify remote INVLPG code x86/mm: Fix missed global TLB flush stat x86/mm: Rip out complicated, out-of-date, buggy TLB flushing x86/mm: Clean up the TLB flushing code x86/smep: Be more informative when signalling an SMEP fault
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r--arch/x86/kernel/cpu/common.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 188a8c5cc094..333fd5209336 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -481,26 +481,17 @@ u16 __read_mostly tlb_lld_2m[NR_INFO];
481u16 __read_mostly tlb_lld_4m[NR_INFO]; 481u16 __read_mostly tlb_lld_4m[NR_INFO];
482u16 __read_mostly tlb_lld_1g[NR_INFO]; 482u16 __read_mostly tlb_lld_1g[NR_INFO];
483 483
484/*
485 * tlb_flushall_shift shows the balance point in replacing cr3 write
486 * with multiple 'invlpg'. It will do this replacement when
487 * flush_tlb_lines <= active_lines/2^tlb_flushall_shift.
488 * If tlb_flushall_shift is -1, means the replacement will be disabled.
489 */
490s8 __read_mostly tlb_flushall_shift = -1;
491
492void cpu_detect_tlb(struct cpuinfo_x86 *c) 484void cpu_detect_tlb(struct cpuinfo_x86 *c)
493{ 485{
494 if (this_cpu->c_detect_tlb) 486 if (this_cpu->c_detect_tlb)
495 this_cpu->c_detect_tlb(c); 487 this_cpu->c_detect_tlb(c);
496 488
497 printk(KERN_INFO "Last level iTLB entries: 4KB %d, 2MB %d, 4MB %d\n" 489 printk(KERN_INFO "Last level iTLB entries: 4KB %d, 2MB %d, 4MB %d\n"
498 "Last level dTLB entries: 4KB %d, 2MB %d, 4MB %d, 1GB %d\n" 490 "Last level dTLB entries: 4KB %d, 2MB %d, 4MB %d, 1GB %d\n",
499 "tlb_flushall_shift: %d\n",
500 tlb_lli_4k[ENTRIES], tlb_lli_2m[ENTRIES], 491 tlb_lli_4k[ENTRIES], tlb_lli_2m[ENTRIES],
501 tlb_lli_4m[ENTRIES], tlb_lld_4k[ENTRIES], 492 tlb_lli_4m[ENTRIES], tlb_lld_4k[ENTRIES],
502 tlb_lld_2m[ENTRIES], tlb_lld_4m[ENTRIES], 493 tlb_lld_2m[ENTRIES], tlb_lld_4m[ENTRIES],
503 tlb_lld_1g[ENTRIES], tlb_flushall_shift); 494 tlb_lld_1g[ENTRIES]);
504} 495}
505 496
506void detect_ht(struct cpuinfo_x86 *c) 497void detect_ht(struct cpuinfo_x86 *c)