All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Persvold <sp@numascale.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Daniel J Blueman <daniel@numascale-asia.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] Use x2apic_supported() in the default_apic_id_valid() function.
Date: Fri, 16 Mar 2012 07:56:23 +0100	[thread overview]
Message-ID: <4F62E417.40905@numascale.com> (raw)
In-Reply-To: <CAE9FiQUtf9Pix3rmhgk_+oOf19dOvvgQYt+gbHQyag0xkH_bxA@mail.gmail.com>

On 3/16/2012 05:19, Yinghai Lu wrote:
> On Thu, Mar 15, 2012 at 7:08 PM, Yinghai Lu<yinghai@kernel.org>  wrote:
>>> So this change breaks the commit
>>> c284b42abadbb22083bfde24d308899c08d44ffa.
>>>
>>> I think the right thing is to have two different apid_id_valid checks
>>> one for xapic driver (apic_flat_64.c) and another for x2apic driver
>>> (x2apic_phys/cluster.c) and that way, x2apic MADT entries will be parsed
>>> only if bios has handed over the OS in x2apic mode or if we have
>>> selected the numachip model.
>>
>> that looks like more clear.
>
> after more thinking, I think We should still use cpu_has_x2apic checking.
>
> one maybe invalid case:
>
> System have some cpus apic id<  255, and some cpu apic id>  255.
> BSP apic id<  255.
> those cpus apic id<  255 will be put into xapic mode, cpus>  255 will
> be put into x2apic mode.
> and DMAR table intr-remapping will be working.

Hmm, I didn't know you could have two apic drivers (e.g. apic_flat_64 
and x2apic_*) available at the same time ? Or did I read the above wrong ?

>
> So if we check x2apic_mode early, will skip cpu with apic id>  255,
> even switch to x2apic later.
>

Which one of the two patches I sent, do you (Suresh/Yinghai/others) 
believe is the best/cleanest and works in all cases. I, unfortunately, 
can't test the Intel case as I don't have any available to test on :/

Either patch works fine for NumaChip enabled systems.

If desired I will re-post the patch with the approach you find best, but 
add the apic->apic_id_valid() check in the SRAT code aswell.

Cheers,
-- 
Steffen Persvold, Chief Architect NumaChip
Numascale AS - www.numascale.com
Tel: +47 92 49 25 54 Skype: spersvold

  reply	other threads:[~2012-03-16  6:56 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13  9:29 x2APIC and many-APIC systems Daniel J Blueman
2012-03-13 22:58 ` Yinghai Lu
2012-03-13 23:16   ` Suresh Siddha
2012-03-14  7:17     ` [PATCH] Move APIC ID validity check into platform APIC code Daniel J Blueman
2012-03-14 11:27       ` [tip:x86/platform] x86/platform: " tip-bot for Daniel J Blueman
2012-03-14 17:58       ` [PATCH] " Yinghai Lu
2012-03-14 20:18         ` Steffen Persvold
2012-03-14 23:19           ` Yinghai Lu
2012-03-15 18:03             ` [PATCH] Use x2apic_supported() in the default_apic_id_valid() function Steffen Persvold
2012-03-15 20:23               ` Yinghai Lu
2012-03-15 21:21                 ` Suresh Siddha
2012-03-15 22:34                   ` Steffen Persvold
2012-03-15 22:58                     ` Steffen Persvold
2012-03-15 23:04                     ` Suresh Siddha
2012-03-15 23:17                       ` Steffen Persvold
2012-03-15 23:33                       ` Steffen Persvold
2012-03-15 23:44                         ` Steffen Persvold
2012-03-16  0:07                       ` [PATCH] Added separate apic_id_valid() functions for selected apic drivers Steffen Persvold
2012-03-16  0:13                         ` Suresh Siddha
2012-03-16  0:57                           ` Yinghai Lu
2012-03-16  6:45                           ` Steffen Persvold
2012-03-16  2:08                   ` [PATCH] Use x2apic_supported() in the default_apic_id_valid() function Yinghai Lu
2012-03-16  3:03                     ` Yinghai Lu
2012-03-16  4:19                     ` Yinghai Lu
2012-03-16  6:56                       ` Steffen Persvold [this message]
2012-03-16 16:57                         ` Yinghai Lu
2012-03-16 18:01                           ` Suresh Siddha
2012-03-16 19:10                             ` Yinghai Lu
2012-03-16 19:25                               ` [PATCH REPOST] Added separate apic_id_valid() functions for selected apic drivers Steffen Persvold
2012-03-20 10:41                                 ` Steffen Persvold
2012-03-20 10:49                                   ` Ingo Molnar
2012-03-23 19:45                                 ` [tip:x86/urgent] x86/apic: Add " tip-bot for Steffen Persvold
2012-03-20 16:20             ` [PATCH 0/6] Improvements to Yinghai's x86 IOAPIC hotplug work Jiang Liu
2012-03-20 16:20               ` [PATCH 0/5] Improvements to Yinghai's IOAPIC hotplug work on x86 Jiang Liu
2012-03-20 16:20             ` [PATCH 1/6] x86,IRQ: Fix possible invalid memory access after IOAPIC hot-plugging Jiang Liu
2012-03-20 16:20             ` [PATCH 2/6] x86,IRQ: Mark unused entries in 'ioapics' array as free at startup Jiang Liu
2012-03-21  3:25               ` Yinghai Lu
2012-03-21  3:32                 ` Jiang Liu
2012-03-21 14:56                   ` Jiang Liu
2012-03-20 16:21             ` [PATCH 3/6] x86,IRQ: Enhance irq allocation policy for hot-added IOAPICs Jiang Liu
2012-03-20 16:21             ` [PATCH 4/6] x86,IRQ: split out function ioapic_setup_resource() Jiang Liu
2012-03-21  3:34               ` Yinghai Lu
2012-03-21  3:43                 ` Jiang Liu
2012-03-20 16:21             ` [PATCH 5/6] x86,IRQ: Correctly manage MMIO resource used by IOAPIC when hot-plugging IOPAICs Jiang Liu
2012-03-20 16:21             ` [PATCH 6/6] x86,IRQ: Use memory barriers to protect searching side code Jiang Liu

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=4F62E417.40905@numascale.com \
    --to=sp@numascale.com \
    --cc=daniel@numascale-asia.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /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.