1 From: Zhao Yakui <yakui.zhao@intel.com>
2 Subject: ACPI: Rename ACPI processor device bus ID
5 Commit-ID: 7a04b8491a077471a34938b8ca060c37220953be
7 Signed-off-by: Thomas Renninger <trenn@suse.de>
9 Some BIOS re-use the same processor bus id
15 But the (deprecated) /proc/acpi/ interface
16 assumes the bus-id's are unique, resulting in an OOPS
17 when the processor driver is loaded:
19 WARNING: at fs/proc/generic.c:590 proc_register+0x148/0x180()
20 Hardware name: Sunrise Ridge
21 proc_dir_entry 'processor/CPU0' already registered
23 [<ffffffff8023f7ef>] warn_slowpath+0xb1/0xe5
24 [<ffffffff8036243b>] ? ida_get_new_above+0x190/0x1b1
25 [<ffffffff803625a8>] ? idr_pre_get+0x5f/0x75
26 [<ffffffff8030b2f6>] proc_register+0x148/0x180
27 [<ffffffff8030b4ff>] proc_mkdir_mode+0x3d/0x52
28 [<ffffffff8030b525>] proc_mkdir+0x11/0x13
29 [<ffffffffa0014b89>] acpi_processor_start+0x755/0x9bc [processor]
31 Rename the processor device bus id. And the new bus id will be
32 generated as the following format:
35 For example: If the cpu ID is 5, then the bus ID will be "CPU5".
36 If the CPU ID is 10, then the bus ID will be "CPUA".
38 Yes, this will change the directory names seen
39 in /proc/acpi/processor/* on some systems.
40 Before this patch, those directory names where
41 totally arbitrary strings based on the interal AML device strings.
43 http://bugzilla.kernel.org/show_bug.cgi?id=13612
45 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
46 Signed-off-by: Len Brown <len.brown@intel.com>
49 drivers/acpi/processor_core.c | 11 ++++++++++-
50 1 file changed, 10 insertions(+), 1 deletion(-)
52 --- a/drivers/acpi/processor_core.c
53 +++ b/drivers/acpi/processor_core.c
54 @@ -624,7 +624,16 @@ static int acpi_processor_get_info(struc
60 + * On some boxes several processors use the same processor bus id.
61 + * But they are located in different scope. For example:
64 + * Rename the processor device bus id. And the new bus id will be
65 + * generated as the following format:
68 + sprintf(acpi_device_bid(device), "CPU%X", pr->id);
69 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,