2 From: Len Brown <len.brown@intel.com>
4 This patch updates 2.6.0-test5 to the current ACPI in 2.4.22-pre5
5 If nothing explodes, I'll be releasing it to Linus shortly via BK.
7 (then I'll send a patch with the upcoming linux-acpi-test-2.6.0 changes)
9 The thing most 2.6 users will notice is that the CONFIG_ACPI_HT_ONLY
10 scheme has been returned to the one used in 2.4.22 that people
11 liked better; but several key platform fixes are included too.
16 It is also available here:
17 http://linux-acpi.bkbits.net:8080/linux-acpi-release-2.6.0
20 http://prdownloads.sourceforge.net/acpi/acpi-20030916-2.6.0-test5.diff?download
22 ChangeSet@1.1315.7.7, 2003-09-18 12:01:37-07:00, len.brown@intel.com
23 ACPI_CA_VERSION 0x20030916
25 ChangeSet@1.1315.7.6, 2003-09-18 11:59:12-07:00, len.brown@intel.com
26 remove ASUS A7V BIOS version 1011 from blacklist (Eric Valette)
28 ChangeSet@1.1315.7.5, 2003-09-18 11:41:51-07:00, len.brown@intel.com
29 IBM ThinkPAD T30/T40 oops (David Shaohua Li)
30 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=98849
32 ChangeSet@1.1315.7.4, 2003-09-18 11:29:42-07:00, len.brown@intel.com
33 Extended IRQ resource type for nForce (Andrew de Quincey)
35 ChangeSet@1.1315.7.3, 2003-09-18 10:58:41-07:00, len.brown@intel.com
36 [ACPI] Handle systems that specify non-ACPI-compliant SCI over-rides
40 ChangeSet@1.1315.7.2, 2003-09-18 10:54:11-07:00, len.brown@intel.com
41 Handle BIOS with _CRS that fails (Jun Nakajima)
43 ChangeSet@1.1315.7.1, 2003-09-18 00:52:06-04:00, len.brown@intel.com
44 [ACPI] merge 2.4.22 cleanup into 2.6
45 Restores CONFIG_ACPI_HT_ONLY as an alternative to CONFIG_ACPI
46 rather than a prerequisite
48 ChangeSet@1.1130.1.2, 2003-09-15 00:34:00-04:00, len.brown@intel.com
49 sync 2.4.22 changes into 2.6
50 Note that this restores CONFIG_ACPI_HT_ONLY as a sub-set of
56 arch/i386/kernel/acpi/boot.c | 10 +--
57 arch/i386/kernel/dmi_scan.c | 10 +--
58 arch/i386/kernel/mpparse.c | 31 +++++------
59 arch/i386/kernel/setup.c | 2
60 drivers/acpi/Kconfig | 108 ++++++++++++++++++++++-------------------
61 drivers/acpi/Makefile | 2
62 drivers/acpi/ec.c | 7 +-
63 drivers/acpi/events/evregion.c | 6 +-
64 drivers/acpi/pci_link.c | 74 +++++++++++++++++++++-------
65 include/acpi/acconfig.h | 2
66 include/linux/acpi.h | 6 +-
68 12 files changed, 155 insertions(+), 104 deletions(-)
70 diff -puN arch/i386/kernel/acpi/boot.c~acpi-20030916 arch/i386/kernel/acpi/boot.c
71 --- 25/arch/i386/kernel/acpi/boot.c~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
72 +++ 25-akpm/arch/i386/kernel/acpi/boot.c 2003-09-26 22:15:04.000000000 -0700
73 @@ -183,8 +183,7 @@ acpi_parse_lapic_nmi (
75 #endif /*CONFIG_X86_LOCAL_APIC*/
77 -#ifdef CONFIG_X86_IO_APIC
79 +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
83 @@ -368,7 +367,6 @@ acpi_boot_init (void)
85 result = acpi_table_parse(ACPI_APIC, acpi_parse_madt);
87 - printk(KERN_WARNING PREFIX "MADT not present\n");
90 else if (result < 0) {
91 @@ -416,7 +414,7 @@ acpi_boot_init (void)
93 #endif /*CONFIG_X86_LOCAL_APIC*/
95 -#ifdef CONFIG_X86_IO_APIC
96 +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
100 @@ -472,7 +470,8 @@ acpi_boot_init (void)
101 acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC;
104 -#endif /*CONFIG_X86_IO_APIC*/
106 +#endif /* CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER */
108 #ifdef CONFIG_X86_LOCAL_APIC
109 if (acpi_lapic && acpi_ioapic) {
110 @@ -480,6 +479,7 @@ acpi_boot_init (void)
111 clustered_apic_check();
115 #ifdef CONFIG_HPET_TIMER
116 acpi_table_parse(ACPI_HPET, acpi_parse_hpet);
118 diff -puN arch/i386/kernel/dmi_scan.c~acpi-20030916 arch/i386/kernel/dmi_scan.c
119 --- 25/arch/i386/kernel/dmi_scan.c~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
120 +++ 25-akpm/arch/i386/kernel/dmi_scan.c 2003-09-26 22:15:04.000000000 -0700
121 @@ -939,11 +939,6 @@ static __initdata struct dmi_blacklist d
122 MATCH(DMI_BOARD_NAME, "CUR-DLS"),
123 NO_MATCH, NO_MATCH }},
125 - { force_acpi_ht, "ASUS A7V", {
126 - MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
127 - MATCH(DMI_BOARD_NAME, "<A7V>"),
128 - MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1011"), NO_MATCH }},
130 { force_acpi_ht, "ABIT i440BX-W83977", {
131 MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
132 MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
133 @@ -978,7 +973,10 @@ static __initdata struct dmi_blacklist d
134 { disable_acpi_pci, "ASUS A7V", {
135 MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
136 MATCH(DMI_BOARD_NAME, "<A7V>"),
137 - MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), NO_MATCH }},
138 + /* newer BIOS, Revision 1011, does work */
139 + MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
145 diff -puN arch/i386/kernel/mpparse.c~acpi-20030916 arch/i386/kernel/mpparse.c
146 --- 25/arch/i386/kernel/mpparse.c~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
147 +++ 25-akpm/arch/i386/kernel/mpparse.c 2003-09-26 22:15:04.000000000 -0700
148 @@ -830,7 +830,7 @@ void __init mp_register_lapic (
149 MP_processor_info(&processor);
152 -#ifdef CONFIG_X86_IO_APIC
153 +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
156 #define MP_MAX_IOAPIC_PIN 127
157 @@ -1019,10 +1019,6 @@ void __init mp_config_acpi_legacy_irqs (
163 -/* Ensure the ACPI SCI interrupt level is active low, edge-triggered */
165 extern FADT_DESCRIPTOR acpi_fadt;
167 void __init mp_config_ioapic_for_sci(int irq)
168 @@ -1031,6 +1027,7 @@ void __init mp_config_ioapic_for_sci(int
170 struct acpi_table_madt *madt;
171 struct acpi_table_int_src_ovr *entry = NULL;
172 + acpi_interrupt_flags flags;
176 @@ -1054,15 +1051,12 @@ void __init mp_config_ioapic_for_sci(int
177 * See the note at the end of ACPI 2.0b section
178 * 5.2.10.8 for what this is about.
180 - if (entry->bus_irq != entry->global_irq) {
181 - acpi_fadt.sci_int = entry->global_irq;
182 - irq = entry->global_irq;
187 + flags = entry->flags;
188 + acpi_fadt.sci_int = entry->global_irq;
189 + irq = entry->global_irq;
194 entry = (struct acpi_table_int_src_ovr *)
195 ((unsigned long) entry + entry->header.length);
197 @@ -1072,9 +1066,14 @@ void __init mp_config_ioapic_for_sci(int
199 ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
201 - io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 1, 1); // Active low, level triggered
202 + if (flags.polarity == 0)
203 + flags.polarity = 0x3; /* Active low */
204 + if (flags.trigger == 0)
205 + flags.trigger = 0x3; /* Level-triggered */
207 + io_apic_set_pci_routing(ioapic, ioapic_pin, irq,
208 + (flags.trigger >> 1) , (flags.polarity >> 1));
210 -#endif /* CONFIG_ACPI */
212 #ifdef CONFIG_ACPI_PCI
214 @@ -1154,5 +1153,5 @@ void __init mp_parse_prt (void)
217 #endif /*CONFIG_ACPI_PCI*/
218 -#endif /* CONFIG_X86_IO_APIC */
219 +#endif /*CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER*/
220 #endif /*CONFIG_ACPI_BOOT*/
221 diff -puN arch/i386/kernel/setup.c~acpi-20030916 arch/i386/kernel/setup.c
222 --- 25/arch/i386/kernel/setup.c~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
223 +++ 25-akpm/arch/i386/kernel/setup.c 2003-09-26 22:15:04.000000000 -0700
224 @@ -64,7 +64,7 @@ struct cpuinfo_x86 boot_cpu_data = { 0,
225 unsigned long mmu_cr4_features;
226 EXPORT_SYMBOL_GPL(mmu_cr4_features);
229 +#ifdef CONFIG_ACPI_INTERPRETER
230 int acpi_disabled __initdata = 0;
232 int acpi_disabled __initdata = 1;
233 diff -puN drivers/acpi/ec.c~acpi-20030916 drivers/acpi/ec.c
234 --- 25/drivers/acpi/ec.c~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
235 +++ 25-akpm/drivers/acpi/ec.c 2003-09-26 22:15:04.000000000 -0700
238 #include <acpi/acpi_bus.h>
239 #include <acpi/acpi_drivers.h>
241 +#include <acpi/actypes.h>
243 #define _COMPONENT ACPI_EC_COMPONENT
244 ACPI_MODULE_NAME ("acpi_ec")
245 @@ -412,7 +412,10 @@ acpi_ec_space_setup (
246 * The EC object is in the handler context and is needed
247 * when calling the acpi_ec_space_handler.
249 - *return_context = handler_context;
250 + if(function == ACPI_REGION_DEACTIVATE)
251 + *return_context = NULL;
253 + *return_context = handler_context;
257 diff -puN drivers/acpi/events/evregion.c~acpi-20030916 drivers/acpi/events/evregion.c
258 --- 25/drivers/acpi/events/evregion.c~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
259 +++ 25-akpm/drivers/acpi/events/evregion.c 2003-09-26 22:15:04.000000000 -0700
260 @@ -382,7 +382,7 @@ acpi_ev_detach_region(
261 union acpi_operand_object *obj_desc;
262 union acpi_operand_object **last_obj_ptr;
263 acpi_adr_space_setup region_setup;
264 - void *region_context;
265 + void **region_context;
266 union acpi_operand_object *region_obj2;
269 @@ -394,7 +394,7 @@ acpi_ev_detach_region(
273 - region_context = region_obj2->extra.region_context;
274 + region_context = ®ion_obj2->extra.region_context;
276 /* Get the address handler from the region object */
278 @@ -450,7 +450,7 @@ acpi_ev_detach_region(
280 region_setup = handler_obj->address_space.setup;
281 status = region_setup (region_obj, ACPI_REGION_DEACTIVATE,
282 - handler_obj->address_space.context, ®ion_context);
283 + handler_obj->address_space.context, region_context);
285 /* Init routine may fail, Just ignore errors */
287 diff -puN drivers/acpi/Kconfig~acpi-20030916 drivers/acpi/Kconfig
288 --- 25/drivers/acpi/Kconfig~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
289 +++ 25-akpm/drivers/acpi/Kconfig 2003-09-26 22:15:04.000000000 -0700
293 menu "ACPI (Advanced Configuration and Power Interface) Support"
296 - bool "ACPI Processor Enumeration for HT"
300 - ACPI enumerates both logical (a.k.a. Hyper-Threaded -- HT)
301 - and physical processors. It is designed to obsolete several older
302 - specifications, including the MultiProcessor Specification (MPS),
303 - which supported only physical processors.
305 - CONFIG_ACPI_HT includes the minimal ACPI boot-time code
306 - necessary to enumerate logical processors and enable HT.
308 - CONFIG_ACPI includes CONFIG_ACPI_HT, plus IO APIC enumeration,
309 - and the hooks to run the ACPI AML interpreter for run-time events.
311 - When CONFIG_ACPI is selected, the command-line option "acpi=ht"
312 - is available to run just the ACPI boot-time code -- just as if
313 - only CONFIG_ACPI_HT were selected.
315 - Note that "acpi=off" can be used to disable all ACPI code in the kernel.
318 - bool "Full ACPI Support"
319 depends on !X86_VISWS
320 depends on !IA64_HP_SIM
321 - depends on IA64 || (X86 || ACPI_HT)
322 + depends on IA64 || X86
325 + bool "ACPI Support"
326 + depends on IA64 || X86
330 Advanced Configuration and Power Interface (ACPI) support for
331 @@ -60,14 +40,47 @@ config ACPI
333 <http://www.acpi.info>
336 + bool "Restrict ACPI to minimum boot code to enable HT"
342 + ACPI enumerates both logical (a.k.a. Hyper-Threaded -- HT)
343 + and physical processors. It is designed to obsolete several older
344 + specifications, including the MultiProcessor Specification (MPS),
345 + which supported only physical processors.
347 + CONFIG_ACPI_HT_ONLY includes just the minimal ACPI boot-time code
348 + necessary to enumerate logical processors and enable HT.
350 + CONFIG_ACPI includes this, plus IO APIC enumeration,
351 + and the hooks to run the ACPI AML interpreter for run-time events.
353 + When CONFIG_ACPI is selected, the command-line option "acpi=ht"
354 + is available to run just the ACPI boot-time code -- just as if
355 + only CONFIG_ACPI_HT_ONLY were selected.
357 + Note that "acpi=off" can be used to disable all ACPI code in the kernel.
362 - depends on ACPI || ACPI_HT
366 +config ACPI_INTERPRETER
369 + depends on !IA64_SGI_SN
370 + depends on !ACPI_HT_ONLY
374 bool "Sleep States (EXPERIMENTAL)"
375 depends on X86 && ACPI
376 + depends on ACPI_INTERPRETER
377 depends on EXPERIMENTAL && PM
380 @@ -93,7 +106,8 @@ config ACPI_SLEEP_PROC_FS
383 tristate "AC Adapter"
384 - depends on X86 && ACPI
386 + depends on ACPI_INTERPRETER
389 This driver adds support for the AC Adapter object, which indicates
390 @@ -102,7 +116,8 @@ config ACPI_AC
394 - depends on X86 && ACPI
396 + depends on ACPI_INTERPRETER
399 This driver adds support for battery information through
400 @@ -111,7 +126,7 @@ config ACPI_BATTERY
405 + depends on ACPI_INTERPRETER
406 depends on !IA64_SGI_SN
409 @@ -123,7 +138,7 @@ config ACPI_BUTTON
414 + depends on ACPI_INTERPRETER
415 depends on !IA64_SGI_SN
418 @@ -132,7 +147,7 @@ config ACPI_FAN
420 config ACPI_PROCESSOR
423 + depends on ACPI_INTERPRETER
424 depends on !IA64_SGI_SN
427 @@ -152,14 +167,15 @@ config ACPI_THERMAL
432 + depends on ACPI_INTERPRETER
435 default y if IA64_GENERIC || IA64_SGI_SN2
438 tristate "ASUS/Medion Laptop Extras"
439 - depends on X86 && ACPI
441 + depends on ACPI_INTERPRETER
444 This driver provides support for extra features of ACPI-compatible
445 @@ -185,7 +201,8 @@ config ACPI_ASUS
448 tristate "Toshiba Laptop Extras"
449 - depends on X86 && ACPI
451 + depends on ACPI_INTERPRETER
454 This driver adds support for access to certain system settings
455 @@ -212,7 +229,7 @@ config ACPI_TOSHIBA
458 bool "Debug Statements"
460 + depends on ACPI_INTERPRETER
461 depends on !IA64_SGI_SN
464 @@ -222,19 +239,14 @@ config ACPI_DEBUG
469 - depends on !IA64_SGI_SN
472 -config ACPI_INTERPRETER
475 + depends on ACPI_INTERPRETER
476 depends on !IA64_SGI_SN
481 - depends on X86 && ACPI
483 + depends on ACPI_INTERPRETER
486 This driver is required on some systems for the proper operation of
487 @@ -243,19 +255,19 @@ config ACPI_EC
492 + depends on ACPI_INTERPRETER
493 depends on !IA64_SGI_SN
499 + depends on ACPI_INTERPRETER
500 depends on !IA64_SGI_SN
506 + depends on ACPI_INTERPRETER
507 depends on !IA64_SGI_SN
510 @@ -264,7 +276,7 @@ config ACPI_SYSTEM
515 + depends on ACPI_INTERPRETER
519 diff -puN drivers/acpi/Makefile~acpi-20030916 drivers/acpi/Makefile
520 --- 25/drivers/acpi/Makefile~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
521 +++ 25-akpm/drivers/acpi/Makefile 2003-09-26 22:15:04.000000000 -0700
522 @@ -18,7 +18,7 @@ obj-$(CONFIG_ACPI) := acpi_ksyms.o
523 # ACPI Boot-Time Table Parsing
525 obj-$(CONFIG_ACPI_BOOT) += tables.o
526 -obj-$(CONFIG_ACPI) += blacklist.o
527 +obj-$(CONFIG_ACPI_INTERPRETER) += blacklist.o
530 # ACPI Core Subsystem (Interpreter)
531 diff -puN drivers/acpi/pci_link.c~acpi-20030916 drivers/acpi/pci_link.c
532 --- 25/drivers/acpi/pci_link.c~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
533 +++ 25-akpm/drivers/acpi/pci_link.c 2003-09-26 22:15:04.000000000 -0700
534 @@ -220,7 +220,6 @@ acpi_pci_link_check_current (
535 return AE_CTRL_TERMINATE;
540 acpi_pci_link_get_current (
541 struct acpi_pci_link *link)
542 @@ -279,6 +278,28 @@ end:
543 return_VALUE(result);
547 +acpi_pci_link_try_get_current (
548 + struct acpi_pci_link *link,
553 + ACPI_FUNCTION_TRACE("acpi_pci_link_try_get_current");
555 + result = acpi_pci_link_get_current(link);
556 + if (result && link->irq.active) {
557 + return_VALUE(result);
560 + if (!link->irq.active) {
561 + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No active IRQ resource found\n"));
562 + printk(KERN_WARNING "_CRS returns NULL! Using IRQ %d for device (%s [%s]).\n", irq, acpi_device_name(link->device), acpi_device_bid(link->device));
563 + link->irq.active = irq;
571 @@ -294,6 +315,7 @@ acpi_pci_link_set (
572 struct acpi_buffer buffer = {sizeof(resource)+1, &resource};
575 + int resource_type = 0;
577 ACPI_FUNCTION_TRACE("acpi_pci_link_set");
579 @@ -317,20 +339,32 @@ acpi_pci_link_set (
583 + /* If IRQ<=15, first try with a "normal" IRQ descriptor. If that fails, try with
584 + * an extended one */
586 + resource_type = ACPI_RSTYPE_IRQ;
588 + resource_type = ACPI_RSTYPE_EXT_IRQ;
593 memset(&resource, 0, sizeof(resource));
595 /* NOTE: PCI interrupts are always level / active_low / shared. But not all
596 interrupts > 15 are PCI interrupts. Rely on the ACPI IRQ definition for
599 + switch(resource_type) {
600 + case ACPI_RSTYPE_IRQ:
601 resource.res.id = ACPI_RSTYPE_IRQ;
602 resource.res.length = sizeof(struct acpi_resource);
603 resource.res.data.irq.edge_level = link->irq.edge_level;
604 resource.res.data.irq.active_high_low = link->irq.active_high_low;
605 resource.res.data.irq.number_of_interrupts = 1;
606 resource.res.data.irq.interrupts[0] = irq;
611 + case ACPI_RSTYPE_EXT_IRQ:
612 resource.res.id = ACPI_RSTYPE_EXT_IRQ;
613 resource.res.length = sizeof(struct acpi_resource);
614 resource.res.data.extended_irq.producer_consumer = ACPI_CONSUMER;
615 @@ -339,11 +373,21 @@ acpi_pci_link_set (
616 resource.res.data.extended_irq.number_of_interrupts = 1;
617 resource.res.data.extended_irq.interrupts[0] = irq;
618 /* ignore resource_source, it's optional */
621 resource.end.id = ACPI_RSTYPE_END_TAG;
623 /* Attempt to set the resource */
624 status = acpi_set_current_resources(link->handle, &buffer);
626 + /* if we failed and IRQ <= 15, try again with an extended descriptor */
627 + if (ACPI_FAILURE(status) && (resource_type == ACPI_RSTYPE_IRQ)) {
628 + resource_type = ACPI_RSTYPE_EXT_IRQ;
629 + printk(PREFIX "Retrying with extended IRQ descriptor\n");
630 + goto retry_programming;
633 + /* check for total failure */
634 if (ACPI_FAILURE(status)) {
635 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n"));
636 return_VALUE(-ENODEV);
637 @@ -361,7 +405,7 @@ acpi_pci_link_set (
640 /* Make sure the active IRQ is the one we requested. */
641 - result = acpi_pci_link_get_current(link);
642 + result = acpi_pci_link_try_get_current(link, irq);
644 return_VALUE(result);
646 @@ -458,14 +502,14 @@ static int acpi_pci_link_allocate(struct
647 irq = link->irq.possible[0];
651 - * Select the best IRQ. This is done in reverse to promote
652 - * the use of IRQs 9, 10, 11, and >15.
654 - for (i=(link->irq.possible_count-1); i>0; i--) {
655 - if (acpi_irq_penalty[irq] > acpi_irq_penalty[link->irq.possible[i]])
656 - irq = link->irq.possible[i];
659 + * Select the best IRQ. This is done in reverse to promote
660 + * the use of IRQs 9, 10, 11, and >15.
662 + for (i=(link->irq.possible_count-1); i>0; i--) {
663 + if (acpi_irq_penalty[irq] > acpi_irq_penalty[link->irq.possible[i]])
664 + irq = link->irq.possible[i];
667 /* Attempt to enable the link device at this IRQ. */
668 if (acpi_pci_link_set(link, irq)) {
669 @@ -574,10 +618,6 @@ acpi_pci_link_add (
671 printk(" %d", link->irq.possible[i]);
673 - if (!link->irq.active)
674 - printk(", disabled");
676 - printk(", enabled at IRQ %d", link->irq.active);
679 /* TBD: Acquire/release lock */
680 diff -puN include/acpi/acconfig.h~acpi-20030916 include/acpi/acconfig.h
681 --- 25/include/acpi/acconfig.h~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
682 +++ 25-akpm/include/acpi/acconfig.h 2003-09-26 22:15:04.000000000 -0700
687 -#define ACPI_CA_VERSION 0x20030813
688 +#define ACPI_CA_VERSION 0x20030916
690 /* Maximum objects in the various object caches */
692 diff -puN include/linux/acpi.h~acpi-20030916 include/linux/acpi.h
693 --- 25/include/linux/acpi.h~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
694 +++ 25-akpm/include/linux/acpi.h 2003-09-26 22:15:04.000000000 -0700
695 @@ -424,17 +424,17 @@ int ec_write(u8 addr, u8 val);
697 #endif /*CONFIG_ACPI_EC*/
700 +#ifdef CONFIG_ACPI_INTERPRETER
702 int acpi_blacklisted(void);
705 +#else /*!CONFIG_ACPI_INTERPRETER*/
707 static inline int acpi_blacklisted(void)
712 -#endif /*CONFIG_ACPI*/
713 +#endif /*!CONFIG_ACPI_INTERPRETER*/
715 #endif /*_LINUX_ACPI_H*/
716 diff -puN init/do_mounts.h~acpi-20030916 init/do_mounts.h
717 --- 25/init/do_mounts.h~acpi-20030916 2003-09-26 22:15:04.000000000 -0700
718 +++ 25-akpm/init/do_mounts.h 2003-09-26 22:15:04.000000000 -0700
719 @@ -104,4 +104,3 @@ void md_run_setup(void);
720 static inline void md_run_setup(void) {}
727 From: Andi Kleen <ak@suse.de>
729 ACPI modules check acpi_disabled at module load time. This fixes random
730 failures to load battery.o et.al.
734 25-akpm/arch/i386/kernel/setup.c | 4 ++--
735 25-akpm/arch/ia64/kernel/acpi.c | 2 +-
736 2 files changed, 3 insertions(+), 3 deletions(-)
738 diff -puN arch/i386/kernel/setup.c~acpi_disabled-fix arch/i386/kernel/setup.c
739 --- 25/arch/i386/kernel/setup.c~acpi_disabled-fix Tue Sep 23 14:01:14 2003
740 +++ 25-akpm/arch/i386/kernel/setup.c Tue Sep 23 14:01:14 2003
741 @@ -65,9 +65,9 @@ unsigned long mmu_cr4_features;
742 EXPORT_SYMBOL_GPL(mmu_cr4_features);
744 #ifdef CONFIG_ACPI_INTERPRETER
745 - int acpi_disabled __initdata = 0;
746 + int acpi_disabled = 0;
748 - int acpi_disabled __initdata = 1;
749 + int acpi_disabled = 1;
751 EXPORT_SYMBOL(acpi_disabled);
753 diff -puN arch/ia64/kernel/acpi.c~acpi_disabled-fix arch/ia64/kernel/acpi.c
754 --- 25/arch/ia64/kernel/acpi.c~acpi_disabled-fix Tue Sep 23 14:01:14 2003
755 +++ 25-akpm/arch/ia64/kernel/acpi.c Tue Sep 23 14:01:14 2003
756 @@ -56,7 +56,7 @@ void (*pm_power_off) (void);
758 unsigned char acpi_kbd_controller_present = 1;
760 -int acpi_disabled __initdata; /* XXX this shouldn't be needed---we can't boot without ACPI! */
761 +int acpi_disabled; /* XXX this shouldn't be needed---we can't boot without ACPI! */
764 acpi_get_sysname (void)
768 From: Chris Wright <chrisw@osdl.org>
773 25-akpm/drivers/acpi/pci_link.c | 16 ++++++++--------
774 1 files changed, 8 insertions(+), 8 deletions(-)
776 diff -puN drivers/acpi/pci_link.c~acpi-pci-irq-fix-439 drivers/acpi/pci_link.c
777 --- 25/drivers/acpi/pci_link.c~acpi-pci-irq-fix-439 Mon Sep 22 14:08:48 2003
778 +++ 25-akpm/drivers/acpi/pci_link.c Mon Sep 22 14:08:48 2003
779 @@ -500,15 +500,15 @@ static int acpi_pci_link_allocate(struct
780 irq = link->irq.active;
782 irq = link->irq.possible[0];
786 - * Select the best IRQ. This is done in reverse to promote
787 - * the use of IRQs 9, 10, 11, and >15.
789 - for (i=(link->irq.possible_count-1); i>0; i--) {
790 - if (acpi_irq_penalty[irq] > acpi_irq_penalty[link->irq.possible[i]])
791 - irq = link->irq.possible[i];
793 + * Select the best IRQ. This is done in reverse to promote
794 + * the use of IRQs 9, 10, 11, and >15.
796 + for (i=(link->irq.possible_count-1); i>0; i--) {
797 + if (acpi_irq_penalty[irq] > acpi_irq_penalty[link->irq.possible[i]])
798 + irq = link->irq.possible[i];
802 /* Attempt to enable the link device at this IRQ. */
806 From: Ramon Casellas <casellas@infres.enst.fr>
810 Original patch from Li, Shaohua <shaohua@in...> for 2.4.22/23, ported to
811 2.6.0-test5-mm3 (with acpi 20030916), please test.
814 ----------------------------------------------------------
815 http://sourceforge.net/mailarchive/forum.php?thread_id=3144527&forum_id=6102
818 -----------------------------------------------------------
819 > From: Li, Shaohua <shaohua@in...>
820 > RE: Re: IBM Thinkpad and ACPI 20030916 for 2.4.23-pre4
824 > Patch for the battery error is available in OSDL bugzilla #1038. Pl.
828 -----------------------------------------------------------
834 25-akpm/drivers/acpi/utilities/utdelete.c | 36 +++++++++++++++++++++++++++---
835 1 files changed, 33 insertions(+), 3 deletions(-)
837 diff -puN drivers/acpi/utilities/utdelete.c~acpi-thinkpad-fix drivers/acpi/utilities/utdelete.c
838 --- 25/drivers/acpi/utilities/utdelete.c~acpi-thinkpad-fix Fri Sep 19 11:11:57 2003
839 +++ 25-akpm/drivers/acpi/utilities/utdelete.c Fri Sep 19 11:11:57 2003
840 @@ -417,6 +417,8 @@ acpi_ut_update_object_reference (
841 union acpi_generic_state *state_list = NULL;
842 union acpi_generic_state *state;
844 + union acpi_operand_object *tmp;
847 ACPI_FUNCTION_TRACE_PTR ("ut_update_object_reference", object);
849 @@ -447,9 +449,16 @@ acpi_ut_update_object_reference (
851 switch (ACPI_GET_OBJECT_TYPE (object)) {
852 case ACPI_TYPE_DEVICE:
854 - acpi_ut_update_ref_count (object->device.system_notify, action);
855 - acpi_ut_update_ref_count (object->device.device_notify, action);
857 + tmp = object->device.system_notify;
858 + if(tmp && tmp->common.reference_count<=1 && action == REF_DECREMENT)
859 + object->device.system_notify = NULL;
860 + acpi_ut_update_ref_count (tmp, action);
862 + tmp = object->device.device_notify;
863 + if(tmp && tmp->common.reference_count <=1 && action == REF_DECREMENT)
864 + object->device.device_notify = NULL;
865 + acpi_ut_update_ref_count (tmp, action);
869 @@ -467,6 +476,9 @@ acpi_ut_update_object_reference (
871 status = acpi_ut_create_update_state_and_push (
872 object->package.elements[i], action, &state_list);
873 + tmp = object->package.elements[i];
874 + if(tmp && tmp->common.reference_count<=1 && action == REF_DECREMENT) /*reference count didn't refresh now*/
875 + object->package.elements[i] = NULL;
876 if (ACPI_FAILURE (status)) {
879 @@ -478,6 +490,9 @@ acpi_ut_update_object_reference (
881 status = acpi_ut_create_update_state_and_push (
882 object->buffer_field.buffer_obj, action, &state_list);
883 + tmp = object->buffer_field.buffer_obj;
884 + if( tmp && tmp->common.reference_count <=1 && action == REF_DECREMENT)/*reference count didn't refresh now*/
885 + object->buffer_field.buffer_obj = NULL;
886 if (ACPI_FAILURE (status)) {
889 @@ -491,6 +506,9 @@ acpi_ut_update_object_reference (
890 if (ACPI_FAILURE (status)) {
893 + tmp = object->field.region_obj;
894 + if( tmp && tmp->common.reference_count <=1 && action == REF_DECREMENT)/*reference count didn't refresh now*/
895 + object->field.region_obj = NULL;
899 @@ -501,12 +519,18 @@ acpi_ut_update_object_reference (
900 if (ACPI_FAILURE (status)) {
903 + tmp = object->bank_field.bank_obj;
904 + if( tmp && tmp->common.reference_count <=1 && action == REF_DECREMENT)/*reference count didn't refresh now*/
905 + object->bank_field.bank_obj = NULL;
907 status = acpi_ut_create_update_state_and_push (
908 object->bank_field.region_obj, action, &state_list);
909 if (ACPI_FAILURE (status)) {
912 + tmp = object->bank_field.region_obj;
913 + if( tmp && tmp->common.reference_count <=1 && action == REF_DECREMENT)/*reference count didn't refresh now*/
914 + object->bank_field.region_obj = NULL;
918 @@ -517,12 +541,18 @@ acpi_ut_update_object_reference (
919 if (ACPI_FAILURE (status)) {
922 + tmp = object->index_field.index_obj;
923 + if( tmp && tmp->common.reference_count <=1 && action == REF_DECREMENT)/*reference count didn't refresh now*/
924 + object->index_field.index_obj = NULL;
926 status = acpi_ut_create_update_state_and_push (
927 object->index_field.data_obj, action, &state_list);
928 if (ACPI_FAILURE (status)) {
931 + tmp = object->index_field.data_obj;
932 + if( tmp && tmp->common.reference_count <=1 && action == REF_DECREMENT)/*reference count didn't refresh now*/
933 + object->index_field.data_obj = NULL;
940 From: Andi Kleen <ak@suse.de>
942 Try this (untested) patch
944 (2.6 version untested, I tested a similar patch on the 2.4 backport of
949 25-akpm/arch/i386/pci/acpi.c | 3 ++-
950 1 files changed, 2 insertions(+), 1 deletion(-)
952 diff -puN arch/i386/pci/acpi.c~acpi_off-fix arch/i386/pci/acpi.c
953 --- 25/arch/i386/pci/acpi.c~acpi_off-fix Tue Sep 9 12:12:00 2003
954 +++ 25-akpm/arch/i386/pci/acpi.c Tue Sep 9 12:12:00 2003
955 @@ -15,10 +15,11 @@ struct pci_bus * __devinit pci_acpi_scan
957 static int __init pci_acpi_init(void)
959 + extern int acpi_disabled;
963 - if (!(pci_probe & PCI_NO_ACPI_ROUTING)) {
964 + if (!(pci_probe & PCI_NO_ACPI_ROUTING) && !acpi_disabled) {
965 if (!acpi_pci_irq_init()) {
966 printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
967 printk(KERN_INFO "PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'\n");