Skip to contentSkip to conversation

: ACPI: Rename ACPI processor device bus ID

PATCH Superseded yakui_zhao 1 participant 2 messages May 25, 2009 – May 27, 2009 ACPI

lore
Share & tools
lore

yakui_zhao

author
#0 lore raw

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

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

---
 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));
 
author
#1 lore raw
Quoted 10 lines · yakui_zhao

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.

Quoted 8 lines

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

HI, Len
How about this patch?

After renaming the bus id, it will be similar with the CPU sys I/F. Of course the difference is that the decimal mode is used in CPU sys I/F. And in my patch the hex mode is used.

Quoted 33 lines
---
 drivers/acpi/processor_core.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/processor_core.c
===================================================================

drivers/acpi/processor_core.c +10 -2
@@ -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));
 
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html