r1299 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches
Christoph Hellwig
hch-guest@haydn.debian.org
Wed, 25 Aug 2004 03:37:23 -0600
Author: hch-guest
Date: 2004-08-25 03:37:10 -0600 (Wed, 25 Aug 2004)
New Revision: 1299
Added:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/acpi-early.dpatch
Modified:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3
Log:
* Enter ACPI mode earlier (closes: #258061) (Christoph Hellwig).
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2004-08-25 05:09:37 UTC (rev 1298)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2004-08-25 09:37:10 UTC (rev 1299)
@@ -21,6 +21,8 @@
drivers-scsi-sym_2-dv-hang, which is a proper fix for the hang
(dann frazier).
+ * Enter ACPI mode earlier (closes: #258061) (Christoph Hellwig).
+
-- Andres Salomon <dilinger@voxel.net> Wed, 18 Aug 2004 02:13:56 -0400
kernel-source-2.6.8 (2.6.8-2) unstable; urgency=high
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3 2004-08-25 05:09:37 UTC (rev 1298)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3 2004-08-25 09:37:10 UTC (rev 1299)
@@ -34,6 +34,7 @@
bio_uncopy_user-memleak
scsi-blacklist
acpi-osname
+acpi-early
pmac-no-of-stdout
net-sched-fix
drivers-scsi-sym_2-dv-hang
Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/acpi-early.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/acpi-early.dpatch 2004-08-25 05:09:37 UTC (rev 1298)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/acpi-early.dpatch 2004-08-25 09:37:10 UTC (rev 1299)
@@ -0,0 +1,234 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Enter ACPI mode earlier
+## DP: Patch author: Len Brown <len.brown@intel.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+# 2004/08/14 01:11:05-04:00 len.brown@intel.com
+# [ACPI] Enter ACPI mode earlier
+# Fixes two common boot failures due to buggy SMM BIOS code
+#
+# SMP boot crash if SMI_CMD=ACPI written from CPU1
+# http://bugzilla.kernel.org/show_bug.cgi?id=2941
+#
+# laptop crash due to LAPIC timer before SMI_CMD=ACPI
+# http://bugzilla.kernel.org/show_bug.cgi?id=1269
+#
+# arch/i386/kernel/dmi_scan.c
+# 2004/08/14 01:10:58-04:00 len.brown@intel.com +0 -44
+# delete local_apic_kills_bios()
+#
+# drivers/acpi/bus.c
+# 2004/08/14 01:10:58-04:00 len.brown@intel.com +32 -6
+# add acpi_early_init()
+#
+# drivers/acpi/osl.c
+# 2004/08/14 01:10:58-04:00 len.brown@intel.com +10 -0
+# defer acpi_os_initialize() to acpi_os_initialize1()
+#
+# init/main.c
+# 2004/08/14 01:10:59-04:00 len.brown@intel.com +7 -0
+# acpi_early_init()
+#
+diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
+--- a/arch/i386/kernel/dmi_scan.c 2004-08-19 12:35:05 -07:00
++++ b/arch/i386/kernel/dmi_scan.c 2004-08-19 12:35:05 -07:00
+@@ -162,26 +162,6 @@
+ #define NO_MATCH { DMI_NONE, NULL}
+ #define MATCH DMI_MATCH
+
+-/*
+- * Some machines, usually laptops, can't handle an enabled local APIC.
+- * The symptoms include hangs or reboots when suspending or resuming,
+- * attaching or detaching the power cord, or entering BIOS setup screens
+- * through magic key sequences.
+- */
+-static int __init local_apic_kills_bios(struct dmi_blacklist *d)
+-{
+-#ifdef CONFIG_X86_LOCAL_APIC
+- extern int enable_local_apic;
+- if (enable_local_apic == 0) {
+- enable_local_apic = -1;
+- printk(KERN_WARNING "%s with broken BIOS detected. "
+- "Refusing to enable the local APIC.\n",
+- d->ident);
+- }
+-#endif
+- return 0;
+-}
+-
+
+ /*
+ * Toshiba keyboard likes to repeat keys when they are not repeated.
+@@ -793,30 +773,6 @@
+ } },
+
+ /* Machines which have problems handling enabled local APICs */
+-
+- { local_apic_kills_bios, "Dell Inspiron", {
+- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+- MATCH(DMI_PRODUCT_NAME, "Inspiron"),
+- NO_MATCH, NO_MATCH
+- } },
+-
+- { local_apic_kills_bios, "Dell Latitude", {
+- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+- MATCH(DMI_PRODUCT_NAME, "Latitude"),
+- NO_MATCH, NO_MATCH
+- } },
+-
+- { local_apic_kills_bios, "IBM Thinkpad T20", {
+- MATCH(DMI_BOARD_VENDOR, "IBM"),
+- MATCH(DMI_BOARD_NAME, "264741U"),
+- NO_MATCH, NO_MATCH
+- } },
+-
+- { local_apic_kills_bios, "ASUS L3C", {
+- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+- MATCH(DMI_BOARD_NAME, "P4_L3C"),
+- NO_MATCH, NO_MATCH
+- } },
+
+ { broken_acpi_Sx, "ASUS K7V-RM", { /* Bad ACPI Sx table */
+ MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),
+diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
+--- a/drivers/acpi/bus.c 2004-08-19 12:35:05 -07:00
++++ b/drivers/acpi/bus.c 2004-08-19 12:35:05 -07:00
+@@ -590,10 +590,9 @@
+ }
+
+
+-static int __init
+-acpi_bus_init (void)
++void __init
++acpi_early_init (void)
+ {
+- int result = 0;
+ acpi_status status = AE_OK;
+ struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
+
+@@ -617,7 +616,7 @@
+ status = acpi_get_table(ACPI_TABLE_FADT, 1, &buffer);
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_ERR PREFIX "Unable to get the FADT\n");
+- goto error1;
++ goto error0;
+ }
+
+ #ifdef CONFIG_X86
+@@ -640,12 +639,40 @@
+ }
+ #endif
+
+- status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);
++ status = acpi_enable_subsystem(~(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE));
++ if (ACPI_FAILURE(status)) {
++ printk(KERN_ERR PREFIX "Unable to enable ACPI\n");
++ goto error0;
++ }
++
++ return;
++
++error0:
++ disable_acpi();
++ return;
++}
++
++static int __init
++acpi_bus_init (void)
++{
++ int result = 0;
++ acpi_status status = AE_OK;
++ extern acpi_status acpi_os_initialize1(void);
++
++ ACPI_FUNCTION_TRACE("acpi_bus_init");
++
++ status = acpi_os_initialize1();
++
++ status = acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE);
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_ERR PREFIX "Unable to start the ACPI Interpreter\n");
+ goto error1;
+ }
+
++ if (ACPI_FAILURE(status)) {
++ printk(KERN_ERR PREFIX "Unable to initialize ACPI OS objects\n");
++ goto error1;
++ }
+ #ifdef CONFIG_ACPI_EC
+ /*
+ * ACPI 2.0 requires the EC driver to be loaded and work before
+@@ -693,7 +720,6 @@
+ /* Mimic structured exception handling */
+ error1:
+ acpi_terminate();
+-error0:
+ return_VALUE(-ENODEV);
+ }
+
+diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c
+--- a/drivers/acpi/osl.c 2004-08-19 12:35:05 -07:00
++++ b/drivers/acpi/osl.c 2004-08-19 12:35:05 -07:00
+@@ -71,6 +71,12 @@
+ acpi_status
+ acpi_os_initialize(void)
+ {
++ return AE_OK;
++}
++
++acpi_status
++acpi_os_initialize1(void)
++{
+ /*
+ * Initialize PCI configuration space access, as we'll need to access
+ * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
+@@ -470,6 +476,8 @@
+ return AE_ERROR;
+ }
+
++ BUG_ON(!raw_pci_ops);
++
+ result = raw_pci_ops->read(pci_id->segment, pci_id->bus,
+ PCI_DEVFN(pci_id->device, pci_id->function),
+ reg, size, value);
+@@ -495,6 +503,8 @@
+ default:
+ return AE_ERROR;
+ }
++
++ BUG_ON(!raw_pci_ops);
+
+ result = raw_pci_ops->write(pci_id->segment, pci_id->bus,
+ PCI_DEVFN(pci_id->device, pci_id->function),
+diff -Nru a/init/main.c b/init/main.c
+--- a/init/main.c 2004-08-19 12:35:05 -07:00
++++ b/init/main.c 2004-08-19 12:35:05 -07:00
+@@ -91,6 +91,11 @@
+ extern void populate_rootfs(void);
+ extern void driver_init(void);
+ extern void prepare_namespace(void);
++#ifdef CONFIG_ACPI
++extern void acpi_early_init(void);
++#else
++static inline void acpi_early_init(void) { }
++#endif
+
+ #ifdef CONFIG_TC
+ extern void tc_init(void);
+@@ -481,6 +486,8 @@
+ proc_root_init();
+ #endif
+ check_bugs();
++
++ acpi_early_init(); /* before LAPIC and SMP init */
+
+ /*
+ * We count on the initial thread going ok