• Home
  • Raw
  • Download

Lines Matching refs:c

54 static void hygon_get_topology_early(struct cpuinfo_x86 *c)  in hygon_get_topology_early()  argument
56 if (cpu_has(c, X86_FEATURE_TOPOEXT)) in hygon_get_topology_early()
66 static void hygon_get_topology(struct cpuinfo_x86 *c) in hygon_get_topology() argument
77 c->cpu_die_id = ecx & 0xff; in hygon_get_topology()
79 c->cpu_core_id = ebx & 0xff; in hygon_get_topology()
82 c->x86_max_cores /= smp_num_siblings; in hygon_get_topology()
88 err = detect_extended_topology(c); in hygon_get_topology()
90 c->x86_coreid_bits = get_count_order(c->x86_max_cores); in hygon_get_topology()
96 if (!boot_cpu_has(X86_FEATURE_HYPERVISOR) && c->x86_model <= 0x3) in hygon_get_topology()
97 c->phys_proc_id = c->apicid >> APICID_SOCKET_ID_BIT; in hygon_get_topology()
99 cacheinfo_hygon_init_llc_id(c, cpu); in hygon_get_topology()
100 } else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) { in hygon_get_topology()
104 c->cpu_die_id = value & 7; in hygon_get_topology()
106 per_cpu(cpu_llc_id, cpu) = c->cpu_die_id; in hygon_get_topology()
111 set_cpu_cap(c, X86_FEATURE_AMD_DCM); in hygon_get_topology()
118 static void hygon_detect_cmp(struct cpuinfo_x86 *c) in hygon_detect_cmp() argument
123 bits = c->x86_coreid_bits; in hygon_detect_cmp()
125 c->cpu_core_id = c->initial_apicid & ((1 << bits)-1); in hygon_detect_cmp()
127 c->phys_proc_id = c->initial_apicid >> bits; in hygon_detect_cmp()
129 per_cpu(cpu_llc_id, cpu) = c->cpu_die_id = c->phys_proc_id; in hygon_detect_cmp()
132 static void srat_detect_node(struct cpuinfo_x86 *c) in srat_detect_node() argument
137 unsigned int apicid = c->apicid; in srat_detect_node()
149 x86_cpuinit.fixup_cpu_id(c, node); in srat_detect_node()
170 int ht_nodeid = c->initial_apicid; in srat_detect_node()
182 static void early_init_hygon_mc(struct cpuinfo_x86 *c) in early_init_hygon_mc() argument
188 if (c->extended_cpuid_level < 0x80000008) in early_init_hygon_mc()
193 c->x86_max_cores = (ecx & 0xff) + 1; in early_init_hygon_mc()
200 while ((1 << bits) < c->x86_max_cores) in early_init_hygon_mc()
204 c->x86_coreid_bits = bits; in early_init_hygon_mc()
208 static void bsp_init_hygon(struct cpuinfo_x86 *c) in bsp_init_hygon() argument
227 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) { in bsp_init_hygon()
235 if (cpu_has(c, X86_FEATURE_MWAITX)) in bsp_init_hygon()
264 static void early_init_hygon(struct cpuinfo_x86 *c) in early_init_hygon() argument
268 early_init_hygon_mc(c); in early_init_hygon()
270 set_cpu_cap(c, X86_FEATURE_K8); in early_init_hygon()
272 rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy); in early_init_hygon()
278 if (c->x86_power & (1 << 8)) { in early_init_hygon()
279 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); in early_init_hygon()
280 set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC); in early_init_hygon()
284 if (c->x86_power & BIT(12)) in early_init_hygon()
285 set_cpu_cap(c, X86_FEATURE_ACC_POWER); in early_init_hygon()
288 set_cpu_cap(c, X86_FEATURE_SYSCALL32); in early_init_hygon()
297 set_cpu_cap(c, X86_FEATURE_EXTD_APICID); in early_init_hygon()
305 set_cpu_cap(c, X86_FEATURE_VMMCALL); in early_init_hygon()
307 hygon_get_topology_early(c); in early_init_hygon()
310 static void init_hygon(struct cpuinfo_x86 *c) in init_hygon() argument
312 early_init_hygon(c); in init_hygon()
318 clear_cpu_cap(c, 0*32+31); in init_hygon()
320 set_cpu_cap(c, X86_FEATURE_REP_GOOD); in init_hygon()
323 c->apicid = hard_smp_processor_id(); in init_hygon()
331 set_cpu_cap(c, X86_FEATURE_ZEN); in init_hygon()
332 set_cpu_cap(c, X86_FEATURE_CPB); in init_hygon()
334 cpu_detect_cache_sizes(c); in init_hygon()
336 hygon_detect_cmp(c); in init_hygon()
337 hygon_get_topology(c); in init_hygon()
338 srat_detect_node(c); in init_hygon()
340 init_hygon_cacheinfo(c); in init_hygon()
342 if (cpu_has(c, X86_FEATURE_XMM2)) { in init_hygon()
353 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); in init_hygon()
359 set_cpu_cap(c, X86_FEATURE_ARAT); in init_hygon()
362 if (!cpu_has(c, X86_FEATURE_XENPV)) in init_hygon()
363 set_cpu_bug(c, X86_BUG_SYSRET_SS_ATTRS); in init_hygon()
365 check_null_seg_clears_base(c); in init_hygon()
368 static void cpu_detect_tlb_hygon(struct cpuinfo_x86 *c) in cpu_detect_tlb_hygon() argument
373 if (c->extended_cpuid_level < 0x80000006) in cpu_detect_tlb_hygon()