]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/acpi_assure_unique_processor_proc_creation.patch
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / acpi_assure_unique_processor_proc_creation.patch
CommitLineData
2cb7cef9
BS
1From: Zhao Yakui <yakui.zhao@intel.com>
2Subject: ACPI: Rename ACPI processor device bus ID
3References: bnc#528769
4Patch-Mainline: yes
5Commit-ID: 7a04b8491a077471a34938b8ca060c37220953be
6
7Signed-off-by: Thomas Renninger <trenn@suse.de>
8
9Some BIOS re-use the same processor bus id
10in different scope:
11
12 \_SB.SCK0.CPU0
13 \_SB.SCK1.CPU0
14
15But the (deprecated) /proc/acpi/ interface
16assumes the bus-id's are unique, resulting in an OOPS
17when the processor driver is loaded:
18
19WARNING: at fs/proc/generic.c:590 proc_register+0x148/0x180()
20Hardware name: Sunrise Ridge
21proc_dir_entry 'processor/CPU0' already registered
22Call Trace:
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]
30
31Rename the processor device bus id. And the new bus id will be
32generated as the following format:
33 CPU+ CPU ID
34
35For 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".
37
38Yes, this will change the directory names seen
39in /proc/acpi/processor/* on some systems.
40Before this patch, those directory names where
41totally arbitrary strings based on the interal AML device strings.
42
43http://bugzilla.kernel.org/show_bug.cgi?id=13612
44
45Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
46Signed-off-by: Len Brown <len.brown@intel.com>
47
48---
49 drivers/acpi/processor_core.c | 11 ++++++++++-
50 1 file changed, 10 insertions(+), 1 deletion(-)
51
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
55 return -ENODEV;
56 }
57 }
58-
59+ /*
60+ * On some boxes several processors use the same processor bus id.
61+ * But they are located in different scope. For example:
62+ * \_SB.SCK0.CPU0
63+ * \_SB.SCK1.CPU0
64+ * Rename the processor device bus id. And the new bus id will be
65+ * generated as the following format:
66+ * CPU+CPU ID.
67+ */
68+ sprintf(acpi_device_bid(device), "CPU%X", pr->id);
69 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,
70 pr->acpi_id));
71