All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yong Wang <yong.y.wang@linux.intel.com>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>, Yinghai Lu <yhlu.kernel@gmail.com>,
	Zachary Amsden <zach@vmware.com>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [PATCH] x86: APIC: Remove apic_write_around(); use alternatives
Date: Tue, 22 Jul 2008 09:24:01 -0400	[thread overview]
Message-ID: <20080722132401.GA17165@ywang-dev> (raw)
In-Reply-To: <20080721175940.GA14380@linux-os.sc.intel.com>

On Mon, Jul 21, 2008 at 10:59:41AM -0700, Suresh Siddha wrote:
> Thanks Ingo. I tested tip/master and found an issue (patch attached)
> for x2apic support. This is not because of the recent merges we had, but
> because of something(where we still access memory based interface after
> enabling x2apic mode) that slipped through my earlier tests.
> 
> Probably it is a good idea to unmap the memory mapped interface, once we switch
> to x2apic mode. That will catch the issues much earlier. I will
> post another patch for this.
> 
> Meanwhile, I will do more testing of tip/master along with addressing
> open issues.
> ---
> 
> [patch] x64, apic: use generic apic_write() for ack_APIC_irq()
> 
> ack_APIC_irq() is used at too many generic places (and not just during
> irq_chip handling!) to use the native_apic_mem_write(). For ex, this will
> break x2apic based systems.
> 
> Fix ack_APIC_irq() to use the generic apic_write() even for 64-bit.
> 
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> ---
> 
> diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h
> index 300b65e..1df955f 100644
> --- a/include/asm-x86/apic.h
> +++ b/include/asm-x86/apic.h
> @@ -138,11 +138,7 @@ static inline void ack_APIC_irq(void)
>  	 */
>  
>  	/* Docs say use 0 for future compatibility */
> -#ifdef CONFIG_X86_32
>  	apic_write(APIC_EOI, 0);
> -#else
> -	native_apic_mem_write(APIC_EOI, 0);
> -#endif
>  }
>  

ACK. I tested this patch on my x2apic capable box and it works well. Without this patch, kernel built from tip/x86/x2apic cannot boot in x2apic mode and all APs got stuck in smp_callin->calibrate_delay and failed to boot. After applying this patch, system boots well and all processors got up and running successfully.

  reply	other threads:[~2008-07-22 13:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16 18:15 [PATCH] x86: APIC: Remove apic_write_around(); use alternatives Maciej W. Rozycki
2008-07-18 10:52 ` Ingo Molnar
2008-07-18 16:25   ` Yinghai Lu
2008-07-18 17:01     ` Yinghai Lu
2008-07-18 21:03       ` Ingo Molnar
2008-07-18 21:13         ` Yinghai Lu
2008-07-18 22:02           ` Maciej W. Rozycki
2008-07-18 22:42             ` Zachary Amsden
2008-07-18 22:49               ` Suresh Siddha
2008-07-18 22:51                 ` Yinghai Lu
2008-07-18 23:00                   ` Suresh Siddha
2008-07-18 23:04                     ` Yinghai Lu
2008-07-18 23:18                       ` Suresh Siddha
2008-07-19 21:49                         ` Ingo Molnar
2008-07-19 21:53                           ` Ingo Molnar
2008-07-20 12:08                             ` Ingo Molnar
2008-07-20 15:04                               ` Ingo Molnar
2008-07-21 17:59                               ` Suresh Siddha
2008-07-22 13:24                                 ` Yong Wang [this message]
2008-07-22 13:48                                   ` Ingo Molnar
2008-07-18 23:43                 ` Zachary Amsden
2008-07-19 21:43                   ` Ingo Molnar
2008-07-18 22:58         ` Suresh Siddha
2008-07-19 21:47           ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080722132401.GA17165@ywang-dev \
    --to=yong.y.wang@linux.intel.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=x86@kernel.org \
    --cc=yhlu.kernel@gmail.com \
    --cc=zach@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.