diff options
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
| -rw-r--r-- | arch/x86/kernel/cpu/common.c | 22 | 
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index ef1b93f18ed1..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];  u16 __read_mostly tlb_lld_4m[NR_INFO];  u16 __read_mostly tlb_lld_1g[NR_INFO]; -/* - * tlb_flushall_shift shows the balance point in replacing cr3 write - * with multiple 'invlpg'. It will do this replacement when - *   flush_tlb_lines <= active_lines/2^tlb_flushall_shift. - * If tlb_flushall_shift is -1, means the replacement will be disabled. - */ -s8  __read_mostly tlb_flushall_shift = -1; -  void cpu_detect_tlb(struct cpuinfo_x86 *c)  {  	if (this_cpu->c_detect_tlb)  		this_cpu->c_detect_tlb(c);  	printk(KERN_INFO "Last level iTLB entries: 4KB %d, 2MB %d, 4MB %d\n" -		"Last level dTLB entries: 4KB %d, 2MB %d, 4MB %d, 1GB %d\n" -		"tlb_flushall_shift: %d\n", +		"Last level dTLB entries: 4KB %d, 2MB %d, 4MB %d, 1GB %d\n",  		tlb_lli_4k[ENTRIES], tlb_lli_2m[ENTRIES],  		tlb_lli_4m[ENTRIES], tlb_lld_4k[ENTRIES],  		tlb_lld_2m[ENTRIES], tlb_lld_4m[ENTRIES], -		tlb_lld_1g[ENTRIES], tlb_flushall_shift); +		tlb_lld_1g[ENTRIES]);  }  void detect_ht(struct cpuinfo_x86 *c) @@ -634,6 +625,15 @@ void get_cpu_cap(struct cpuinfo_x86 *c)  		c->x86_capability[9] = ebx;  	} +	/* Extended state features: level 0x0000000d */ +	if (c->cpuid_level >= 0x0000000d) { +		u32 eax, ebx, ecx, edx; + +		cpuid_count(0x0000000d, 1, &eax, &ebx, &ecx, &edx); + +		c->x86_capability[10] = eax; +	} +  	/* AMD-defined flags: level 0x80000001 */  	xlvl = cpuid_eax(0x80000000);  	c->extended_cpuid_level = xlvl;  | 
