public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/cpu: Move identify_cpu_without_cpuid() into main branch
@ 2024-05-21 12:48 Nikolay Borisov
  2024-06-10  6:59 ` Nikolay Borisov
  2024-06-10 14:03 ` Thomas Gleixner
  0 siblings, 2 replies; 4+ messages in thread
From: Nikolay Borisov @ 2024-05-21 12:48 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel, Nikolay Borisov

No point in duplicating if (!have_cpuid_p()) check. Simply move
identify_cpu_without_cpuid() into the else branch. No functional
changes.

Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
---
 arch/x86/kernel/cpu/common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 2b170da84f97..69265c0acaea 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1578,9 +1578,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 	memset(&c->x86_capability, 0, sizeof(c->x86_capability));
 	c->extended_cpuid_level = 0;
 
-	if (!have_cpuid_p())
-		identify_cpu_without_cpuid(c);
-
 	/* cyrix could have cpuid enabled via c_identify()*/
 	if (have_cpuid_p()) {
 		cpu_detect(c);
@@ -1601,6 +1598,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 		if (this_cpu->c_bsp_init)
 			this_cpu->c_bsp_init(c);
 	} else {
+		identify_cpu_without_cpuid(c);
 		setup_clear_cpu_cap(X86_FEATURE_CPUID);
 		get_cpu_address_sizes(c);
 		cpu_init_topology(c);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/cpu: Move identify_cpu_without_cpuid() into main branch
  2024-05-21 12:48 [PATCH] x86/cpu: Move identify_cpu_without_cpuid() into main branch Nikolay Borisov
@ 2024-06-10  6:59 ` Nikolay Borisov
  2024-06-10 14:03 ` Thomas Gleixner
  1 sibling, 0 replies; 4+ messages in thread
From: Nikolay Borisov @ 2024-06-10  6:59 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel



On 21.05.24 г. 15:48 ч., Nikolay Borisov wrote:
> No point in duplicating if (!have_cpuid_p()) check. Simply move
> identify_cpu_without_cpuid() into the else branch. No functional
> changes.
> 
> Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>

ping

> ---
>   arch/x86/kernel/cpu/common.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 2b170da84f97..69265c0acaea 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -1578,9 +1578,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
>   	memset(&c->x86_capability, 0, sizeof(c->x86_capability));
>   	c->extended_cpuid_level = 0;
>   
> -	if (!have_cpuid_p())
> -		identify_cpu_without_cpuid(c);
> -
>   	/* cyrix could have cpuid enabled via c_identify()*/
>   	if (have_cpuid_p()) {
>   		cpu_detect(c);
> @@ -1601,6 +1598,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
>   		if (this_cpu->c_bsp_init)
>   			this_cpu->c_bsp_init(c);
>   	} else {
> +		identify_cpu_without_cpuid(c);
>   		setup_clear_cpu_cap(X86_FEATURE_CPUID);
>   		get_cpu_address_sizes(c);
>   		cpu_init_topology(c);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/cpu: Move identify_cpu_without_cpuid() into main branch
  2024-05-21 12:48 [PATCH] x86/cpu: Move identify_cpu_without_cpuid() into main branch Nikolay Borisov
  2024-06-10  6:59 ` Nikolay Borisov
@ 2024-06-10 14:03 ` Thomas Gleixner
  2024-06-10 14:31   ` Nikolay Borisov
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2024-06-10 14:03 UTC (permalink / raw)
  To: Nikolay Borisov, x86; +Cc: linux-kernel, Nikolay Borisov

On Tue, May 21 2024 at 15:48, Nikolay Borisov wrote:
> No point in duplicating if (!have_cpuid_p()) check. Simply move
> identify_cpu_without_cpuid() into the else branch. No functional
> changes.

You wish :)

> Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
> ---
>  arch/x86/kernel/cpu/common.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 2b170da84f97..69265c0acaea 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -1578,9 +1578,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
>  	memset(&c->x86_capability, 0, sizeof(c->x86_capability));
>  	c->extended_cpuid_level = 0;
>  
> -	if (!have_cpuid_p())
> -		identify_cpu_without_cpuid(c);
> -

You might look what identify_cpu_without_cpuid() does and how the
comment right here might be related:

>  	/* cyrix could have cpuid enabled via c_identify()*/
>  	if (have_cpuid_p()) {

Thanks,

        tglx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/cpu: Move identify_cpu_without_cpuid() into main branch
  2024-06-10 14:03 ` Thomas Gleixner
@ 2024-06-10 14:31   ` Nikolay Borisov
  0 siblings, 0 replies; 4+ messages in thread
From: Nikolay Borisov @ 2024-06-10 14:31 UTC (permalink / raw)
  To: Thomas Gleixner, x86; +Cc: linux-kernel



On 10.06.24 г. 17:03 ч., Thomas Gleixner wrote:
> On Tue, May 21 2024 at 15:48, Nikolay Borisov wrote:
>> No point in duplicating if (!have_cpuid_p()) check. Simply move
>> identify_cpu_without_cpuid() into the else branch. No functional
>> changes.
> 
> You wish :)
> 
>> Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
>> ---
>>   arch/x86/kernel/cpu/common.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
>> index 2b170da84f97..69265c0acaea 100644
>> --- a/arch/x86/kernel/cpu/common.c
>> +++ b/arch/x86/kernel/cpu/common.c
>> @@ -1578,9 +1578,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
>>   	memset(&c->x86_capability, 0, sizeof(c->x86_capability));
>>   	c->extended_cpuid_level = 0;
>>   
>> -	if (!have_cpuid_p())
>> -		identify_cpu_without_cpuid(c);
>> -
> 
> You might look what identify_cpu_without_cpuid() does and how the
> comment right here might be related:

Doh, fair enough. OTOH is Cyrix still relevant? Google says Defunct: 
November 11, 1997; 26 years ago


> 
>>   	/* cyrix could have cpuid enabled via c_identify()*/
>>   	if (have_cpuid_p()) {
> 
> Thanks,
> 
>          tglx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-10 14:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-21 12:48 [PATCH] x86/cpu: Move identify_cpu_without_cpuid() into main branch Nikolay Borisov
2024-06-10  6:59 ` Nikolay Borisov
2024-06-10 14:03 ` Thomas Gleixner
2024-06-10 14:31   ` Nikolay Borisov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox