[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 04/16] x86/cpu: Fold generic_identify() into its single caller


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 27 Jan 2026 14:04:34 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O5uVsejvK52uyQj8vzA/mu0K23jA4iJO19U6rJZ955k=; b=F9h7UdStkKFYu6rpJiDIoBq00O5lMWKOnkwp4YAKWmw/Ae5iQccXTpIh6BrlULLL99A6RPAULBII9XNzq7AgxxarocPpDtVxjkyjldQz7vj5xbhwUcYX6Ge45S3jqsC96EwbPeHnYvP126Du6c5jQSm5qvWgaTA2Ed3jMMYEe4hl+rVkacUjAMX3QSwSBVKXQb6KqKnysUbMrnpqpteOaFz2nzlAMRWdsX7xxU11Kyz3cK4cZ4AuIv/kMD1P5Tq3iracqZzp3qaVz7zirHnOtS9F3JN5N5eRA/4EPL4v5iGlcF9m101wMYjTbcdLS6KPZpZQ+sWNjlXmhRBmxqkb3g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eEkJXWCJsw2ss8GOVZlgUUmfBYKAJAwI41kR0ACPz9ftTapN43n0YNtLF0+BSr7GSSGhrJg4Ht9rWejY62gwaFGdZ5nVYW92rlQjs0JezJbgGrv8QKe+csTeTYQ9FWqWR13RxIQEX8SYeqYnmYGOC4bgI9GW1OvpxNsoa/3DZ/rgTUpKhEADs5yxO74HJ+w6WJvNBLOLvOxISMytfGi1l765LJuUUYPn46EwoxXuzPq7SzbqpfWGF7NF6Y6E+bg0GSVH2wuZR6dXGFi1ePrJNLndCJ6nFLVYZxSb3m6ugOWN8FgIrdMDTh+uaw0kJ3c6ZDM1rXKlGAv24TbL0JaAVg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julian Vetter <julian.vetter@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 27 Jan 2026 14:04:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27/01/2026 2:02 pm, Jan Beulich wrote:
> On 26.01.2026 18:53, Andrew Cooper wrote:
>> --- a/xen/arch/x86/cpu/common.c
>> +++ b/xen/arch/x86/cpu/common.c
>> @@ -455,10 +455,13 @@ void reset_cpuinfo(struct cpuinfo_x86 *c, bool 
>> keep_basic)
>>      CPU_DATA_INIT((*c));
>>  }
>>  
>> -static void generic_identify(struct cpuinfo_x86 *c)
>> +void identify_cpu(struct cpuinfo_x86 *c)
>>  {
>>      uint64_t val;
>>      u32 eax, ebx, ecx, edx, tmp;
>> +    int i;
>> +
>> +    reset_cpuinfo(c, false);
>>  
>>      /* Get vendor name */
>>      cpuid(0, &c->cpuid_level, &ebx, &ecx, &edx);
>> @@ -550,17 +553,6 @@ static void generic_identify(struct cpuinfo_x86 *c)
>>              c->x86_capability[FEATURESET_m10Al] = val;
>>              c->x86_capability[FEATURESET_m10Ah] = val >> 32;
>>      }
>> -}
>> -
>> -/*
>> - * This does the hard work of actually picking apart the CPU stuff...
>> - */
>> -void identify_cpu(struct cpuinfo_x86 *c)
>> -{
>> -    int i;
>> -
>> -    reset_cpuinfo(c, false);
>> -    generic_identify(c);
>>  
>>  #ifdef NOISY_CAPS
>>      printk(KERN_DEBUG "CPU: After vendor identify, caps:");
> To aid reducing the gap between the calls of .c_early_init() and .c_init()
> (that the next patch's description talks about), wouldn't it make sense to
> also drop this NOISY_CAPS thingy right here? The log message saying "After
> vendor identify" isn't quite accurate anyway.

See patch 13.

I put it later because it probably doesn't want backporting, and this might.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.