From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Steffen Persvold <sp@numascale.com>
Cc: Yinghai Lu <yinghai@kernel.org>, 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: Thu, 15 Mar 2012 16:04:52 -0700 [thread overview]
Message-ID: <1331852692.16101.30.camel@sbsiddha-desk.sc.intel.com> (raw)
In-Reply-To: <4F626E6C.5010809@numascale.com>
On Thu, 2012-03-15 at 23:34 +0100, Steffen Persvold wrote:
> Is my understanding of your suggestion correct that in
> x2apic_phys/cluster.c we add the following apic_id_valid() function :
>
> static int x2apic_apic_id_valid(int apicid)
> {
> return x2apic_mode || (apicid < 255);
> }
Steffen, We can have something like:
static int x2apic_apic_id_valid(int apicid)
{
return 1;
}
and
static int xapic_apic_id_valid(int apicid)
{
return apicid < 255;
}
If we have selected x2apic driver, then we know we are already in x2apic
mode. And also x2apic_uv_x need to use the x2apic version above.
> Considering that this function (apic->apic_id_valid()) is called already
> in the acpi/boot.c::acpi_parse_x2apic() function is it sufficient enough
> to test for x2apic_mode ? Yinghai indicated that x2apic_mode was not set
> at this point, thus it was testing cpu_has_x2apic instead ?
If the bios has handed over to us in x2apic mode (or if it is a numachip
platform), then by this point apic driver is already set to the
corresponding x2apic/numachip driver etc. so we should be fine.
When we are in xapic mode, typically there should be no x2apic MADT
entries. And even if there are any (bios not following x2apic spec), the
above xapic_apic_id_valid() check will consider only those x2apic MADT
entries whose id's are less than 255. xapic mode can go into x2apic mode
later but that flow is not supposed to bring up any cpu with apic id >
255. So parsing only entries with apic id < 255 here should be fine.
Hope this clarifies.
thanks,
suresh
next prev parent reply other threads:[~2012-03-15 23:04 UTC|newest]
Thread overview: 32+ 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 [this message]
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
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
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=1331852692.16101.30.camel@sbsiddha-desk.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=daniel@numascale-asia.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sp@numascale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®