]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/acpi_thinkpad_introduce_acpi_root_table_boot_param.patch
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / acpi_thinkpad_introduce_acpi_root_table_boot_param.patch
CommitLineData
2cb7cef9
BS
1From: Thomas Renninger <trenn@suse.de>
2Subject: Introduce acpi_root_table=rsdt boot param and dmi list to force rsdt
3Patch-mainline: not yet
4References: http://bugzilla.kernel.org/show_bug.cgi?id=8246
5
6This one is part of a patch series:
7acpi_thinkpad_introduce_acpi_root_table_boot_param.patch
8acpi_thinkpad_introduce_acpica_rsdt_global_variable.patch
9acpi_thinkpad_remove_R40e_c-state_blacklist.patch
10
11Blacklist R40e, R51e and T40, T40p, T41, T41p, T42, T42p, R50 and R50p
12ThinkPads to use the RSDT instead of the XSDT.
13
14Signed-off-by: Thomas Renninger <trenn@suse.de>
15Tested-by: Mark Doughty <me@markdoughty.co.uk>
16CC: Yakui Zhao <yakui.zhao@intel.com>
17
18---
19 Documentation/kernel-parameters.txt | 5 ++++
20 drivers/acpi/tables.c | 37 ++++++++++++++++++++++++++++++++++++
21 2 files changed, 42 insertions(+)
22
23--- a/Documentation/kernel-parameters.txt
24+++ b/Documentation/kernel-parameters.txt
25@@ -237,6 +237,11 @@ and is between 256 and 4096 characters.
26 to assume that this machine's pmtimer latches its value
27 and always returns good values.
28
29+ acpi_root_table= [X86,ACPI]
30+ { rsdt }
31+ rsdt: Take RSDT address for fetching
32+ ACPI tables (instead of XSDT)
33+
34 agp= [AGP]
35 { off | try_unsupported }
36 off: disable AGP support
37--- a/drivers/acpi/tables.c
38+++ b/drivers/acpi/tables.c
39@@ -32,6 +32,7 @@
40 #include <linux/errno.h>
41 #include <linux/acpi.h>
42 #include <linux/bootmem.h>
43+#include <linux/dmi.h>
44
45 #define PREFIX "ACPI: "
46
47@@ -282,6 +283,37 @@ static void __init check_multiple_madt(v
48 return;
49 }
50
51+static struct dmi_system_id __initdata acpi_rsdt_dmi_table[] = {
52+ {
53+ .ident = "ThinkPad ", /* R40e, broken C-states */
54+ .matches = {
55+ DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
56+ DMI_MATCH(DMI_BIOS_VERSION, "1SET")},
57+ },
58+ {
59+ .ident = "ThinkPad ", /* R50e, slow booting */
60+ .matches = {
61+ DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
62+ DMI_MATCH(DMI_BIOS_VERSION, "1WET")},
63+ },
64+ {
65+ .ident = "ThinkPad ", /* T40, T40p, T41, T41p, T42, T42p
66+ R50, R50p */
67+ .matches = {
68+ DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
69+ DMI_MATCH(DMI_BIOS_VERSION, "1RET")},
70+ },
71+ {}
72+};
73+
74+static int __init acpi_force_rsdt(char *opt)
75+{
76+ if (!strcmp(opt, "rsdt"))
77+ acpi_gbl_force_rsdt = 1;
78+ return 0;
79+}
80+early_param("acpi_root_table", acpi_force_rsdt);
81+
82 /*
83 * acpi_table_init()
84 *
85@@ -295,6 +327,11 @@ int __init acpi_table_init(void)
86 {
87 acpi_status status;
88
89+ if (dmi_check_system(acpi_rsdt_dmi_table))
90+ acpi_gbl_force_rsdt = 1;
91+ if (acpi_gbl_force_rsdt)
92+ printk(KERN_INFO "Using RSDT as ACPI root table\n");
93+
94 status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
95 if (ACPI_FAILURE(status))
96 return 1;