public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: use setup_clear_cpu_cap with disable_apic
@ 2008-07-21  8:38 Yinghai Lu
  2008-07-21  8:39 ` [PATCH] x86: remove extra calling to get ext cpuid level Yinghai Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yinghai Lu @ 2008-07-21  8:38 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel


so don't need to call clear_cpu_cap again in early_identify_cpu,
and could use cleared_cpu_caps like other setup clear.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

---
 arch/x86/kernel/apic_32.c       |    5 +----
 arch/x86/kernel/apic_64.c       |    2 +-
 arch/x86/kernel/cpu/common_64.c |    4 ----
 3 files changed, 2 insertions(+), 9 deletions(-)

Index: linux-2.6/arch/x86/kernel/apic_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic_32.c
+++ linux-2.6/arch/x86/kernel/apic_32.c
@@ -1251,9 +1251,6 @@ int apic_version[MAX_APICS];
 
 int __init APIC_init_uniprocessor(void)
 {
-	if (disable_apic)
-		clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
-
 	if (!smp_found_config && !cpu_has_apic)
 		return -1;
 
@@ -1737,7 +1734,7 @@ early_param("lapic", parse_lapic);
 static int __init parse_nolapic(char *arg)
 {
 	disable_apic = 1;
-	clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
+	setup_clear_cpu_cap(X86_FEATURE_APIC);
 	return 0;
 }
 early_param("nolapic", parse_nolapic);
Index: linux-2.6/arch/x86/kernel/apic_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic_64.c
+++ linux-2.6/arch/x86/kernel/apic_64.c
@@ -1556,7 +1556,7 @@ early_param("apic", apic_set_verbosity);
 static __init int setup_disableapic(char *str)
 {
 	disable_apic = 1;
-	clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
+	setup_clear_cpu_cap(X86_FEATURE_APIC);
 	return 0;
 }
 early_param("disableapic", setup_disableapic);
Index: linux-2.6/arch/x86/kernel/cpu/common_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/common_64.c
+++ linux-2.6/arch/x86/kernel/cpu/common_64.c
@@ -319,10 +319,6 @@ static void __cpuinit early_identify_cpu
 		cpu_devs[c->x86_vendor]->c_early_init(c);
 
 	validate_pat_support(c);
-
-	/* early_param could clear that, but recall get it set again */
-	if (disable_apic)
-		clear_cpu_cap(c, X86_FEATURE_APIC);
 }
 
 /*

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

* [PATCH] x86: remove extra calling to get ext cpuid level
  2008-07-21  8:38 [PATCH] x86: use setup_clear_cpu_cap with disable_apic Yinghai Lu
@ 2008-07-21  8:39 ` Yinghai Lu
  2008-07-21 11:03   ` Ingo Molnar
  2008-07-21 11:03 ` [PATCH] x86: use setup_clear_cpu_cap with disable_apic Ingo Molnar
  2008-07-21 18:21 ` [PATCH] x86: use setup_clear_cpu_cap with disable_apic -fix Yinghai Lu
  2 siblings, 1 reply; 5+ messages in thread
From: Yinghai Lu @ 2008-07-21  8:39 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel


Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

---
 arch/x86/kernel/cpu/common_64.c |    1 -
 1 file changed, 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/cpu/common_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/common_64.c
+++ linux-2.6/arch/x86/kernel/cpu/common_64.c
@@ -303,7 +303,6 @@ static void __cpuinit early_identify_cpu
 			c->x86_capability[2] = cpuid_edx(0x80860001);
 	}
 
-	c->extended_cpuid_level = cpuid_eax(0x80000000);
 	if (c->extended_cpuid_level >= 0x80000007)
 		c->x86_power = cpuid_edx(0x80000007);
 

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

* Re: [PATCH] x86: use setup_clear_cpu_cap with disable_apic
  2008-07-21  8:38 [PATCH] x86: use setup_clear_cpu_cap with disable_apic Yinghai Lu
  2008-07-21  8:39 ` [PATCH] x86: remove extra calling to get ext cpuid level Yinghai Lu
@ 2008-07-21 11:03 ` Ingo Molnar
  2008-07-21 18:21 ` [PATCH] x86: use setup_clear_cpu_cap with disable_apic -fix Yinghai Lu
  2 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-07-21 11:03 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, linux-kernel


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> so don't need to call clear_cpu_cap again in early_identify_cpu, and 
> could use cleared_cpu_caps like other setup clear.

applied to tip/x86/core, thanks Yinghai.

	Ingo

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

* Re: [PATCH] x86: remove extra calling to get ext cpuid level
  2008-07-21  8:39 ` [PATCH] x86: remove extra calling to get ext cpuid level Yinghai Lu
@ 2008-07-21 11:03   ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-07-21 11:03 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, linux-kernel


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> --- linux-2.6.orig/arch/x86/kernel/cpu/common_64.c
> +++ linux-2.6/arch/x86/kernel/cpu/common_64.c
> @@ -303,7 +303,6 @@ static void __cpuinit early_identify_cpu
>  			c->x86_capability[2] = cpuid_edx(0x80860001);
>  	}
>  
> -	c->extended_cpuid_level = cpuid_eax(0x80000000);
>  	if (c->extended_cpuid_level >= 0x80000007)
>  		c->x86_power = cpuid_edx(0x80000007);

applied to tip/x86/core, thanks.

	Ingo

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

* [PATCH] x86: use setup_clear_cpu_cap with disable_apic -fix
  2008-07-21  8:38 [PATCH] x86: use setup_clear_cpu_cap with disable_apic Yinghai Lu
  2008-07-21  8:39 ` [PATCH] x86: remove extra calling to get ext cpuid level Yinghai Lu
  2008-07-21 11:03 ` [PATCH] x86: use setup_clear_cpu_cap with disable_apic Ingo Molnar
@ 2008-07-21 18:21 ` Yinghai Lu
  2 siblings, 0 replies; 5+ messages in thread
From: Yinghai Lu @ 2008-07-21 18:21 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel


Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
---
 arch/x86/kernel/setup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -680,7 +680,7 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_X86_LOCAL_APIC
 		disable_apic = 1;
 #endif
-		clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
+		setup_clear_cpu_cap(X86_FEATURE_APIC);
 	}
 
 #ifdef CONFIG_PCI

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

end of thread, other threads:[~2008-07-21 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-21  8:38 [PATCH] x86: use setup_clear_cpu_cap with disable_apic Yinghai Lu
2008-07-21  8:39 ` [PATCH] x86: remove extra calling to get ext cpuid level Yinghai Lu
2008-07-21 11:03   ` Ingo Molnar
2008-07-21 11:03 ` [PATCH] x86: use setup_clear_cpu_cap with disable_apic Ingo Molnar
2008-07-21 18:21 ` [PATCH] x86: use setup_clear_cpu_cap with disable_apic -fix Yinghai Lu

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