[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86: minor tidying of identify_cpu()
commit f29363922c1b41310c3d87fd9a861ffa9db9204a Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Jun 13 11:14:50 2023 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jun 13 11:14:50 2023 +0200 x86: minor tidying of identify_cpu() Fields that generic_identify() sets unconditionally don't need pre- setting. (In fact the compiler removes some of those assignments anyway, at least in release builds.) With the setting of ->cpuid_level to -1 gone, also drop the respective BUG_ON() from default_init(). Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/cpu/common.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index fb7494ffb0..cfcdaace12 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -114,8 +114,6 @@ bool __init is_forced_cpu_cap(unsigned int cap) static void cf_check default_init(struct cpuinfo_x86 * c) { /* Not much we can do here... */ - /* Check if at least it has cpuid */ - BUG_ON(c->cpuid_level == -1); __clear_bit(X86_FEATURE_SEP, c->x86_capability); } @@ -492,15 +490,11 @@ void identify_cpu(struct cpuinfo_x86 *c) int i; c->x86_cache_size = -1; - c->x86_vendor = X86_VENDOR_UNKNOWN; - c->cpuid_level = -1; /* CPUID not detected */ c->x86_model = c->x86_mask = 0; /* So far unknown... */ - c->x86_vendor_id[0] = '\0'; /* Unset */ c->x86_model_id[0] = '\0'; /* Unset */ c->x86_max_cores = 1; c->x86_num_siblings = 1; c->x86_clflush_size = 0; - c->phys_proc_id = XEN_INVALID_SOCKET_ID; c->cpu_core_id = XEN_INVALID_CORE_ID; c->compute_unit_id = INVALID_CUID; memset(&c->x86_capability, 0, sizeof c->x86_capability); -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |