• Home
  • Raw
  • Download

Lines Matching refs:c

67 static void check_memory_type_self_snoop_errata(struct cpuinfo_x86 *c)  in check_memory_type_self_snoop_errata()  argument
69 switch (c->x86_model) { in check_memory_type_self_snoop_errata()
95 static void probe_xeon_phi_r3mwait(struct cpuinfo_x86 *c) in probe_xeon_phi_r3mwait() argument
101 if (c->x86 != 6) in probe_xeon_phi_r3mwait()
103 switch (c->x86_model) { in probe_xeon_phi_r3mwait()
114 set_cpu_cap(c, X86_FEATURE_RING3MWAIT); in probe_xeon_phi_r3mwait()
118 if (c == &boot_cpu_data) in probe_xeon_phi_r3mwait()
159 static bool bad_spectre_microcode(struct cpuinfo_x86 *c) in bad_spectre_microcode() argument
167 if (cpu_has(c, X86_FEATURE_HYPERVISOR)) in bad_spectre_microcode()
170 if (c->x86 != 6) in bad_spectre_microcode()
174 if (c->x86_model == spectre_bad_microcodes[i].model && in bad_spectre_microcode()
175 c->x86_stepping == spectre_bad_microcodes[i].stepping) in bad_spectre_microcode()
176 return (c->microcode <= spectre_bad_microcodes[i].microcode); in bad_spectre_microcode()
201 static void detect_tme_early(struct cpuinfo_x86 *c) in detect_tme_early() argument
262 c->x86_phys_bits -= keyid_bits; in detect_tme_early()
265 static void early_init_intel(struct cpuinfo_x86 *c) in early_init_intel() argument
270 if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { in early_init_intel()
273 c->cpuid_level = cpuid_eax(0); in early_init_intel()
274 get_cpu_cap(c); in early_init_intel()
278 if ((c->x86 == 0xf && c->x86_model >= 0x03) || in early_init_intel()
279 (c->x86 == 0x6 && c->x86_model >= 0x0e)) in early_init_intel()
280 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); in early_init_intel()
282 if (c->x86 >= 6 && !cpu_has(c, X86_FEATURE_IA64)) in early_init_intel()
283 c->microcode = intel_get_microcode_revision(); in early_init_intel()
286 if ((cpu_has(c, X86_FEATURE_SPEC_CTRL) || in early_init_intel()
287 cpu_has(c, X86_FEATURE_INTEL_STIBP) || in early_init_intel()
288 cpu_has(c, X86_FEATURE_IBRS) || cpu_has(c, X86_FEATURE_IBPB) || in early_init_intel()
289 cpu_has(c, X86_FEATURE_STIBP)) && bad_spectre_microcode(c)) { in early_init_intel()
309 if (c->x86 == 6 && c->x86_model == 0x1c && c->x86_stepping <= 2 && in early_init_intel()
310 c->microcode < 0x20e) { in early_init_intel()
312 clear_cpu_cap(c, X86_FEATURE_PSE); in early_init_intel()
316 set_cpu_cap(c, X86_FEATURE_SYSENTER32); in early_init_intel()
319 if (c->x86 == 15 && c->x86_cache_alignment == 64) in early_init_intel()
320 c->x86_cache_alignment = 128; in early_init_intel()
324 if (c->x86 == 0xF && c->x86_model == 0x3 in early_init_intel()
325 && (c->x86_stepping == 0x3 || c->x86_stepping == 0x4)) in early_init_intel()
326 c->x86_phys_bits = 36; in early_init_intel()
335 if (c->x86_power & (1 << 8)) { in early_init_intel()
336 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); in early_init_intel()
337 set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC); in early_init_intel()
341 if (c->x86 == 6) { in early_init_intel()
342 switch (c->x86_model) { in early_init_intel()
347 set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC_S3); in early_init_intel()
364 if (c->x86 == 6 && c->x86_model < 15) in early_init_intel()
365 clear_cpu_cap(c, X86_FEATURE_PAT); in early_init_intel()
371 if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { in early_init_intel()
390 if (c->x86 == 5 && c->x86_model == 9) { in early_init_intel()
395 if (c->cpuid_level >= 0x00000001) { in early_init_intel()
405 c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff); in early_init_intel()
408 check_memory_type_self_snoop_errata(c); in early_init_intel()
414 if (detect_extended_topology_early(c) < 0) in early_init_intel()
415 detect_ht_early(c); in early_init_intel()
421 if (cpu_has(c, X86_FEATURE_TME)) in early_init_intel()
422 detect_tme_early(c); in early_init_intel()
425 static void bsp_init_intel(struct cpuinfo_x86 *c) in bsp_init_intel() argument
427 resctrl_cpu_detect(c); in bsp_init_intel()
450 static void intel_smp_check(struct cpuinfo_x86 *c) in intel_smp_check() argument
453 if (!c->cpu_index) in intel_smp_check()
459 if (c->x86 == 5 && in intel_smp_check()
460 c->x86_stepping >= 1 && c->x86_stepping <= 4 && in intel_smp_check()
461 c->x86_model <= 3) { in intel_smp_check()
478 static void intel_workarounds(struct cpuinfo_x86 *c) in intel_workarounds() argument
487 clear_cpu_bug(c, X86_BUG_F00F); in intel_workarounds()
488 if (c->x86 == 5 && c->x86_model < 9) { in intel_workarounds()
491 set_cpu_bug(c, X86_BUG_F00F); in intel_workarounds()
503 if ((c->x86<<8 | c->x86_model<<4 | c->x86_stepping) < 0x633) in intel_workarounds()
504 clear_cpu_cap(c, X86_FEATURE_SEP); in intel_workarounds()
513 set_cpu_cap(c, X86_FEATURE_PAE); in intel_workarounds()
521 if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_stepping == 1)) { in intel_workarounds()
535 if (boot_cpu_has(X86_FEATURE_APIC) && (c->x86<<8 | c->x86_model<<4) == 0x520 && in intel_workarounds()
536 (c->x86_stepping < 0x6 || c->x86_stepping == 0xb)) in intel_workarounds()
537 set_cpu_bug(c, X86_BUG_11AP); in intel_workarounds()
544 switch (c->x86) { in intel_workarounds()
558 intel_smp_check(c); in intel_workarounds()
561 static void intel_workarounds(struct cpuinfo_x86 *c) in intel_workarounds() argument
566 static void srat_detect_node(struct cpuinfo_x86 *c) in srat_detect_node() argument
583 static void init_cpuid_fault(struct cpuinfo_x86 *c) in init_cpuid_fault() argument
589 set_cpu_cap(c, X86_FEATURE_CPUID_FAULT); in init_cpuid_fault()
593 static void init_intel_misc_features(struct cpuinfo_x86 *c) in init_intel_misc_features() argument
604 init_cpuid_fault(c); in init_intel_misc_features()
605 probe_xeon_phi_r3mwait(c); in init_intel_misc_features()
613 static void init_intel(struct cpuinfo_x86 *c) in init_intel() argument
615 early_init_intel(c); in init_intel()
617 intel_workarounds(c); in init_intel()
624 detect_extended_topology(c); in init_intel()
626 if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) { in init_intel()
631 detect_num_cpu_cores(c); in init_intel()
633 detect_ht(c); in init_intel()
637 init_intel_cacheinfo(c); in init_intel()
639 if (c->cpuid_level > 9) { in init_intel()
643 set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON); in init_intel()
646 if (cpu_has(c, X86_FEATURE_XMM2)) in init_intel()
647 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); in init_intel()
654 set_cpu_cap(c, X86_FEATURE_BTS); in init_intel()
656 set_cpu_cap(c, X86_FEATURE_PEBS); in init_intel()
659 if (c->x86 == 6 && boot_cpu_has(X86_FEATURE_CLFLUSH) && in init_intel()
660 (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47)) in init_intel()
661 set_cpu_bug(c, X86_BUG_CLFLUSH_MONITOR); in init_intel()
663 if (c->x86 == 6 && boot_cpu_has(X86_FEATURE_MWAIT) && in init_intel()
664 ((c->x86_model == INTEL_FAM6_ATOM_GOLDMONT))) in init_intel()
665 set_cpu_bug(c, X86_BUG_MONITOR); in init_intel()
668 if (c->x86 == 15) in init_intel()
669 c->x86_cache_alignment = c->x86_clflush_size * 2; in init_intel()
670 if (c->x86 == 6) in init_intel()
671 set_cpu_cap(c, X86_FEATURE_REP_GOOD); in init_intel()
678 if (c->x86 == 6) { in init_intel()
679 unsigned int l2 = c->x86_cache_size; in init_intel()
682 switch (c->x86_model) { in init_intel()
693 else if (c->x86_stepping == 0 || c->x86_stepping == 5) in init_intel()
704 strcpy(c->x86_model_id, p); in init_intel()
707 if (c->x86 == 15) in init_intel()
708 set_cpu_cap(c, X86_FEATURE_P4); in init_intel()
709 if (c->x86 == 6) in init_intel()
710 set_cpu_cap(c, X86_FEATURE_P3); in init_intel()
714 srat_detect_node(c); in init_intel()
716 init_ia32_feat_ctl(c); in init_intel()
718 init_intel_misc_features(c); in init_intel()
729 static unsigned int intel_size_cache(struct cpuinfo_x86 *c, unsigned int size) in intel_size_cache() argument
737 if ((c->x86 == 6) && (c->x86_model == 11) && (size == 0)) in intel_size_cache()
744 if ((c->x86 == 5) && (c->x86_model == 9)) in intel_size_cache()
898 static void intel_detect_tlb(struct cpuinfo_x86 *c) in intel_detect_tlb() argument
904 if (c->cpuid_level < 2) in intel_detect_tlb()
1170 void __init cpu_set_core_cap_bits(struct cpuinfo_x86 *c) in cpu_set_core_cap_bits() argument
1186 if (!cpu_has(c, X86_FEATURE_CORE_CAPABILITIES)) in cpu_set_core_cap_bits()