public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: only set warm_reset_vector for NMI
@ 2009-02-27  2:41 Yinghai Lu
  2009-02-27  3:36 ` Yinghai Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Yinghai Lu @ 2009-02-27  2:41 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton
  Cc: linux-kernel@vger.kernel.org


Impact: cleanup

don't need to set that for INIT etc

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/kernel/smpboot.c |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Index: linux-2.6/arch/x86/kernel/smpboot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/smpboot.c
+++ linux-2.6/arch/x86/kernel/smpboot.c
@@ -609,7 +609,7 @@ wakeup_secondary_cpu_via_nmi(int logical
 	return (send_status | accept_status);
 }
 
-int __devinit
+static int __devinit
 wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
 {
 	unsigned long send_status, accept_status = 0;
@@ -816,11 +816,14 @@ do_rest:
 
 	atomic_set(&init_deasserted, 0);
 
-	if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
+	if (apic->wakeup_secondary_cpu == wakeup_secondary_cpu_via_nmi) {
 
 		pr_debug("Setting warm reset code and vector.\n");
 
 		smpboot_setup_warm_reset_vector(start_ip);
+	}
+
+	if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
 		/*
 		 * Be paranoid about clearing APIC errors.
 		*/
@@ -893,10 +896,12 @@ do_rest:
 	/* mark "stuck" area as not stuck */
 	*((volatile unsigned long *)trampoline_base) = 0;
 
-	/*
-	 * Cleanup possible dangling ends...
-	 */
-	smpboot_restore_warm_reset_vector();
+	if (apic->wakeup_secondary_cpu == wakeup_secondary_cpu_via_nmi) {
+		/*
+		 * Cleanup possible dangling ends...
+		 */
+		smpboot_restore_warm_reset_vector();
+	}
 
 	return boot_error;
 }

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

* Re: [PATCH] x86: only set warm_reset_vector for NMI
  2009-02-27  2:41 [PATCH] x86: only set warm_reset_vector for NMI Yinghai Lu
@ 2009-02-27  3:36 ` Yinghai Lu
  2009-02-27  3:37   ` Yinghai Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Yinghai Lu @ 2009-02-27  3:36 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton
  Cc: linux-kernel@vger.kernel.org

please discard this one. it doesn't consider system with integrated apic.

YH

Yinghai Lu wrote:
> Impact: cleanup
> 
> don't need to set that for INIT etc
> 
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> 
> ---
>  arch/x86/kernel/smpboot.c |   17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> Index: linux-2.6/arch/x86/kernel/smpboot.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/smpboot.c
> +++ linux-2.6/arch/x86/kernel/smpboot.c
> @@ -609,7 +609,7 @@ wakeup_secondary_cpu_via_nmi(int logical
>  	return (send_status | accept_status);
>  }
>  
> -int __devinit
> +static int __devinit
>  wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
>  {
>  	unsigned long send_status, accept_status = 0;
> @@ -816,11 +816,14 @@ do_rest:
>  
>  	atomic_set(&init_deasserted, 0);
>  
> -	if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
> +	if (apic->wakeup_secondary_cpu == wakeup_secondary_cpu_via_nmi) {
>  
>  		pr_debug("Setting warm reset code and vector.\n");
>  
>  		smpboot_setup_warm_reset_vector(start_ip);
> +	}
> +
> +	if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
>  		/*
>  		 * Be paranoid about clearing APIC errors.
>  		*/
> @@ -893,10 +896,12 @@ do_rest:
>  	/* mark "stuck" area as not stuck */
>  	*((volatile unsigned long *)trampoline_base) = 0;
>  
> -	/*
> -	 * Cleanup possible dangling ends...
> -	 */
> -	smpboot_restore_warm_reset_vector();
> +	if (apic->wakeup_secondary_cpu == wakeup_secondary_cpu_via_nmi) {
> +		/*
> +		 * Cleanup possible dangling ends...
> +		 */
> +		smpboot_restore_warm_reset_vector();
> +	}
>  
>  	return boot_error;
>  }
> 


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

* Re: [PATCH] x86: only set warm_reset_vector for NMI
  2009-02-27  3:36 ` Yinghai Lu
@ 2009-02-27  3:37   ` Yinghai Lu
  0 siblings, 0 replies; 3+ messages in thread
From: Yinghai Lu @ 2009-02-27  3:37 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton
  Cc: linux-kernel@vger.kernel.org

it doesn't consider system with integrated apic.

==>
it doesn't consider system without integrated apic.

Yinghai Lu wrote:
> please discard this one. it doesn't consider system with integrated apic.
> 
> YH
> 
> Yinghai Lu wrote:
>> Impact: cleanup
>>
>> don't need to set that for INIT etc
>>
>> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>>
>> ---
>>  arch/x86/kernel/smpboot.c |   17 +++++++++++------
>>  1 file changed, 11 insertions(+), 6 deletions(-)
>>
>> Index: linux-2.6/arch/x86/kernel/smpboot.c
>> ===================================================================
>> --- linux-2.6.orig/arch/x86/kernel/smpboot.c
>> +++ linux-2.6/arch/x86/kernel/smpboot.c
>> @@ -609,7 +609,7 @@ wakeup_secondary_cpu_via_nmi(int logical
>>  	return (send_status | accept_status);
>>  }
>>  
>> -int __devinit
>> +static int __devinit
>>  wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
>>  {
>>  	unsigned long send_status, accept_status = 0;
>> @@ -816,11 +816,14 @@ do_rest:
>>  
>>  	atomic_set(&init_deasserted, 0);
>>  
>> -	if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
>> +	if (apic->wakeup_secondary_cpu == wakeup_secondary_cpu_via_nmi) {
>>  
>>  		pr_debug("Setting warm reset code and vector.\n");
>>  
>>  		smpboot_setup_warm_reset_vector(start_ip);
>> +	}
>> +
>> +	if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
>>  		/*
>>  		 * Be paranoid about clearing APIC errors.
>>  		*/
>> @@ -893,10 +896,12 @@ do_rest:
>>  	/* mark "stuck" area as not stuck */
>>  	*((volatile unsigned long *)trampoline_base) = 0;
>>  
>> -	/*
>> -	 * Cleanup possible dangling ends...
>> -	 */
>> -	smpboot_restore_warm_reset_vector();
>> +	if (apic->wakeup_secondary_cpu == wakeup_secondary_cpu_via_nmi) {
>> +		/*
>> +		 * Cleanup possible dangling ends...
>> +		 */
>> +		smpboot_restore_warm_reset_vector();
>> +	}
>>  
>>  	return boot_error;
>>  }
>>
> 
> 


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

end of thread, other threads:[~2009-02-27  3:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27  2:41 [PATCH] x86: only set warm_reset_vector for NMI Yinghai Lu
2009-02-27  3:36 ` Yinghai Lu
2009-02-27  3:37   ` Yinghai Lu

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