public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steffen Persvold <sp@numascale.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Daniel J Blueman <daniel@numascale-asia.com>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] Move APIC ID validity check into platform APIC code
Date: Wed, 14 Mar 2012 21:18:18 +0100	[thread overview]
Message-ID: <4F60FD0A.5090103@numascale.com> (raw)
In-Reply-To: <CAE9FiQX_o8GXqi1A+LTE4pseb81d1Aj5zR49NBvJiyAx24yYfw@mail.gmail.com>

On 3/14/2012 18:58, Yinghai Lu wrote:
> On Wed, Mar 14, 2012 at 12:17 AM, Daniel J Blueman
[]
>
> can you check if you can update
>
> !cpu_has_x2apic&&  (apic_id>= 0xff)&&  enabled
>
> in arch/x86/kernel/acpi/boot.c::acpi_parse_x2apic()
>
> to use some kind of apic_id_valid()
>
> so you could avoid setting that feature bit.
>
> the checking in SRAT could be removed.
>

Yinghai/Team,

One question (as I don't really know *why* this was added to the 
acpi/srat parsing code). In arch/x86/kernel/smpboot.c the check was 
originally :

!x2apic_mode && apicid >= 255

However in arch/x86/kernel/acpi/boot.c and arch/x86/mm/srat.c these 
tests are used :

!cpu_has_x2apic && (apic_id >= 0xff)

Clearly, "cpu_has_x2apic" and "x2apic_mode" are two different things.

Since we can force "cpu_has_x2apic", when Daniel crafted this patch he 
made the following "default" function :

static inline int default_apic_id_valid(int apicid)
{
	return x2apic_mode || (apicid < 255);
}

which, as you can see, checks against "x2apic_mode".

My question is; Is checking for "x2apic_mode" going to do the trick in 
the arch/x86/kernel/acpi/boot.c::acpi_parse_x2apic() ?

If the answer is yes, the patch is going to be very simple. But we can't 
verify that the code in arch/x86/kernel/acpi/boot.c::acpi_parse_x2apic() 
actually triggers for the case you wanted it to trigger for because then 
it will check against "x2apic_mode" and not "cpu_has_x2apic".

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

  reply	other threads:[~2012-03-14 21:02 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 [this message]
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
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=4F60FD0A.5090103@numascale.com \
    --to=sp@numascale.com \
    --cc=daniel@numascale-asia.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox