Skip to contentSkip to conversation

: ACPI: Rename ACPI processor device bus ID

PATCH Applied yakui_zhao 2 participants 2 messages Jun 24, 2009 ACPI

lore
Share & tools
lore

yakui_zhao

author
#0 lore raw

PATCH 1/1 : ACPI: Rename ACPI processor device bus ID

From: Zhao Yakui <[email protected]

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

As they use the same bus id, OS will complain the following kernel OOPS when registering proc I/F.

Quoted 1 line
------------[ cut here ]------------
WARNING: at fs/proc/generic.c:590 proc_register+0x148/0x180()
Hardware name: Sunrise Ridge
proc_dir_entry 'processor/CPU0' already registered
Modules linked in: processor(+) thermal_sys hwmon
Pid: 255, comm: modprobe Tainted: G        W  2.6.30-rc3MASHLEY #1
Call Trace:
 [<ffffffff8023f7ef>] warn_slowpath+0xb1/0xe5
 [<ffffffff8036243b>] ? ida_get_new_above+0x190/0x1b1
 [<ffffffff803625a8>] ? idr_pre_get+0x5f/0x75
 [<ffffffff8030b2f6>] proc_register+0x148/0x180
 [<ffffffff8030b4ff>] proc_mkdir_mode+0x3d/0x52
 [<ffffffff8030b525>] proc_mkdir+0x11/0x13
 [<ffffffffa0014b89>] acpi_processor_start+0x755/0x9bc [processor]

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".

http://bugzilla.kernel.org/show_bug.cgi?id=13612

---
 drivers/acpi/processor_core.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/acpi/processor_core.c +10 -1
Index: linux-2.6/drivers/acpi/processor_core.c
===================================================================
@@ -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));
 
reviewer Applied
#1 lore raw

applied

thanks,
Len Brown, Intel Open Source Technology Center