linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Len Brown <lenb@kernel.org>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] acpi: x2apic entry with uid < 255 could use processor statement
Date: Fri, 30 Jul 2010 23:51:19 -0700	[thread overview]
Message-ID: <4C53C7E7.4040204@kernel.org> (raw)


According to Intel x2apic spec page 46

" The hand-off to
OSPM will have processor IDs in the range of 0 to 254 for xAPIC/x2APIC and 0 to 255
for SAPIC declared as either Processor() or Device() objects, but not both. Processor
IDs outside these ranges must be declared as Device() objects."

So only check if Device is used when acpi_id >=255.

that will help system with less 255 cpus, but some cpus apic id > 255,
still can use Processor statement instead of Device() objects.

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

---
 drivers/acpi/processor_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.orig/drivers/acpi/processor_core.c
+++ linux-2.6/drivers/acpi/processor_core.c
@@ -69,7 +69,7 @@ static int map_x2apic_id(struct acpi_sub
 	if (!(apic->lapic_flags & ACPI_MADT_ENABLED))
 		return 0;
 
-	if (device_declaration && (apic->uid == acpi_id)) {
+	if ((device_declaration || (acpi_id < 255)) && (apic->uid == acpi_id)) {
 		*apic_id = apic->local_apic_id;
 		return 1;
 	}

             reply	other threads:[~2010-07-31  6:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31  6:51 Yinghai Lu [this message]
2010-08-02 19:06 ` [PATCH] acpi: x2apic entry with uid < 255 could use processor statement Suresh Siddha
2010-08-02 20:18   ` Yinghai Lu
2010-08-02 20:53     ` Suresh Siddha
2010-08-02 21:34       ` Yinghai Lu

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=4C53C7E7.4040204@kernel.org \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).