]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/acpi_assure_unique_processor_proc_creation.patch
Merge branch 'master' of git://git.ipfire.org/ipfire-2.x
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / acpi_assure_unique_processor_proc_creation.patch
1 From: Zhao Yakui <yakui.zhao@intel.com>
2 Subject: ACPI: Rename ACPI processor device bus ID
3 References: bnc#528769
4 Patch-Mainline: yes
5 Commit-ID: 7a04b8491a077471a34938b8ca060c37220953be
6
7 Signed-off-by: Thomas Renninger <trenn@suse.de>
8
9 Some BIOS re-use the same processor bus id
10 in different scope:
11
12 \_SB.SCK0.CPU0
13 \_SB.SCK1.CPU0
14
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:
18
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
22 Call 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
31 Rename the processor device bus id. And the new bus id will be
32 generated as the following format:
33 CPU+ CPU ID
34
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".
37
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.
42
43 http://bugzilla.kernel.org/show_bug.cgi?id=13612
44
45 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
46 Signed-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