All of lore.kernel.org
 help / color / mirror / Atom feed
From: yakui_zhao <yakui.zhao@intel.com>
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org
Subject: [PATCH]: ACPI: Rename ACPI processor device bus ID
Date: Mon, 25 May 2009 14:48:25 +0800	[thread overview]
Message-ID: <1243234105.3634.1.camel@localhost.localdomain> (raw)

On some boxes several processors use the same processor bus id.
But they are located in different scope. For example:
	\_SB.SCK0.CPU0
	\_SB.SCK1.CPU0
This follows the ACPI spec.

	As they use the same bus id, it can't be registered when
registering proc I/F. It causes that the ACPI processor driver can't
be bound with the processor device.
	
Rename the processor device bus id. And the new bus id will be 
generated as the following format:
	CPU+ CPU ID
	
For example: If the cpu ID is 5, then the bus ID will be "CPU5".
	If the CPU ID is 10, then the bus ID will be "CPUA".


Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 drivers/acpi/processor_core.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.orig/drivers/acpi/processor_core.c	2009-05-21 14:44:18.000000000 +0800
+++ linux-2.6/drivers/acpi/processor_core.c	2009-05-21 15:55:13.000000000 +0800
@@ -649,7 +649,16 @@
 			return -ENODEV;
 		}
 	}
-
+	/*
+	 * On some boxes several processors use the same processor bus id.
+	 * But they are located in different scope. For example:
+	 * \_SB.SCK0.CPU0
+	 * \_SB.SCK1.CPU0
+	 * Rename the processor device bus id. And the new bus id will be
+	 * generated as the following format:
+	 * CPU+CPU ID.
+	 */
+	sprintf(acpi_device_bid(device), "CPU%X", pr->id);
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,
 			  pr->acpi_id));
 



             reply	other threads:[~2009-05-25  6:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25  6:48 yakui_zhao [this message]
2009-05-27  5:28 ` [PATCH]: ACPI: Rename ACPI processor device bus ID yakui_zhao
2009-06-24  3:46 yakui_zhao
2009-06-24  5:18 ` Len Brown

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=1243234105.3634.1.camel@localhost.localdomain \
    --to=yakui.zhao@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.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.