aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrey Panin <pazke@donpac.ru>2005-06-25 17:54:42 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:27 -0400
commitaea00143a8db8c0b31dca85bff3c325444d93f0f (patch)
tree32bac9ee3f0017f36dedd270f166c4def609f1ad /arch
parent856509d5da74aefeabe92a8df039cc472f4f7c5f (diff)
[PATCH] dmi: move ACPI boot quirk
This patch moves ACPI boot quirks out of dmi_scan.c Signed-off-by: Andrey Panin <pazke@donpac.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/acpi/boot.c219
-rw-r--r--arch/i386/kernel/dmi_scan.c163
2 files changed, 217 insertions, 165 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 848bb97af7ca..0771596c5496 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -29,6 +29,7 @@
29#include <linux/efi.h> 29#include <linux/efi.h>
30#include <linux/irq.h> 30#include <linux/irq.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/dmi.h>
32 33
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
34#include <asm/io_apic.h> 35#include <asm/io_apic.h>
@@ -815,6 +816,218 @@ acpi_process_madt(void)
815 return; 816 return;
816} 817}
817 818
819extern int acpi_force;
820
821#ifdef __i386__
822
823#ifdef CONFIG_ACPI_PCI
824static int __init disable_acpi_irq(struct dmi_system_id *d)
825{
826 if (!acpi_force) {
827 printk(KERN_NOTICE "%s detected: force use of acpi=noirq\n",
828 d->ident);
829 acpi_noirq_set();
830 }
831 return 0;
832}
833
834static int __init disable_acpi_pci(struct dmi_system_id *d)
835{
836 if (!acpi_force) {
837 printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n",
838 d->ident);
839 acpi_disable_pci();
840 }
841 return 0;
842}
843#endif
844
845static int __init dmi_disable_acpi(struct dmi_system_id *d)
846{
847 if (!acpi_force) {
848 printk(KERN_NOTICE "%s detected: acpi off\n",d->ident);
849 disable_acpi();
850 } else {
851 printk(KERN_NOTICE
852 "Warning: DMI blacklist says broken, but acpi forced\n");
853 }
854 return 0;
855}
856
857/*
858 * Limit ACPI to CPU enumeration for HT
859 */
860static int __init force_acpi_ht(struct dmi_system_id *d)
861{
862 if (!acpi_force) {
863 printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", d->ident);
864 disable_acpi();
865 acpi_ht = 1;
866 } else {
867 printk(KERN_NOTICE
868 "Warning: acpi=force overrules DMI blacklist: acpi=ht\n");
869 }
870 return 0;
871}
872
873/*
874 * If your system is blacklisted here, but you find that acpi=force
875 * works for you, please contact acpi-devel@sourceforge.net
876 */
877static struct dmi_system_id __initdata acpi_dmi_table[] = {
878 /*
879 * Boxes that need ACPI disabled
880 */
881 {
882 .callback = dmi_disable_acpi,
883 .ident = "IBM Thinkpad",
884 .matches = {
885 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
886 DMI_MATCH(DMI_BOARD_NAME, "2629H1G"),
887 },
888 },
889
890 /*
891 * Boxes that need acpi=ht
892 */
893 {
894 .callback = force_acpi_ht,
895 .ident = "FSC Primergy T850",
896 .matches = {
897 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
898 DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
899 },
900 },
901 {
902 .callback = force_acpi_ht,
903 .ident = "DELL GX240",
904 .matches = {
905 DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
906 DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
907 },
908 },
909 {
910 .callback = force_acpi_ht,
911 .ident = "HP VISUALIZE NT Workstation",
912 .matches = {
913 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
914 DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
915 },
916 },
917 {
918 .callback = force_acpi_ht,
919 .ident = "Compaq Workstation W8000",
920 .matches = {
921 DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
922 DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
923 },
924 },
925 {
926 .callback = force_acpi_ht,
927 .ident = "ASUS P4B266",
928 .matches = {
929 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
930 DMI_MATCH(DMI_BOARD_NAME, "P4B266"),
931 },
932 },
933 {
934 .callback = force_acpi_ht,
935 .ident = "ASUS P2B-DS",
936 .matches = {
937 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
938 DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"),
939 },
940 },
941 {
942 .callback = force_acpi_ht,
943 .ident = "ASUS CUR-DLS",
944 .matches = {
945 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
946 DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"),
947 },
948 },
949 {
950 .callback = force_acpi_ht,
951 .ident = "ABIT i440BX-W83977",
952 .matches = {
953 DMI_MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
954 DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
955 },
956 },
957 {
958 .callback = force_acpi_ht,
959 .ident = "IBM Bladecenter",
960 .matches = {
961 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
962 DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
963 },
964 },
965 {
966 .callback = force_acpi_ht,
967 .ident = "IBM eServer xSeries 360",
968 .matches = {
969 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
970 DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
971 },
972 },
973 {
974 .callback = force_acpi_ht,
975 .ident = "IBM eserver xSeries 330",
976 .matches = {
977 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
978 DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
979 },
980 },
981 {
982 .callback = force_acpi_ht,
983 .ident = "IBM eserver xSeries 440",
984 .matches = {
985 DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
986 DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
987 },
988 },
989
990#ifdef CONFIG_ACPI_PCI
991 /*
992 * Boxes that need ACPI PCI IRQ routing disabled
993 */
994 {
995 .callback = disable_acpi_irq,
996 .ident = "ASUS A7V",
997 .matches = {
998 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
999 DMI_MATCH(DMI_BOARD_NAME, "<A7V>"),
1000 /* newer BIOS, Revision 1011, does work */
1001 DMI_MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
1002 },
1003 },
1004
1005 /*
1006 * Boxes that need ACPI PCI IRQ routing and PCI scan disabled
1007 */
1008 { /* _BBN 0 bug */
1009 .callback = disable_acpi_pci,
1010 .ident = "ASUS PR-DLS",
1011 .matches = {
1012 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
1013 DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"),
1014 DMI_MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS Revision 1010"),
1015 DMI_MATCH(DMI_BIOS_DATE, "03/21/2003")
1016 },
1017 },
1018 {
1019 .callback = disable_acpi_pci,
1020 .ident = "Acer TravelMate 36x Laptop",
1021 .matches = {
1022 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
1023 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
1024 },
1025 },
1026#endif
1027};
1028
1029#endif /* __i386__ */
1030
818/* 1031/*
819 * acpi_boot_table_init() and acpi_boot_init() 1032 * acpi_boot_table_init() and acpi_boot_init()
820 * called from setup_arch(), always. 1033 * called from setup_arch(), always.
@@ -843,6 +1056,10 @@ acpi_boot_table_init(void)
843{ 1056{
844 int error; 1057 int error;
845 1058
1059#ifdef __i386__
1060 dmi_check_system(acpi_dmi_table);
1061#endif
1062
846 /* 1063 /*
847 * If acpi_disabled, bail out 1064 * If acpi_disabled, bail out
848 * One exception: acpi=ht continues far enough to enumerate LAPICs 1065 * One exception: acpi=ht continues far enough to enumerate LAPICs
@@ -870,8 +1087,6 @@ acpi_boot_table_init(void)
870 */ 1087 */
871 error = acpi_blacklisted(); 1088 error = acpi_blacklisted();
872 if (error) { 1089 if (error) {
873 extern int acpi_force;
874
875 if (acpi_force) { 1090 if (acpi_force) {
876 printk(KERN_WARNING PREFIX "acpi=force override\n"); 1091 printk(KERN_WARNING PREFIX "acpi=force override\n");
877 } else { 1092 } else {
diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
index 3facd20212bb..b4bae60f5065 100644
--- a/arch/i386/kernel/dmi_scan.c
+++ b/arch/i386/kernel/dmi_scan.c
@@ -188,59 +188,6 @@ static __init int reset_videomode_after_s3(struct dmi_blacklist *d)
188#endif 188#endif
189 189
190 190
191#ifdef CONFIG_ACPI_BOOT
192extern int acpi_force;
193
194static __init __attribute__((unused)) int dmi_disable_acpi(struct dmi_blacklist *d)
195{
196 if (!acpi_force) {
197 printk(KERN_NOTICE "%s detected: acpi off\n",d->ident);
198 disable_acpi();
199 } else {
200 printk(KERN_NOTICE
201 "Warning: DMI blacklist says broken, but acpi forced\n");
202 }
203 return 0;
204}
205
206/*
207 * Limit ACPI to CPU enumeration for HT
208 */
209static __init __attribute__((unused)) int force_acpi_ht(struct dmi_blacklist *d)
210{
211 if (!acpi_force) {
212 printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", d->ident);
213 disable_acpi();
214 acpi_ht = 1;
215 } else {
216 printk(KERN_NOTICE
217 "Warning: acpi=force overrules DMI blacklist: acpi=ht\n");
218 }
219 return 0;
220}
221#endif
222
223#ifdef CONFIG_ACPI_PCI
224static __init int disable_acpi_irq(struct dmi_blacklist *d)
225{
226 if (!acpi_force) {
227 printk(KERN_NOTICE "%s detected: force use of acpi=noirq\n",
228 d->ident);
229 acpi_noirq_set();
230 }
231 return 0;
232}
233static __init int disable_acpi_pci(struct dmi_blacklist *d)
234{
235 if (!acpi_force) {
236 printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n",
237 d->ident);
238 acpi_disable_pci();
239 }
240 return 0;
241}
242#endif
243
244/* 191/*
245 * Process the DMI blacklists 192 * Process the DMI blacklists
246 */ 193 */
@@ -264,116 +211,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
264 } }, 211 } },
265#endif 212#endif
266 213
267#ifdef CONFIG_ACPI_BOOT
268 /*
269 * If your system is blacklisted here, but you find that acpi=force
270 * works for you, please contact acpi-devel@sourceforge.net
271 */
272
273 /*
274 * Boxes that need ACPI disabled
275 */
276
277 { dmi_disable_acpi, "IBM Thinkpad", {
278 MATCH(DMI_BOARD_VENDOR, "IBM"),
279 MATCH(DMI_BOARD_NAME, "2629H1G"),
280 NO_MATCH, NO_MATCH }},
281
282 /*
283 * Boxes that need acpi=ht
284 */
285
286 { force_acpi_ht, "FSC Primergy T850", {
287 MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
288 MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
289 NO_MATCH, NO_MATCH }},
290
291 { force_acpi_ht, "DELL GX240", {
292 MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
293 MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
294 NO_MATCH, NO_MATCH }},
295
296 { force_acpi_ht, "HP VISUALIZE NT Workstation", {
297 MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
298 MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
299 NO_MATCH, NO_MATCH }},
300
301 { force_acpi_ht, "Compaq Workstation W8000", {
302 MATCH(DMI_SYS_VENDOR, "Compaq"),
303 MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
304 NO_MATCH, NO_MATCH }},
305
306 { force_acpi_ht, "ASUS P4B266", {
307 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
308 MATCH(DMI_BOARD_NAME, "P4B266"),
309 NO_MATCH, NO_MATCH }},
310
311 { force_acpi_ht, "ASUS P2B-DS", {
312 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
313 MATCH(DMI_BOARD_NAME, "P2B-DS"),
314 NO_MATCH, NO_MATCH }},
315
316 { force_acpi_ht, "ASUS CUR-DLS", {
317 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
318 MATCH(DMI_BOARD_NAME, "CUR-DLS"),
319 NO_MATCH, NO_MATCH }},
320
321 { force_acpi_ht, "ABIT i440BX-W83977", {
322 MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
323 MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
324 NO_MATCH, NO_MATCH }},
325
326 { force_acpi_ht, "IBM Bladecenter", {
327 MATCH(DMI_BOARD_VENDOR, "IBM"),
328 MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
329 NO_MATCH, NO_MATCH }},
330
331 { force_acpi_ht, "IBM eServer xSeries 360", {
332 MATCH(DMI_BOARD_VENDOR, "IBM"),
333 MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
334 NO_MATCH, NO_MATCH }},
335
336 { force_acpi_ht, "IBM eserver xSeries 330", {
337 MATCH(DMI_BOARD_VENDOR, "IBM"),
338 MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
339 NO_MATCH, NO_MATCH }},
340
341 { force_acpi_ht, "IBM eserver xSeries 440", {
342 MATCH(DMI_BOARD_VENDOR, "IBM"),
343 MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
344 NO_MATCH, NO_MATCH }},
345
346#endif // CONFIG_ACPI_BOOT
347
348#ifdef CONFIG_ACPI_PCI
349 /*
350 * Boxes that need ACPI PCI IRQ routing disabled
351 */
352
353 { disable_acpi_irq, "ASUS A7V", {
354 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
355 MATCH(DMI_BOARD_NAME, "<A7V>"),
356 /* newer BIOS, Revision 1011, does work */
357 MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
358 NO_MATCH }},
359
360 /*
361 * Boxes that need ACPI PCI IRQ routing and PCI scan disabled
362 */
363 { disable_acpi_pci, "ASUS PR-DLS", { /* _BBN 0 bug */
364 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
365 MATCH(DMI_BOARD_NAME, "PR-DLS"),
366 MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS Revision 1010"),
367 MATCH(DMI_BIOS_DATE, "03/21/2003") }},
368
369 { disable_acpi_pci, "Acer TravelMate 36x Laptop", {
370 MATCH(DMI_SYS_VENDOR, "Acer"),
371 MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
372 NO_MATCH, NO_MATCH
373 } },
374
375#endif
376
377 { NULL, } 214 { NULL, }
378}; 215};
379 216