]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .27 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 3 Dec 2008 00:46:33 +0000 (16:46 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 3 Dec 2008 00:46:33 +0000 (16:46 -0800)
queue-2.6.27/e1000-use-device_set_wakeup_enable.patch [new file with mode: 0644]
queue-2.6.27/e1000e-use-device_set_wakeup_enable.patch [new file with mode: 0644]
queue-2.6.27/igb-use-device_set_wakeup_enable.patch [new file with mode: 0644]
queue-2.6.27/libata-avoid-overflow-in-libata-when-tf-hba_lbal-127.patch [new file with mode: 0644]
queue-2.6.27/libata-blacklist-seagate-drives-which-time-out-flush_cache-when-used-with-ncq.patch [new file with mode: 0644]
queue-2.6.27/series
queue-2.6.27/x86-call-dmi-quirks-for-hp-laptops-after-early-quirks-are-executed.patch [new file with mode: 0644]
queue-2.6.27/x86-hibernate-fix-breakage-on-x86_32-with-config_numa-set.patch [new file with mode: 0644]
queue-2.6.27/x86-sb600-skip-acpi-irq0-override-if-it-is-not-routed-to-int2-of-ioapic.patch [new file with mode: 0644]

diff --git a/queue-2.6.27/e1000-use-device_set_wakeup_enable.patch b/queue-2.6.27/e1000-use-device_set_wakeup_enable.patch
new file mode 100644 (file)
index 0000000..fa05f31
--- /dev/null
@@ -0,0 +1,66 @@
+From de1264896c8012a261c1cba17e6a61199c276ad3 Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Fri, 7 Nov 2008 20:30:19 +0000
+Subject: e1000: Use device_set_wakeup_enable
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit de1264896c8012a261c1cba17e6a61199c276ad3 upstream.
+
+Since dev->power.should_wakeup bit is used by the PCI core to
+decide whether the device should wake up the system from sleep
+states, set/unset this bit whenever WOL is enabled/disabled using
+e1000_set_wol().  Accordingly, use device_can_wakeup() for checking
+if wake-up is supported by the device.
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/e1000/e1000_ethtool.c |    8 ++++++--
+ drivers/net/e1000/e1000_main.c    |    1 +
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/e1000/e1000_ethtool.c
++++ b/drivers/net/e1000/e1000_ethtool.c
+@@ -1774,7 +1774,8 @@ static void e1000_get_wol(struct net_dev
+       /* this function will set ->supported = 0 and return 1 if wol is not
+        * supported by this hardware */
+-      if (e1000_wol_exclusion(adapter, wol))
++      if (e1000_wol_exclusion(adapter, wol) ||
++          !device_can_wakeup(&adapter->pdev->dev))
+               return;
+       /* apply any specific unsupported masks here */
+@@ -1811,7 +1812,8 @@ static int e1000_set_wol(struct net_devi
+       if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
+               return -EOPNOTSUPP;
+-      if (e1000_wol_exclusion(adapter, wol))
++      if (e1000_wol_exclusion(adapter, wol) ||
++          !device_can_wakeup(&adapter->pdev->dev))
+               return wol->wolopts ? -EOPNOTSUPP : 0;
+       switch (hw->device_id) {
+@@ -1838,6 +1840,8 @@ static int e1000_set_wol(struct net_devi
+       if (wol->wolopts & WAKE_MAGIC)
+               adapter->wol |= E1000_WUFC_MAG;
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
++
+       return 0;
+ }
+--- a/drivers/net/e1000/e1000_main.c
++++ b/drivers/net/e1000/e1000_main.c
+@@ -1180,6 +1180,7 @@ static int __devinit e1000_probe(struct 
+       /* initialize the wol settings based on the eeprom settings */
+       adapter->wol = adapter->eeprom_wol;
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+       /* print bus type/speed/width info */
+       DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ",
diff --git a/queue-2.6.27/e1000e-use-device_set_wakeup_enable.patch b/queue-2.6.27/e1000e-use-device_set_wakeup_enable.patch
new file mode 100644 (file)
index 0000000..02136ef
--- /dev/null
@@ -0,0 +1,66 @@
+From 6ff68026f4757d68461b7fbeca5c944e1f5f8b44 Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Wed, 12 Nov 2008 09:52:32 +0000
+Subject: e1000e: Use device_set_wakeup_enable
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit 6ff68026f4757d68461b7fbeca5c944e1f5f8b44 upstream.
+
+Since dev->power.should_wakeup bit is used by the PCI core to
+decide whether the device should wake up the system from sleep
+states, set/unset this bit whenever WOL is enabled/disabled using
+e1000_set_wol().  Accordingly, use device_can_wakeup() for checking
+if wake-up is supported by the device.
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/e1000e/ethtool.c |    8 ++++++--
+ drivers/net/e1000e/netdev.c  |    1 +
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/e1000e/ethtool.c
++++ b/drivers/net/e1000e/ethtool.c
+@@ -1681,7 +1681,8 @@ static void e1000_get_wol(struct net_dev
+       wol->supported = 0;
+       wol->wolopts = 0;
+-      if (!(adapter->flags & FLAG_HAS_WOL))
++      if (!(adapter->flags & FLAG_HAS_WOL) ||
++          !device_can_wakeup(&adapter->pdev->dev))
+               return;
+       wol->supported = WAKE_UCAST | WAKE_MCAST |
+@@ -1719,7 +1720,8 @@ static int e1000_set_wol(struct net_devi
+       if (wol->wolopts & WAKE_MAGICSECURE)
+               return -EOPNOTSUPP;
+-      if (!(adapter->flags & FLAG_HAS_WOL))
++      if (!(adapter->flags & FLAG_HAS_WOL) ||
++          !device_can_wakeup(&adapter->pdev->dev))
+               return wol->wolopts ? -EOPNOTSUPP : 0;
+       /* these settings will always override what we currently have */
+@@ -1738,6 +1740,8 @@ static int e1000_set_wol(struct net_devi
+       if (wol->wolopts & WAKE_ARP)
+               adapter->wol |= E1000_WUFC_ARP;
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
++
+       return 0;
+ }
+--- a/drivers/net/e1000e/netdev.c
++++ b/drivers/net/e1000e/netdev.c
+@@ -4616,6 +4616,7 @@ static int __devinit e1000_probe(struct 
+       /* initialize the wol settings based on the eeprom settings */
+       adapter->wol = adapter->eeprom_wol;
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+       /* reset the hardware with the new settings */
+       e1000e_reset(adapter);
diff --git a/queue-2.6.27/igb-use-device_set_wakeup_enable.patch b/queue-2.6.27/igb-use-device_set_wakeup_enable.patch
new file mode 100644 (file)
index 0000000..cfd3e41
--- /dev/null
@@ -0,0 +1,66 @@
+From e1b86d8479f90aadee57a3d07d8e61c815c202d9 Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Fri, 7 Nov 2008 20:30:37 +0000
+Subject: igb: Use device_set_wakeup_enable
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit e1b86d8479f90aadee57a3d07d8e61c815c202d9 upstream.
+
+Since dev->power.should_wakeup bit is used by the PCI core to
+decide whether the device should wake up the system from sleep
+states, set/unset this bit whenever WOL is enabled/disabled using
+igb_set_wol().  Accordingly, use device_can_wakeup() for checking
+if wake-up is supported by the device.
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/igb/igb_ethtool.c |    8 ++++++--
+ drivers/net/igb/igb_main.c    |    1 +
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -1776,7 +1776,8 @@ static void igb_get_wol(struct net_devic
+       /* this function will set ->supported = 0 and return 1 if wol is not
+        * supported by this hardware */
+-      if (igb_wol_exclusion(adapter, wol))
++      if (igb_wol_exclusion(adapter, wol) ||
++          !device_can_wakeup(&adapter->pdev->dev))
+               return;
+       /* apply any specific unsupported masks here */
+@@ -1805,7 +1806,8 @@ static int igb_set_wol(struct net_device
+       if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
+               return -EOPNOTSUPP;
+-      if (igb_wol_exclusion(adapter, wol))
++      if (igb_wol_exclusion(adapter, wol) ||
++          !device_can_wakeup(&adapter->pdev->dev))
+               return wol->wolopts ? -EOPNOTSUPP : 0;
+       switch (hw->device_id) {
+@@ -1825,6 +1827,8 @@ static int igb_set_wol(struct net_device
+       if (wol->wolopts & WAKE_MAGIC)
+               adapter->wol |= E1000_WUFC_MAG;
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
++
+       return 0;
+ }
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -1220,6 +1220,7 @@ static int __devinit igb_probe(struct pc
+       /* initialize the wol settings based on the eeprom settings */
+       adapter->wol = adapter->eeprom_wol;
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+       /* reset the hardware with the new settings */
+       igb_reset(adapter);
diff --git a/queue-2.6.27/libata-avoid-overflow-in-libata-when-tf-hba_lbal-127.patch b/queue-2.6.27/libata-avoid-overflow-in-libata-when-tf-hba_lbal-127.patch
new file mode 100644 (file)
index 0000000..419b0bc
--- /dev/null
@@ -0,0 +1,50 @@
+From cebbert@redhat.com  Tue Dec  2 16:37:19 2008
+From: Chuck Ebbert <cebbert@redhat.com>
+Date: Fri, 21 Nov 2008 18:23:34 -0500
+Subject: libata: Avoid overflow in libata when tf->hba_lbal > 127
+To: stable@kernel.org
+Cc: Jeff Garzik <jeff@garzik.org>
+Message-ID: <20081121182334.5435c271@redhat.com>
+
+From: Chuck Ebbert <cebbert@redhat.com>
+
+Combination of these two upstream patches:
+
+ba14a9c291aa867896a90b3571fcc1c3759942ff
+libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127
+
+44901a96847b9967c057832b185e2f34ee6a14e5
+libata: Avoid overflow in ata_tf_read_block() when tf->hba_lbal > 127
+
+Originally written by Roland Dreier, but backported by Chuck.
+
+
+Cc: Roland Dreier <rdreier@cisco.com>
+Cc: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/libata-core.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -551,7 +551,7 @@ u64 ata_tf_read_block(struct ata_taskfil
+               if (tf->flags & ATA_TFLAG_LBA48) {
+                       block |= (u64)tf->hob_lbah << 40;
+                       block |= (u64)tf->hob_lbam << 32;
+-                      block |= tf->hob_lbal << 24;
++                      block |= (u64)tf->hob_lbal << 24;
+               } else
+                       block |= (tf->device & 0xf) << 24;
+@@ -1207,7 +1207,7 @@ u64 ata_tf_to_lba48(const struct ata_tas
+       sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40;
+       sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32;
+-      sectors |= (tf->hob_lbal & 0xff) << 24;
++      sectors |= ((u64)(tf->hob_lbal & 0xff)) << 24;
+       sectors |= (tf->lbah & 0xff) << 16;
+       sectors |= (tf->lbam & 0xff) << 8;
+       sectors |= (tf->lbal & 0xff);
diff --git a/queue-2.6.27/libata-blacklist-seagate-drives-which-time-out-flush_cache-when-used-with-ncq.patch b/queue-2.6.27/libata-blacklist-seagate-drives-which-time-out-flush_cache-when-used-with-ncq.patch
new file mode 100644 (file)
index 0000000..f9474ea
--- /dev/null
@@ -0,0 +1,75 @@
+From ac70a964b0e22a95af3628c344815857a01461b7 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Thu, 27 Nov 2008 13:36:48 +0900
+Subject: libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ
+
+From: Tejun Heo <tj@kernel.org>
+
+commit ac70a964b0e22a95af3628c344815857a01461b7 upstream.
+
+Some recent Seagate harddrives have firmware bug which causes FLUSH
+CACHE to timeout under certain circumstances if NCQ is being used.
+This can be worked around by disabling NCQ and fixed by updating the
+firmware.  Implement ATA_HORKAGE_FIRMWARE_UPDATE and blacklist these
+devices.
+
+The wiki page has been updated to contain information on this issue.
+
+  http://ata.wiki.kernel.org/index.php/Known_issues
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/libata-core.c |   21 +++++++++++++++++++++
+ include/linux/libata.h    |    1 +
+ 2 files changed, 22 insertions(+)
+
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -2428,6 +2428,13 @@ int ata_dev_configure(struct ata_device 
+               }
+       }
++      if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) {
++              ata_dev_printk(dev, KERN_WARNING, "WARNING: device requires "
++                             "firmware update to be fully functional.\n");
++              ata_dev_printk(dev, KERN_WARNING, "         contact the vendor "
++                             "or visit http://ata.wiki.kernel.org.\n");
++      }
++
+       return 0;
+ err_out_nosup:
+@@ -3971,6 +3978,20 @@ static const struct ata_blacklist_entry 
+       { "ST380817AS",         "3.42",         ATA_HORKAGE_NONCQ },
+       { "ST3160023AS",        "3.42",         ATA_HORKAGE_NONCQ },
++      /* Seagate NCQ + FLUSH CACHE firmware bug */
++      { "ST31500341AS",       "9JU138",       ATA_HORKAGE_NONCQ |
++                                              ATA_HORKAGE_FIRMWARE_WARN },
++      { "ST31000333AS",       "9FZ136",       ATA_HORKAGE_NONCQ |
++                                              ATA_HORKAGE_FIRMWARE_WARN },
++      { "ST3640623AS",        "9FZ164",       ATA_HORKAGE_NONCQ |
++                                              ATA_HORKAGE_FIRMWARE_WARN },
++      { "ST3640323AS",        "9FZ134",       ATA_HORKAGE_NONCQ |
++                                              ATA_HORKAGE_FIRMWARE_WARN },
++      { "ST3320813AS",        "9FZ182",       ATA_HORKAGE_NONCQ |
++                                              ATA_HORKAGE_FIRMWARE_WARN },
++      { "ST3320613AS",        "9FZ162",       ATA_HORKAGE_NONCQ |
++                                              ATA_HORKAGE_FIRMWARE_WARN },
++
+       /* Blacklist entries taken from Silicon Image 3124/3132
+          Windows driver .inf file - also several Linux problem reports */
+       { "HTS541060G9SA00",    "MB3OC60D",     ATA_HORKAGE_NONCQ, },
+--- a/include/linux/libata.h
++++ b/include/linux/libata.h
+@@ -364,6 +364,7 @@ enum {
+       ATA_HORKAGE_IPM         = (1 << 7),     /* Link PM problems */
+       ATA_HORKAGE_IVB         = (1 << 8),     /* cbl det validity bit bugs */
+       ATA_HORKAGE_STUCK_ERR   = (1 << 9),     /* stuck ERR on next PACKET */
++      ATA_HORKAGE_FIRMWARE_WARN = (1 << 12),  /* firwmare update warning */
+        /* DMA mask for user DMA control: User visible values; DO NOT
+           renumber */
index 6567c4220f8b5c13f1ef616bbb94be4315ce2134..aac8241bcd4c6444758d22d59261f64540d0da49 100644 (file)
@@ -42,3 +42,11 @@ pci-shcphp-remove-name-parameter.patch
 pci-hotplug-core-remove-name.patch
 cpufreq-powernow-k8-ignore-out-of-range-pstatestatus-value.patch
 xen-do-not-reserve-2-pages-of-padding-between-hypervisor-and-fixmap.patch
+x86-hibernate-fix-breakage-on-x86_32-with-config_numa-set.patch
+x86-sb600-skip-acpi-irq0-override-if-it-is-not-routed-to-int2-of-ioapic.patch
+libata-avoid-overflow-in-libata-when-tf-hba_lbal-127.patch
+x86-call-dmi-quirks-for-hp-laptops-after-early-quirks-are-executed.patch
+igb-use-device_set_wakeup_enable.patch
+e1000-use-device_set_wakeup_enable.patch
+e1000e-use-device_set_wakeup_enable.patch
+libata-blacklist-seagate-drives-which-time-out-flush_cache-when-used-with-ncq.patch
diff --git a/queue-2.6.27/x86-call-dmi-quirks-for-hp-laptops-after-early-quirks-are-executed.patch b/queue-2.6.27/x86-call-dmi-quirks-for-hp-laptops-after-early-quirks-are-executed.patch
new file mode 100644 (file)
index 0000000..251ccf9
--- /dev/null
@@ -0,0 +1,70 @@
+From andreas.herrmann3@amd.com  Tue Dec  2 16:39:11 2008
+From: Andreas Herrmann <andreas.herrmann3@amd.com>
+Date: Fri, 21 Nov 2008 12:46:43 +0100
+Subject: x86: call dmi-quirks for HP Laptops after early-quirks are executed
+To: greg@kroah.com, chrisw@sous-sol.org
+Cc: stable@kernel.org, Ingo Molnar <mingo@elte.hu>
+Message-ID: <20081121114643.GD31951@alberich.amd.com>
+Content-Disposition: inline
+
+commit 35af28219e684a36cc8b1ff456c370ce22be157d upstream.
+
+Impact: make warning message disappear - functionality unchanged
+
+Problems with bogus IRQ0 override of those laptops should be fixed
+with commits
+
+x86: SB600: skip IRQ0 override if it is not routed to INT2 of IOAPIC
+x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC
+
+that introduce early-quirks based on chipset configuration.
+
+For further information, see
+http://bugzilla.kernel.org/show_bug.cgi?id=11516
+
+Instead of removing the related dmi-quirks completely we'd like to
+keep them for (at least) one kernel version -- to double-check whether
+the early-quirks really took effect. But the dmi-quirks need to be
+called after early-quirks are executed. With this patch calling
+sequence for dmi-quriks is changed as follows:
+
+ acpi_boot_table_init()   (dmi-quirks)
+ ...
+ early_quirks()           (detect bogus IRQ0 override)
+ ...
+ acpi_boot_init()         (late dmi-quirks and setup IO APIC)
+
+Note: Plan is to remove the "late dmi-quirks" with next kernel version.
+
+Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
+Acked-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/acpi/boot.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/x86/kernel/acpi/boot.c
++++ b/arch/x86/kernel/acpi/boot.c
+@@ -1593,6 +1593,11 @@ static struct dmi_system_id __initdata a
+                    DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+                    },
+        },
++      {}
++};
++
++/* second table for DMI checks that should run after early-quirks */
++static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
+       /*
+        * HP laptops which use a DSDT reporting as HP/SB400/10000,
+        * which includes some code which overrides all temperature
+@@ -1721,6 +1726,9 @@ int __init early_acpi_boot_init(void)
+ int __init acpi_boot_init(void)
+ {
++      /* those are executed after early-quirks are executed */
++      dmi_check_system(acpi_dmi_table_late);
++
+       /*
+        * If acpi_disabled, bail out
+        * One exception: acpi=ht continues far enough to enumerate LAPICs
diff --git a/queue-2.6.27/x86-hibernate-fix-breakage-on-x86_32-with-config_numa-set.patch b/queue-2.6.27/x86-hibernate-fix-breakage-on-x86_32-with-config_numa-set.patch
new file mode 100644 (file)
index 0000000..a77bffe
--- /dev/null
@@ -0,0 +1,118 @@
+From rjw@sisk.pl  Tue Dec  2 16:33:42 2008
+From: "Rafael J. Wysocki" <rjw@sisk.pl>
+Date: Sat, 22 Nov 2008 14:18:00 +0100
+Subject: x86: Hibernate: Fix breakage on x86_32 with CONFIG_NUMA set
+To: stable@kernel.org
+Cc: Ingo Molnar <mingo@elte.hu>
+Message-ID: <200811221418.00349.rjw@sisk.pl>
+Content-Disposition: inline
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+backport of commit 97a70e548bd97d5a46ae9d44f24aafcc013fd701 to the 2.6.27 kernel.
+
+The NUMA code on x86_32 creates special memory mapping that allows
+each node's pgdat to be located in this node's memory.  For this
+purpose it allocates a memory area at the end of each node's memory
+and maps this area so that it is accessible with virtual addresses
+belonging to low memory.  As a result, if there is high memory,
+these NUMA-allocated areas are physically located in high memory,
+although they are mapped to low memory addresses.
+
+Our hibernation code does not take that into account and for this
+reason hibernation fails on all x86_32 systems with CONFIG_NUMA=y and
+with high memory present.  Fix this by adding a special mapping for
+the NUMA-allocated memory areas to the temporary page tables created
+during the last phase of resume.
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Acked-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/mm/discontig_32.c    |   35 +++++++++++++++++++++++++++++++++++
+ arch/x86/power/hibernate_32.c |    4 ++++
+ include/asm-x86/mmzone_32.h   |    4 ++++
+ 3 files changed, 43 insertions(+)
+
+--- a/arch/x86/mm/discontig_32.c
++++ b/arch/x86/mm/discontig_32.c
+@@ -222,6 +222,41 @@ static void __init remap_numa_kva(void)
+       }
+ }
++#ifdef CONFIG_HIBERNATION
++/**
++ * resume_map_numa_kva - add KVA mapping to the temporary page tables created
++ *                       during resume from hibernation
++ * @pgd_base - temporary resume page directory
++ */
++void resume_map_numa_kva(pgd_t *pgd_base)
++{
++      int node;
++
++      for_each_online_node(node) {
++              unsigned long start_va, start_pfn, size, pfn;
++
++              start_va = (unsigned long)node_remap_start_vaddr[node];
++              start_pfn = node_remap_start_pfn[node];
++              size = node_remap_size[node];
++
++              printk(KERN_DEBUG "%s: node %d\n", __FUNCTION__, node);
++
++              for (pfn = 0; pfn < size; pfn += PTRS_PER_PTE) {
++                      unsigned long vaddr = start_va + (pfn << PAGE_SHIFT);
++                      pgd_t *pgd = pgd_base + pgd_index(vaddr);
++                      pud_t *pud = pud_offset(pgd, vaddr);
++                      pmd_t *pmd = pmd_offset(pud, vaddr);
++
++                      set_pmd(pmd, pfn_pmd(start_pfn + pfn,
++                                              PAGE_KERNEL_LARGE_EXEC));
++
++                      printk(KERN_DEBUG "%s: %08lx -> pfn %08lx\n",
++                              __FUNCTION__, vaddr, start_pfn + pfn);
++              }
++      }
++}
++#endif
++
+ static unsigned long calculate_numa_remap_pages(void)
+ {
+       int nid;
+--- a/arch/x86/power/hibernate_32.c
++++ b/arch/x86/power/hibernate_32.c
+@@ -12,6 +12,7 @@
+ #include <asm/system.h>
+ #include <asm/page.h>
+ #include <asm/pgtable.h>
++#include <asm/mmzone.h>
+ /* Defined in hibernate_asm_32.S */
+ extern int restore_image(void);
+@@ -127,6 +128,9 @@ static int resume_physical_mapping_init(
+                       }
+               }
+       }
++
++      resume_map_numa_kva(pgd_base);
++
+       return 0;
+ }
+--- a/include/asm-x86/mmzone_32.h
++++ b/include/asm-x86/mmzone_32.h
+@@ -34,10 +34,14 @@ static inline void get_memcfg_numa(void)
+ extern int early_pfn_to_nid(unsigned long pfn);
++extern void resume_map_numa_kva(pgd_t *pgd);
++
+ #else /* !CONFIG_NUMA */
+ #define get_memcfg_numa get_memcfg_numa_flat
++static inline void resume_map_numa_kva(pgd_t *pgd) {}
++
+ #endif /* CONFIG_NUMA */
+ #ifdef CONFIG_DISCONTIGMEM
diff --git a/queue-2.6.27/x86-sb600-skip-acpi-irq0-override-if-it-is-not-routed-to-int2-of-ioapic.patch b/queue-2.6.27/x86-sb600-skip-acpi-irq0-override-if-it-is-not-routed-to-int2-of-ioapic.patch
new file mode 100644 (file)
index 0000000..56cc095
--- /dev/null
@@ -0,0 +1,115 @@
+From 26adcfbf00e0726b4469070aa2f530dcf963f484 Mon Sep 17 00:00:00 2001
+From: Andreas Herrmann <andreas.herrmann3@amd.com>
+Date: Tue, 14 Oct 2008 21:01:15 +0200
+Subject: x86: SB600: skip ACPI IRQ0 override if it is not routed to INT2 of IOAPIC
+
+From: Andreas Herrmann <andreas.herrmann3@amd.com>
+
+commit 26adcfbf00e0726b4469070aa2f530dcf963f484 upstream.
+
+On some more HP laptops BIOS reports an IRQ0 override
+but the SB600 chipset is configured such that timer
+interrupts go to INT0 of IOAPIC.
+
+Check IRQ0 routing and if it is routed to INT0 of IOAPIC skip the
+timer override.
+
+http://bugzilla.kernel.org/show_bug.cgi?id=11715
+http://bugzilla.kernel.org/show_bug.cgi?id=11516
+
+Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/early-quirks.c |   55 ++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 52 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/kernel/early-quirks.c
++++ b/arch/x86/kernel/early-quirks.c
+@@ -95,7 +95,8 @@ static void __init nvidia_bugs(int num, 
+ }
+-static u32 ati_ixp4x0_rev(int num, int slot, int func)
++#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
++static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
+ {
+       u32 d;
+       u8  b;
+@@ -115,7 +116,6 @@ static u32 ati_ixp4x0_rev(int num, int s
+ static void __init ati_bugs(int num, int slot, int func)
+ {
+-#if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC)
+       u32 d;
+       u8  b;
+@@ -138,9 +138,56 @@ static void __init ati_bugs(int num, int
+               printk(KERN_INFO "If you got timer trouble "
+                      "try acpi_use_timer_override\n");
+       }
+-#endif
+ }
++static u32 __init ati_sbx00_rev(int num, int slot, int func)
++{
++      u32 old, d;
++
++      d = read_pci_config(num, slot, func, 0x70);
++      old = d;
++      d &= ~(1<<8);
++      write_pci_config(num, slot, func, 0x70, d);
++      d = read_pci_config(num, slot, func, 0x8);
++      d &= 0xff;
++      write_pci_config(num, slot, func, 0x70, old);
++
++      return d;
++}
++
++static void __init ati_bugs_contd(int num, int slot, int func)
++{
++      u32 d, rev;
++
++      if (acpi_use_timer_override)
++              return;
++
++      rev = ati_sbx00_rev(num, slot, func);
++      if (rev > 0x13)
++              return;
++
++      /* check for IRQ0 interrupt swap */
++      d = read_pci_config(num, slot, func, 0x64);
++      if (!(d & (1<<14)))
++              acpi_skip_timer_override = 1;
++
++      if (acpi_skip_timer_override) {
++              printk(KERN_INFO "SB600 revision 0x%x\n", rev);
++              printk(KERN_INFO "Ignoring ACPI timer override.\n");
++              printk(KERN_INFO "If you got timer trouble "
++                     "try acpi_use_timer_override\n");
++      }
++}
++#else
++static void __init ati_bugs(int num, int slot, int func)
++{
++}
++
++static void __init ati_bugs_contd(int num, int slot, int func)
++{
++}
++#endif
++
+ #define QFLAG_APPLY_ONCE      0x1
+ #define QFLAG_APPLIED         0x2
+ #define QFLAG_DONE            (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
+@@ -162,6 +209,8 @@ static struct chipset early_qrk[] __init
+         PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
+       { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS,
+         PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
++      { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
++        PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
+       {}
+ };