From: Greg Kroah-Hartman Date: Tue, 16 Dec 2008 22:57:30 +0000 (-0800) Subject: 4 .27 patches X-Git-Tag: v2.6.27.10~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=357139c15b424e0a46d5f1f0bf9d5a05a9650035;p=thirdparty%2Fkernel%2Fstable-queue.git 4 .27 patches --- diff --git a/queue-2.6.27/amd-iommu-enable-device-isolation-per-default.patch b/queue-2.6.27/amd-iommu-enable-device-isolation-per-default.patch new file mode 100644 index 00000000000..22f3132ff66 --- /dev/null +++ b/queue-2.6.27/amd-iommu-enable-device-isolation-per-default.patch @@ -0,0 +1,46 @@ +From 3ce1f93c6d53c3f91c3846cf66b018276c8ac2e7 Mon Sep 17 00:00:00 2001 +From: Joerg Roedel +Date: Mon, 17 Nov 2008 15:09:20 +0100 +Subject: AMD IOMMU: enable device isolation per default + +From: Joerg Roedel + +commit 3ce1f93c6d53c3f91c3846cf66b018276c8ac2e7 upstream. + +Impact: makes device isolation the default for AMD IOMMU + +Some device drivers showed double-free bugs of DMA memory while testing +them with AMD IOMMU. If all devices share the same protection domain +this can lead to data corruption and data loss. Prevent this by putting +each device into its own protection domain per default. + +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/kernel-parameters.txt | 2 +- + arch/x86/kernel/amd_iommu_init.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/x86/kernel/amd_iommu_init.c ++++ b/arch/x86/kernel/amd_iommu_init.c +@@ -120,7 +120,7 @@ u16 amd_iommu_last_bdf; /* largest PCI + LIST_HEAD(amd_iommu_unity_map); /* a list of required unity mappings + we find in ACPI */ + unsigned amd_iommu_aperture_order = 26; /* size of aperture in power of 2 */ +-int amd_iommu_isolate; /* if 1, device isolation is enabled */ ++int amd_iommu_isolate = 1; /* if 1, device isolation is enabled */ + + LIST_HEAD(amd_iommu_list); /* list of all AMD IOMMUs in the + system */ +--- a/Documentation/kernel-parameters.txt ++++ b/Documentation/kernel-parameters.txt +@@ -283,7 +283,7 @@ and is between 256 and 4096 characters. + Possible values are: + isolate - enable device isolation (each device, as far + as possible, will get its own protection +- domain) ++ domain) [default] + amd_iommu_size= [HW,X86-64] + Define the size of the aperture for the AMD IOMMU + driver. Possible values are: diff --git a/queue-2.6.27/bonding-fix-miimon-failure-counter.patch b/queue-2.6.27/bonding-fix-miimon-failure-counter.patch new file mode 100644 index 00000000000..7bbc8a385cd --- /dev/null +++ b/queue-2.6.27/bonding-fix-miimon-failure-counter.patch @@ -0,0 +1,40 @@ +From fba4acda35f3119328bcba28aacefae14245d2bb Mon Sep 17 00:00:00 2001 +From: Jay Vosburgh +Date: Thu, 30 Oct 2008 17:41:14 -0700 +Subject: bonding: fix miimon failure counter + +From: Jay Vosburgh + +commit fba4acda35f3119328bcba28aacefae14245d2bb upstream. + +During the rework of the mii monitor for: + + commit f0c76d61779b153dbfb955db3f144c62d02173c2 + Author: Jay Vosburgh + Date: Wed Jul 2 18:21:58 2008 -0700 + + bonding: refactor mii monitor + +I left out the increment of the link failure counter. This +patch corrects that omission. + +Signed-off-by: Jay Vosburgh +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/bonding/bond_main.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/net/bonding/bond_main.c ++++ b/drivers/net/bonding/bond_main.c +@@ -2370,6 +2370,9 @@ static void bond_miimon_commit(struct bo + continue; + + case BOND_LINK_DOWN: ++ if (slave->link_failure_count < UINT_MAX) ++ slave->link_failure_count++; ++ + slave->link = BOND_LINK_DOWN; + + if (bond->params.mode == BOND_MODE_ACTIVEBACKUP || diff --git a/queue-2.6.27/revert-sched_clock-prevent-scd-clock-from-moving-backwards.patch b/queue-2.6.27/revert-sched_clock-prevent-scd-clock-from-moving-backwards.patch new file mode 100644 index 00000000000..628a8dace9d --- /dev/null +++ b/queue-2.6.27/revert-sched_clock-prevent-scd-clock-from-moving-backwards.patch @@ -0,0 +1,49 @@ +From ca7e716c7833aeaeb8fedd6d004c5f5d5e14d325 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Sun, 14 Dec 2008 15:46:01 -0800 +Subject: Revert "sched_clock: prevent scd->clock from moving backwards" + +From: Linus Torvalds + +commit ca7e716c7833aeaeb8fedd6d004c5f5d5e14d325 upstream. + +This reverts commit 5b7dba4ff834259a5623e03a565748704a8fe449, which +caused a regression in hibernate, reported by and bisected by Fabio +Comolli. + +This revert fixes + + http://bugzilla.kernel.org/show_bug.cgi?id=12155 + http://bugzilla.kernel.org/show_bug.cgi?id=12149 + +Bisected-by: Fabio Comolli +Requested-by: Rafael J. Wysocki +Acked-by: Dave Kleikamp +Cc: Peter Zijlstra +Cc: Ingo Molnar +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched_clock.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/kernel/sched_clock.c ++++ b/kernel/sched_clock.c +@@ -118,13 +118,13 @@ static u64 __update_sched_clock(struct s + + /* + * scd->clock = clamp(scd->tick_gtod + delta, +- * max(scd->tick_gtod, scd->clock), +- * max(scd->clock, scd->tick_gtod + TICK_NSEC)); ++ * max(scd->tick_gtod, scd->clock), ++ * scd->tick_gtod + TICK_NSEC); + */ + + clock = scd->tick_gtod + delta; + min_clock = wrap_max(scd->tick_gtod, scd->clock); +- max_clock = wrap_max(scd->clock, scd->tick_gtod + TICK_NSEC); ++ max_clock = scd->tick_gtod + TICK_NSEC; + + clock = wrap_max(clock, min_clock); + clock = wrap_min(clock, max_clock); diff --git a/queue-2.6.27/series b/queue-2.6.27/series new file mode 100644 index 00000000000..34d65e1da1d --- /dev/null +++ b/queue-2.6.27/series @@ -0,0 +1,4 @@ +amd-iommu-enable-device-isolation-per-default.patch +bonding-fix-miimon-failure-counter.patch +revert-sched_clock-prevent-scd-clock-from-moving-backwards.patch +x86-fix-vmi-crash-on-boot-in-2.6.28-rc8.patch diff --git a/queue-2.6.27/x86-fix-vmi-crash-on-boot-in-2.6.28-rc8.patch b/queue-2.6.27/x86-fix-vmi-crash-on-boot-in-2.6.28-rc8.patch new file mode 100644 index 00000000000..51af9abda08 --- /dev/null +++ b/queue-2.6.27/x86-fix-vmi-crash-on-boot-in-2.6.28-rc8.patch @@ -0,0 +1,123 @@ +From ae8d04e2ecbb233926860e9ce145eac19c7835dc Mon Sep 17 00:00:00 2001 +From: Zachary Amsden +Date: Sat, 13 Dec 2008 12:36:58 -0800 +Subject: x86 Fix VMI crash on boot in 2.6.28-rc8 + +From: Zachary Amsden + +commit ae8d04e2ecbb233926860e9ce145eac19c7835dc upstream. + +VMI initialiation can relocate the fixmap, causing early_ioremap to +malfunction if it is initialized before the relocation. To fix this, +VMI activation is split into two phases; the detection, which must +happen before setting up ioremap, and the activation, which must happen +after parsing early boot parameters. + +This fixes a crash on boot when VMI is enabled under VMware. + +Signed-off-by: Zachary Amsden +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/setup.c | 12 +++++------- + arch/x86/kernel/smpboot.c | 2 -- + arch/x86/kernel/vmi_32.c | 16 +++++++++++----- + include/asm-x86/vmi.h | 8 +++++++- + 4 files changed, 23 insertions(+), 15 deletions(-) + +--- a/arch/x86/kernel/setup.c ++++ b/arch/x86/kernel/setup.c +@@ -634,6 +634,9 @@ void __init setup_arch(char **cmdline_p) + printk(KERN_INFO "Command line: %s\n", boot_command_line); + #endif + ++ /* VMI may relocate the fixmap; do this before touching ioremap area */ ++ vmi_init(); ++ + early_cpu_init(); + early_ioremap_init(); + +@@ -707,13 +710,8 @@ void __init setup_arch(char **cmdline_p) + check_efer(); + #endif + +-#if defined(CONFIG_VMI) && defined(CONFIG_X86_32) +- /* +- * Must be before kernel pagetables are setup +- * or fixmap area is touched. +- */ +- vmi_init(); +-#endif ++ /* Must be before kernel pagetables are setup */ ++ vmi_activate(); + + /* after early param, so could get panic from serial */ + reserve_early_setup_data(); +--- a/arch/x86/kernel/smpboot.c ++++ b/arch/x86/kernel/smpboot.c +@@ -289,9 +289,7 @@ static void __cpuinit start_secondary(vo + * fragile that we want to limit the things done here to the + * most necessary things. + */ +-#ifdef CONFIG_VMI + vmi_bringup(); +-#endif + cpu_init(); + preempt_disable(); + smp_callin(); +--- a/arch/x86/kernel/vmi_32.c ++++ b/arch/x86/kernel/vmi_32.c +@@ -960,8 +960,6 @@ static inline int __init activate_vmi(vo + + void __init vmi_init(void) + { +- unsigned long flags; +- + if (!vmi_rom) + probe_vmi_rom(); + else +@@ -973,13 +971,21 @@ void __init vmi_init(void) + + reserve_top_address(-vmi_rom->virtual_top); + +- local_irq_save(flags); +- activate_vmi(); +- + #ifdef CONFIG_X86_IO_APIC + /* This is virtual hardware; timer routing is wired correctly */ + no_timer_check = 1; + #endif ++} ++ ++void vmi_activate(void) ++{ ++ unsigned long flags; ++ ++ if (!vmi_rom) ++ return; ++ ++ local_irq_save(flags); ++ activate_vmi(); + local_irq_restore(flags & X86_EFLAGS_IF); + } + +--- a/include/asm-x86/vmi.h ++++ b/include/asm-x86/vmi.h +@@ -223,9 +223,15 @@ struct pci_header { + } __attribute__((packed)); + + /* Function prototypes for bootstrapping */ ++#ifdef CONFIG_VMI + extern void vmi_init(void); ++extern void vmi_activate(void); + extern void vmi_bringup(void); +-extern void vmi_apply_boot_page_allocations(void); ++#else ++static inline void vmi_init(void) {} ++static inline void vmi_activate(void) {} ++static inline void vmi_bringup(void) {} ++#endif + + /* State needed to start an application processor in an SMP system. */ + struct vmi_ap_state {