From bd3877496ee44aff5c13a60543d7430440338027 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 16 Dec 2009 15:43:25 -0800 Subject: [PATCH] more .32 patches --- .../acerhdf-add-new-bios-versions.patch | 126 +++++++++++++++ ...cpu-which-model-id-is-less-than-0x0f.patch | 41 +++++ ...top-change-light-sens-default-values.patch | 53 +++++++ ...o-settings-for-single-stream-devices.patch | 116 ++++++++++++++ ...processing-of-tx-ps-null-data-frames.patch | 136 ++++++++++++++++ .../ath9k-fix-tx-hang-poll-routine.patch | 37 +++++ .../ath9k-fix-tx-status-reporting.patch | 43 ++++++ ...legacy-avoid-ppc-fault-during-resume.patch | 43 ++++++ ...ailure-after-get_stats_count-removal.patch | 49 ++++++ ...ference-with-component_only-tv_modes.patch | 58 +++++++ ...fix-lvds-stability-issue-on-ironlake.patch | 146 ++++++++++++++++++ ...vblank-when-vga-output-is-turned-off.patch | 107 +++++++++++++ ...pineview-only-has-lvds-and-crt-ports.patch | 69 +++++++++ ...uption-when-write-fails-to-copy-data.patch | 81 ++++++++++ ...y-checks-for-interrupt-remapping-too.patch | 91 +++++++++++ ...-an-rmrr-which-ends-before-it-starts.patch | 40 +++++ ...ect-dmar-in-hyperspace-at-probe-time.patch | 79 ++++++++++ ...u-fix-oops-with-intel_iommu-igfx_off.patch | 38 +++++ ...able-validation-in-pass-through-mode.patch | 69 +++++++++ queue-2.6.32/ipvs-zero-usvc-and-udest.patch | 50 ++++++ ...ix-rebooting-hang-with-driver-loaded.patch | 51 ++++++ ...-bug-with-symlink-garbage-collection.patch | 33 ++++ ...-fix-dynamic-power-save-for-scanning.patch | 96 ++++++++++++ ...-fix-problems-with-display-stability.patch | 45 ++++++ ...memsw.usage_in_bytes-for-root-cgroup.patch | 37 +++++ .../mm-sigbus-instead-of-abusing-oom.patch | 64 ++++++++ ...-userspace-rtm_newlink-notifications.patch | 71 +++++++++ ...es-document-minimal-required-version.patch | 30 ++++ ...-incorrect-range-check-on-cpu-number.patch | 46 ++++++ queue-2.6.32/series | 36 +++++ ...max_map_count-should-be-non-negative.patch | 50 ++++++ ...default-brightness_mode-for-r50e-r51.patch | 50 ++++++ ...e-rfkill-state-across-suspend-resume.patch | 114 ++++++++++++++ .../tracing-fix-event-format-export.patch | 56 +++++++ ...6-gspca-ov519-webcam-041e-4067-added.patch | 37 +++++ ...tionalize-build-of-pcpu_get_vm_areas.patch | 65 ++++++++ ...e-ap-s-apic_lvtthmr-to-the-bsp-value.patch | 132 ++++++++++++++++ 37 files changed, 2485 insertions(+) create mode 100644 queue-2.6.32/acerhdf-add-new-bios-versions.patch create mode 100644 queue-2.6.32/acpi-use-the-arb_disable-for-the-cpu-which-model-id-is-less-than-0x0f.patch create mode 100644 queue-2.6.32/asus-laptop-change-light-sens-default-values.patch create mode 100644 queue-2.6.32/ath9k-fix-maximum-tx-fifo-settings-for-single-stream-devices.patch create mode 100644 queue-2.6.32/ath9k-fix-processing-of-tx-ps-null-data-frames.patch create mode 100644 queue-2.6.32/ath9k-fix-tx-hang-poll-routine.patch create mode 100644 queue-2.6.32/ath9k-fix-tx-status-reporting.patch create mode 100644 queue-2.6.32/b43legacy-avoid-ppc-fault-during-resume.patch create mode 100644 queue-2.6.32/bcm63xx_enet-fix-compilation-failure-after-get_stats_count-removal.patch create mode 100644 queue-2.6.32/drm-i915-avoid-null-dereference-with-component_only-tv_modes.patch create mode 100644 queue-2.6.32/drm-i915-fix-lvds-stability-issue-on-ironlake.patch create mode 100644 queue-2.6.32/drm-i915-fix-sync-to-vblank-when-vga-output-is-turned-off.patch create mode 100644 queue-2.6.32/drm-i915-pineview-only-has-lvds-and-crt-ports.patch create mode 100644 queue-2.6.32/ext3-fix-data-filesystem-corruption-when-write-fails-to-copy-data.patch create mode 100644 queue-2.6.32/intel-iommu-apply-bios-sanity-checks-for-interrupt-remapping-too.patch create mode 100644 queue-2.6.32/intel-iommu-check-for-an-rmrr-which-ends-before-it-starts.patch create mode 100644 queue-2.6.32/intel-iommu-detect-dmar-in-hyperspace-at-probe-time.patch create mode 100644 queue-2.6.32/intel-iommu-fix-oops-with-intel_iommu-igfx_off.patch create mode 100644 queue-2.6.32/intel-iommu-ignore-page-table-validation-in-pass-through-mode.patch create mode 100644 queue-2.6.32/ipvs-zero-usvc-and-udest.patch create mode 100644 queue-2.6.32/ipw2100-fix-rebooting-hang-with-driver-loaded.patch create mode 100644 queue-2.6.32/jffs2-fix-long-standing-bug-with-symlink-garbage-collection.patch create mode 100644 queue-2.6.32/mac80211-fix-dynamic-power-save-for-scanning.patch create mode 100644 queue-2.6.32/matroxfb-fix-problems-with-display-stability.patch create mode 100644 queue-2.6.32/memcg-fix-memory.memsw.usage_in_bytes-for-root-cgroup.patch create mode 100644 queue-2.6.32/mm-sigbus-instead-of-abusing-oom.patch create mode 100644 queue-2.6.32/net-fix-userspace-rtm_newlink-notifications.patch create mode 100644 queue-2.6.32/netfilter-xtables-document-minimal-required-version.patch create mode 100644 queue-2.6.32/perf_event-fix-incorrect-range-check-on-cpu-number.patch create mode 100644 queue-2.6.32/sysctl_max_map_count-should-be-non-negative.patch create mode 100644 queue-2.6.32/thinkpad-acpi-fix-default-brightness_mode-for-r50e-r51.patch create mode 100644 queue-2.6.32/thinkpad-acpi-preserve-rfkill-state-across-suspend-resume.patch create mode 100644 queue-2.6.32/tracing-fix-event-format-export.patch create mode 100644 queue-2.6.32/v4l-dvb-13116-gspca-ov519-webcam-041e-4067-added.patch create mode 100644 queue-2.6.32/vmalloc-conditionalize-build-of-pcpu_get_vm_areas.patch create mode 100644 queue-2.6.32/x86-under-bios-control-restore-ap-s-apic_lvtthmr-to-the-bsp-value.patch diff --git a/queue-2.6.32/acerhdf-add-new-bios-versions.patch b/queue-2.6.32/acerhdf-add-new-bios-versions.patch new file mode 100644 index 00000000000..7fcc9c5af5d --- /dev/null +++ b/queue-2.6.32/acerhdf-add-new-bios-versions.patch @@ -0,0 +1,126 @@ +From 360657463679dee44f0b167ffa61f563b4fee101 Mon Sep 17 00:00:00 2001 +From: Peter Feuerer +Date: Tue, 17 Nov 2009 14:27:37 -0800 +Subject: acerhdf: add new BIOS versions + +From: Peter Feuerer + +commit 360657463679dee44f0b167ffa61f563b4fee101 upstream. + +Added new BIOS versions for following netbooks: Acer 1410, Gateway LT31, +Packard Bell DOA150. As the Gateway LT31 machines have different register +values for setting and checking the off-state, the "cmd_off" variable has +been splitted up to "cmd_off" and "chk_off". + +Signed-off-by: Peter Feuerer +Cc: Borislav Petkov +Cc: Andreas Mohr +Signed-off-by: Andrew Morton +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/acerhdf.c | 63 ++++++++++++++++++++++++----------------- + 1 file changed, 37 insertions(+), 26 deletions(-) + +--- a/drivers/platform/x86/acerhdf.c ++++ b/drivers/platform/x86/acerhdf.c +@@ -52,7 +52,7 @@ + */ + #undef START_IN_KERNEL_MODE + +-#define DRV_VER "0.5.18" ++#define DRV_VER "0.5.20" + + /* + * According to the Atom N270 datasheet, +@@ -112,12 +112,14 @@ module_param_string(force_product, force + MODULE_PARM_DESC(force_product, "Force BIOS product and omit BIOS check"); + + /* +- * cmd_off: to switch the fan completely off / to check if the fan is off ++ * cmd_off: to switch the fan completely off ++ * chk_off: to check if the fan is off + * cmd_auto: to set the BIOS in control of the fan. The BIOS regulates then + * the fan speed depending on the temperature + */ + struct fancmd { + u8 cmd_off; ++ u8 chk_off; + u8 cmd_auto; + }; + +@@ -134,32 +136,41 @@ struct bios_settings_t { + /* Register addresses and values for different BIOS versions */ + static const struct bios_settings_t bios_tbl[] = { + /* AOA110 */ +- {"Acer", "AOA110", "v0.3109", 0x55, 0x58, {0x1f, 0x00} }, +- {"Acer", "AOA110", "v0.3114", 0x55, 0x58, {0x1f, 0x00} }, +- {"Acer", "AOA110", "v0.3301", 0x55, 0x58, {0xaf, 0x00} }, +- {"Acer", "AOA110", "v0.3304", 0x55, 0x58, {0xaf, 0x00} }, +- {"Acer", "AOA110", "v0.3305", 0x55, 0x58, {0xaf, 0x00} }, +- {"Acer", "AOA110", "v0.3307", 0x55, 0x58, {0xaf, 0x00} }, +- {"Acer", "AOA110", "v0.3308", 0x55, 0x58, {0x21, 0x00} }, +- {"Acer", "AOA110", "v0.3309", 0x55, 0x58, {0x21, 0x00} }, +- {"Acer", "AOA110", "v0.3310", 0x55, 0x58, {0x21, 0x00} }, ++ {"Acer", "AOA110", "v0.3109", 0x55, 0x58, {0x1f, 0x1f, 0x00} }, ++ {"Acer", "AOA110", "v0.3114", 0x55, 0x58, {0x1f, 0x1f, 0x00} }, ++ {"Acer", "AOA110", "v0.3301", 0x55, 0x58, {0xaf, 0xaf, 0x00} }, ++ {"Acer", "AOA110", "v0.3304", 0x55, 0x58, {0xaf, 0xaf, 0x00} }, ++ {"Acer", "AOA110", "v0.3305", 0x55, 0x58, {0xaf, 0xaf, 0x00} }, ++ {"Acer", "AOA110", "v0.3307", 0x55, 0x58, {0xaf, 0xaf, 0x00} }, ++ {"Acer", "AOA110", "v0.3308", 0x55, 0x58, {0x21, 0x21, 0x00} }, ++ {"Acer", "AOA110", "v0.3309", 0x55, 0x58, {0x21, 0x21, 0x00} }, ++ {"Acer", "AOA110", "v0.3310", 0x55, 0x58, {0x21, 0x21, 0x00} }, + /* AOA150 */ +- {"Acer", "AOA150", "v0.3114", 0x55, 0x58, {0x20, 0x00} }, +- {"Acer", "AOA150", "v0.3301", 0x55, 0x58, {0x20, 0x00} }, +- {"Acer", "AOA150", "v0.3304", 0x55, 0x58, {0x20, 0x00} }, +- {"Acer", "AOA150", "v0.3305", 0x55, 0x58, {0x20, 0x00} }, +- {"Acer", "AOA150", "v0.3307", 0x55, 0x58, {0x20, 0x00} }, +- {"Acer", "AOA150", "v0.3308", 0x55, 0x58, {0x20, 0x00} }, +- {"Acer", "AOA150", "v0.3309", 0x55, 0x58, {0x20, 0x00} }, +- {"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x00} }, ++ {"Acer", "AOA150", "v0.3114", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Acer", "AOA150", "v0.3301", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Acer", "AOA150", "v0.3304", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Acer", "AOA150", "v0.3305", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Acer", "AOA150", "v0.3307", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Acer", "AOA150", "v0.3308", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Acer", "AOA150", "v0.3309", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ /* Acer 1410 */ ++ {"Acer", "Aspire 1410", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, + /* special BIOS / other */ +- {"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x00} }, +- {"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x00} }, +- {"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x00} }, +- {"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x00} }, +- {"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} }, ++ {"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x21, 0x00} }, ++ {"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Gateway ", "LT31 ", "v1.3103 ", 0x55, 0x58, ++ {0x10, 0x0f, 0x00} }, ++ {"Gateway ", "LT31 ", "v1.3201 ", 0x55, 0x58, ++ {0x10, 0x0f, 0x00} }, ++ {"Gateway ", "LT31 ", "v1.3302 ", 0x55, 0x58, ++ {0x10, 0x0f, 0x00} }, ++ {"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x21, 0x00} }, ++ {"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x20, 0x00} }, ++ {"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x21, 0x00} }, ++ {"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x20, 0x00} }, + /* pewpew-terminator */ +- {"", "", "", 0, 0, {0, 0} } ++ {"", "", "", 0, 0, {0, 0, 0} } + }; + + static const struct bios_settings_t *bios_cfg __read_mostly; +@@ -183,7 +194,7 @@ static int acerhdf_get_fanstate(int *sta + if (ec_read(bios_cfg->fanreg, &fan)) + return -EINVAL; + +- if (fan != bios_cfg->cmd.cmd_off) ++ if (fan != bios_cfg->cmd.chk_off) + *state = ACERHDF_FAN_AUTO; + else + *state = ACERHDF_FAN_OFF; diff --git a/queue-2.6.32/acpi-use-the-arb_disable-for-the-cpu-which-model-id-is-less-than-0x0f.patch b/queue-2.6.32/acpi-use-the-arb_disable-for-the-cpu-which-model-id-is-less-than-0x0f.patch new file mode 100644 index 00000000000..ff72d59fdbf --- /dev/null +++ b/queue-2.6.32/acpi-use-the-arb_disable-for-the-cpu-which-model-id-is-less-than-0x0f.patch @@ -0,0 +1,41 @@ +From 03a05ed1152944000151d57b71000de287a1eb02 Mon Sep 17 00:00:00 2001 +From: Zhao Yakui +Date: Fri, 11 Dec 2009 15:17:20 +0800 +Subject: ACPI: Use the ARB_DISABLE for the CPU which model id is less than 0x0f. + +From: Zhao Yakui + +commit 03a05ed1152944000151d57b71000de287a1eb02 upstream. + +Currently, ARB_DISABLE is a NOP on all of the recent Intel platforms. +For such platforms, reduce contention on c3_lock by skipping the fake +ARB_DISABLE. + +The cpu model id on one laptop is 14. If we disable ARB_DISABLE on this box, +the box can't be booted correctly. But if we still enable ARB_DISABLE on this +box, the box can be booted correctly. + +So we still use the ARB_DISABLE for the cpu which mode id is less than 0x0f. + +http://bugzilla.kernel.org/show_bug.cgi?id=14700 + +Signed-off-by: Zhao Yakui +Acked-by: Pallipadi, Venkatesh +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/acpi/cstate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kernel/acpi/cstate.c ++++ b/arch/x86/kernel/acpi/cstate.c +@@ -48,7 +48,7 @@ void acpi_processor_power_init_bm_check( + * P4, Core and beyond CPUs + */ + if (c->x86_vendor == X86_VENDOR_INTEL && +- (c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 14))) ++ (c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 0x0f))) + flags->bm_control = 0; + } + EXPORT_SYMBOL(acpi_processor_power_init_bm_check); diff --git a/queue-2.6.32/asus-laptop-change-light-sens-default-values.patch b/queue-2.6.32/asus-laptop-change-light-sens-default-values.patch new file mode 100644 index 00000000000..10051631dd0 --- /dev/null +++ b/queue-2.6.32/asus-laptop-change-light-sens-default-values.patch @@ -0,0 +1,53 @@ +From d951d4cc84e8b5ddb8e0ab81cf6a72cc73fdd668 Mon Sep 17 00:00:00 2001 +From: Corentin Chary +Date: Mon, 7 Dec 2009 22:05:50 +0100 +Subject: asus-laptop: change light sens default values. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Corentin Chary + +commit d951d4cc84e8b5ddb8e0ab81cf6a72cc73fdd668 upstream. + +The light sensor disable brightness key and +/sys/class/backlight/ control. There was a lot of report +from users who didn't understand why they couldn't change their +brightness, including: + +https://bugs.launchpad.net/bugs/222171 +https://bugzilla.novell.com/show_bug.cgi?id=514747 +http://bugzilla.kernel.org/show_bug.cgi?id=13671 +http://bugzilla.kernel.org/show_bug.cgi?id=14432 + +Now the light sensor is disabled, and if the user want to enable +it, the level should be ok. + +The funny thing is that comments where ok, not code. + +Cc: stable@kernel.org +Cc: Thomas Renninger +Cc: Peter Küppers +Cc: Michael Franzl +Cc: Ian Turner +Signed-off-by: Corentin Chary +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/asus-laptop.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/platform/x86/asus-laptop.c ++++ b/drivers/platform/x86/asus-laptop.c +@@ -1283,8 +1283,8 @@ static int asus_hotk_add(struct acpi_dev + hotk->ledd_status = 0xFFF; + + /* Set initial values of light sensor and level */ +- hotk->light_switch = 1; /* Default to light sensor disabled */ +- hotk->light_level = 0; /* level 5 for sensor sensitivity */ ++ hotk->light_switch = 0; /* Default to light sensor disabled */ ++ hotk->light_level = 5; /* level 5 for sensor sensitivity */ + + if (ls_switch_handle) + set_light_sens_switch(hotk->light_switch); diff --git a/queue-2.6.32/ath9k-fix-maximum-tx-fifo-settings-for-single-stream-devices.patch b/queue-2.6.32/ath9k-fix-maximum-tx-fifo-settings-for-single-stream-devices.patch new file mode 100644 index 00000000000..217e36f10f6 --- /dev/null +++ b/queue-2.6.32/ath9k-fix-maximum-tx-fifo-settings-for-single-stream-devices.patch @@ -0,0 +1,116 @@ +From lrodriguez@atheros.com Wed Dec 16 14:40:46 2009 +From: "Luis R. Rodriguez" +Date: Wed, 16 Dec 2009 11:51:43 -0500 +Subject: ath9k: Fix maximum tx fifo settings for single stream devices +To: greg@kroah.com, stable@kernel.org +Cc: linux-wireless@vger.kernel.org, "Luis R. Rodriguez" , Kyungwan Nam , Bennyam Malavazi , Stephen Chen , Shan Palanisamy , Paul Shaw , Vasanthakumar Thiagarajan +Message-ID: <1260982305-32244-4-git-send-email-lrodriguez@atheros.com> + +From: "Luis R. Rodriguez" + +This is a backport of upstream commit: f4709fdf683e1ed37b321c258b614ebe39752bf3 + +Atheros single stream AR9285 and AR9271 have half the PCU TX FIFO +buffer size of that of dual stream devices. Dual stream devices +have a max PCU TX FIFO size of 8 KB while single stream devices +have 4 KB. Single stream devices have an issue though and require +hardware only to use half of the amount of its capable PCU TX FIFO +size, 2 KB and this requires a change in software. + +Technically a change would not have been required (except for frame +burst considerations of 128 bytes) if these devices would have been +able to use the full 4 KB of the PCU TX FIFO size but our systems +engineers recommend 2 KB to be used only. We enforce this through +software by reducing the max frame triggger level to 2 KB. + +Fixing the max frame trigger level should then have a few benefits: + + * The PER will now be adjusted as designed for underruns when the + max trigger level is reached. This should help alleviate the + bus as the rate control algorithm chooses a slower rate which + should ensure frames are transmitted properly under high system + bus load. + + * The poll we use on our TX queues should now trigger and work + as designed for single stream devices. The hardware passes + data from each TX queue on the PCU TX FIFO queue respecting each + queue's priority. The new trigger level ensures this seeding of + the PCU TX FIFO queue occurs as designed which could mean avoiding + false resets and actually reseting hw correctly when a TX queue + is indeed stuck. + + * Some undocumented / unsupported behaviour could have been triggered + when the max trigger level level was being set to 4 KB on single + stream devices. Its not clear what this issue was to me yet. + +Cc: Kyungwan Nam +Cc: Bennyam Malavazi +Cc: Stephen Chen +Cc: Shan Palanisamy +Cc: Paul Shaw +Signed-off-by: Vasanthakumar Thiagarajan +Signed-off-by: Luis R. Rodriguez +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/ath/ath9k/hw.c | 11 ++++++++++- + drivers/net/wireless/ath/ath9k/hw.h | 1 + + drivers/net/wireless/ath/ath9k/mac.c | 4 ++-- + 3 files changed, 13 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -937,6 +937,11 @@ int ath9k_hw_init(struct ath_hw *ah) + DPRINTF(ah->ah_sc, ATH_DBG_RESET, "serialize_regmode is %d\n", + ah->config.serialize_regmode); + ++ if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) ++ ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD >> 1; ++ else ++ ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD; ++ + if (!ath9k_hw_macversion_supported(ah->hw_version.macVersion)) { + DPRINTF(ah->ah_sc, ATH_DBG_FATAL, + "Mac Chip Rev 0x%02x.%x is not supported by " +@@ -3670,7 +3675,11 @@ void ath9k_hw_fill_cap_info(struct ath_h + pCap->keycache_size = AR_KEYTABLE_SIZE; + + pCap->hw_caps |= ATH9K_HW_CAP_FASTCC; +- pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD; ++ ++ if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) ++ pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD >> 1; ++ else ++ pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD; + + if (AR_SREV_9285_10_OR_LATER(ah)) + pCap->num_gpio_pins = AR9285_NUM_GPIO; +--- a/drivers/net/wireless/ath/ath9k/hw.h ++++ b/drivers/net/wireless/ath/ath9k/hw.h +@@ -218,6 +218,7 @@ struct ath9k_ops_config { + #define AR_SPUR_FEEQ_BOUND_HT20 10 + int spurmode; + u16 spurchans[AR_EEPROM_MODAL_SPURS][2]; ++ u8 max_txtrig_level; + }; + + enum ath9k_int { +--- a/drivers/net/wireless/ath/ath9k/mac.c ++++ b/drivers/net/wireless/ath/ath9k/mac.c +@@ -70,7 +70,7 @@ bool ath9k_hw_updatetxtriglevel(struct a + u32 txcfg, curLevel, newLevel; + enum ath9k_int omask; + +- if (ah->tx_trig_level >= MAX_TX_FIFO_THRESHOLD) ++ if (ah->tx_trig_level >= ah->config.max_txtrig_level) + return false; + + omask = ath9k_hw_set_interrupts(ah, ah->mask_reg & ~ATH9K_INT_GLOBAL); +@@ -79,7 +79,7 @@ bool ath9k_hw_updatetxtriglevel(struct a + curLevel = MS(txcfg, AR_FTRIG); + newLevel = curLevel; + if (bIncTrigLevel) { +- if (curLevel < MAX_TX_FIFO_THRESHOLD) ++ if (curLevel < ah->config.max_txtrig_level) + newLevel++; + } else if (curLevel > MIN_TX_FIFO_THRESHOLD) + newLevel--; diff --git a/queue-2.6.32/ath9k-fix-processing-of-tx-ps-null-data-frames.patch b/queue-2.6.32/ath9k-fix-processing-of-tx-ps-null-data-frames.patch new file mode 100644 index 00000000000..71a37718a1e --- /dev/null +++ b/queue-2.6.32/ath9k-fix-processing-of-tx-ps-null-data-frames.patch @@ -0,0 +1,136 @@ +From lrodriguez@atheros.com Wed Dec 16 14:40:10 2009 +From: "Luis R. Rodriguez" +Date: Wed, 16 Dec 2009 11:51:42 -0500 +Subject: ath9k: fix processing of TX PS null data frames +To: greg@kroah.com, stable@kernel.org +Cc: linux-wireless@vger.kernel.org, "Luis R. Rodriguez" , Vasanthakumar Thiagarajan , Vivek Natarajan +Message-ID: <1260982305-32244-3-git-send-email-lrodriguez@atheros.com> + +From: "Luis R. Rodriguez" + +This is a backport of upstream commit: e7824a50662f7f79b1a739f705b4d906c31cf221 + +When mac80211 was telling us to go into Powersave we listened +and immediately turned RX off. This meant hardware would not +see the ACKs from the AP we're associated with and hardware +we'd end up retransmiting the null data frame in a loop +helplessly. + +Fix this by keeping track of the transmitted nullfunc frames +and only when we are sure the AP has sent back an ACK do we +go ahead and shut RX off. + + +Signed-off-by: Vasanthakumar Thiagarajan +Signed-off-by: Vivek Natarajan +Signed-off-by: Luis R. Rodriguez +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/ath/ath9k/ath9k.h | 3 +++ + drivers/net/wireless/ath/ath9k/mac.c | 2 ++ + drivers/net/wireless/ath/ath9k/mac.h | 1 + + drivers/net/wireless/ath/ath9k/main.c | 9 ++++++++- + drivers/net/wireless/ath/ath9k/xmit.c | 16 ++++++++++++++++ + 5 files changed, 30 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath9k/ath9k.h ++++ b/drivers/net/wireless/ath/ath9k/ath9k.h +@@ -139,6 +139,7 @@ struct ath_buf { + dma_addr_t bf_daddr; /* physical addr of desc */ + dma_addr_t bf_buf_addr; /* physical addr of data buffer */ + bool bf_stale; ++ bool bf_isnullfunc; + u16 bf_flags; + struct ath_buf_state bf_state; + dma_addr_t bf_dmacontext; +@@ -524,6 +525,8 @@ struct ath_led { + #define SC_OP_BEACON_SYNC BIT(19) + #define SC_OP_BTCOEX_ENABLED BIT(20) + #define SC_OP_BT_PRIORITY_DETECTED BIT(21) ++#define SC_OP_NULLFUNC_COMPLETED BIT(22) ++#define SC_OP_PS_ENABLED BIT(23) + + struct ath_bus_ops { + void (*read_cachesize)(struct ath_softc *sc, int *csz); +--- a/drivers/net/wireless/ath/ath9k/mac.c ++++ b/drivers/net/wireless/ath/ath9k/mac.c +@@ -222,6 +222,8 @@ int ath9k_hw_txprocdesc(struct ath_hw *a + ds->ds_txstat.ts_status = 0; + ds->ds_txstat.ts_flags = 0; + ++ if (ads->ds_txstatus1 & AR_FrmXmitOK) ++ ds->ds_txstat.ts_status |= ATH9K_TX_ACKED; + if (ads->ds_txstatus1 & AR_ExcessiveRetries) + ds->ds_txstat.ts_status |= ATH9K_TXERR_XRETRY; + if (ads->ds_txstatus1 & AR_Filtered) +--- a/drivers/net/wireless/ath/ath9k/mac.h ++++ b/drivers/net/wireless/ath/ath9k/mac.h +@@ -76,6 +76,7 @@ + #define ATH9K_TXERR_FIFO 0x04 + #define ATH9K_TXERR_XTXOP 0x08 + #define ATH9K_TXERR_TIMER_EXPIRED 0x10 ++#define ATH9K_TX_ACKED 0x20 + + #define ATH9K_TX_BA 0x01 + #define ATH9K_TX_PWRMGMT 0x02 +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -2327,6 +2327,7 @@ static int ath9k_config(struct ieee80211 + + if (changed & IEEE80211_CONF_CHANGE_PS) { + if (conf->flags & IEEE80211_CONF_PS) { ++ sc->sc_flags |= SC_OP_PS_ENABLED; + if (!(ah->caps.hw_caps & + ATH9K_HW_CAP_AUTOSLEEP)) { + if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) { +@@ -2334,11 +2335,17 @@ static int ath9k_config(struct ieee80211 + ath9k_hw_set_interrupts(sc->sc_ah, + sc->imask); + } +- ath9k_hw_setrxabort(sc->sc_ah, 1); + } + sc->ps_enabled = true; ++ if ((sc->sc_flags & SC_OP_NULLFUNC_COMPLETED)) { ++ sc->sc_flags &= ~SC_OP_NULLFUNC_COMPLETED; ++ sc->ps_enabled = true; ++ ath9k_hw_setrxabort(sc->sc_ah, 1); ++ } + } else { + sc->ps_enabled = false; ++ sc->sc_flags &= ~(SC_OP_PS_ENABLED | ++ SC_OP_NULLFUNC_COMPLETED); + ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); + if (!(ah->caps.hw_caps & + ATH9K_HW_CAP_AUTOSLEEP)) { +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -1592,6 +1592,13 @@ static int ath_tx_setup_buffer(struct ie + } + + bf->bf_buf_addr = bf->bf_dmacontext; ++ ++ if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc)) { ++ bf->bf_isnullfunc = true; ++ sc->sc_flags &= ~SC_OP_NULLFUNC_COMPLETED; ++ } else ++ bf->bf_isnullfunc = false; ++ + return 0; + } + +@@ -1989,6 +1996,15 @@ static void ath_tx_processq(struct ath_s + if (ds == txq->axq_gatingds) + txq->axq_gatingds = NULL; + ++ if (bf->bf_isnullfunc && ++ (ds->ds_txstat.ts_status & ATH9K_TX_ACKED)) { ++ if ((sc->sc_flags & SC_OP_PS_ENABLED)) { ++ sc->ps_enabled = true; ++ ath9k_hw_setrxabort(sc->sc_ah, 1); ++ } else ++ sc->sc_flags |= SC_OP_NULLFUNC_COMPLETED; ++ } ++ + /* + * Remove ath_buf's of the same transmit unit from txq, + * however leave the last descriptor back as the holding diff --git a/queue-2.6.32/ath9k-fix-tx-hang-poll-routine.patch b/queue-2.6.32/ath9k-fix-tx-hang-poll-routine.patch new file mode 100644 index 00000000000..1a294a813db --- /dev/null +++ b/queue-2.6.32/ath9k-fix-tx-hang-poll-routine.patch @@ -0,0 +1,37 @@ +From lrodriguez@atheros.com Wed Dec 16 14:39:42 2009 +From: Sujith +Date: Wed, 16 Dec 2009 11:51:41 -0500 +Subject: ath9k: Fix TX hang poll routine +To: greg@kroah.com, stable@kernel.org +Cc: linux-wireless@vger.kernel.org, Sujith , "Luis R. Rodriguez" +Message-ID: <1260982305-32244-2-git-send-email-lrodriguez@atheros.com> + + +From: Sujith + +This is a backport of upstream commit: 332c556633b8c5fb4e890b1783122f2315526590 + +When TX is hung, the chip is reset. Ensure that +the chip is awake by using the PS wrappers. + + +Signed-off-by: Sujith +Signed-off-by: Luis R. Rodriguez +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/xmit.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -2065,7 +2065,9 @@ static void ath_tx_complete_poll_work(st + + if (needreset) { + DPRINTF(sc, ATH_DBG_RESET, "tx hung, resetting the chip\n"); ++ ath9k_ps_wakeup(sc); + ath_reset(sc, false); ++ ath9k_ps_restore(sc); + } + + ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, diff --git a/queue-2.6.32/ath9k-fix-tx-status-reporting.patch b/queue-2.6.32/ath9k-fix-tx-status-reporting.patch new file mode 100644 index 00000000000..ff4ae593fe1 --- /dev/null +++ b/queue-2.6.32/ath9k-fix-tx-status-reporting.patch @@ -0,0 +1,43 @@ +From lrodriguez@atheros.com Wed Dec 16 14:41:20 2009 +From: Felix Fietkau +Date: Wed, 16 Dec 2009 11:51:44 -0500 +Subject: ath9k: fix tx status reporting +To: greg@kroah.com, stable@kernel.org +Cc: linux-wireless@vger.kernel.org, Felix Fietkau , "Luis R. Rodriguez" +Message-ID: <1260982305-32244-5-git-send-email-lrodriguez@atheros.com> + + +From: Felix Fietkau + +This is a backport of upstream commit: e8c6342d989e241513baeba4b05a04b6b1f3bc8b + +This patch fixes a bug in ath9k's tx status check, which +caused mac80211 to consider regularly transmitted unicast frames +as un-acked. + +When checking the ts_status field for errors, it needs to be masked +with ATH9K_TXERR_FILT, because this field also contains other fields +like ATH9K_TX_ACKED. + +Without this patch, AP mode is pretty much unusable, as hostapd +checks the ACK status for the frames that it injects. + + +Signed-off-by: Felix Fietkau +Signed-off-by: Luis R. Rodriguez +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/ath/ath9k/xmit.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -2020,7 +2020,7 @@ static void ath_tx_processq(struct ath_s + if (bf_isaggr(bf)) + txq->axq_aggr_depth--; + +- txok = (ds->ds_txstat.ts_status == 0); ++ txok = !(ds->ds_txstat.ts_status & ATH9K_TXERR_FILT); + txq->axq_tx_inprogress = false; + spin_unlock_bh(&txq->axq_lock); + diff --git a/queue-2.6.32/b43legacy-avoid-ppc-fault-during-resume.patch b/queue-2.6.32/b43legacy-avoid-ppc-fault-during-resume.patch new file mode 100644 index 00000000000..ea99e03b0f1 --- /dev/null +++ b/queue-2.6.32/b43legacy-avoid-ppc-fault-during-resume.patch @@ -0,0 +1,43 @@ +From 316a4d966cae3c2dec83ebb1ee1a3515f97b30ff Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Mon, 23 Nov 2009 18:42:36 -0600 +Subject: b43legacy: avoid PPC fault during resume + +From: Larry Finger + +commit 316a4d966cae3c2dec83ebb1ee1a3515f97b30ff upstream. + +For PPC architecture with PHY Revision < 3, a read of the register +B43_MMIO_HWENABLED_LO will cause a CPU fault unless b43legacy_status() +returns a value of 2 (B43legacy_STAT_STARTED); however, one finds that +the driver is unable to associate after resuming from hibernation unless +this routine returns 1. To satisfy both conditions, the routine is rewritten +to return TRUE whenever b43legacy_status() returns a value < 2. + +This patch fixes the second problem listed in the postings for Red Hat +Bugzilla #538523. + +Signed-off-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/b43legacy/rfkill.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/net/wireless/b43legacy/rfkill.c ++++ b/drivers/net/wireless/b43legacy/rfkill.c +@@ -34,6 +34,13 @@ bool b43legacy_is_hw_radio_enabled(struc + & B43legacy_MMIO_RADIO_HWENABLED_HI_MASK)) + return 1; + } else { ++ /* To prevent CPU fault on PPC, do not read a register ++ * unless the interface is started; however, on resume ++ * for hibernation, this routine is entered early. When ++ * that happens, unconditionally return TRUE. ++ */ ++ if (b43legacy_status(dev) < B43legacy_STAT_STARTED) ++ return 1; + if (b43legacy_read16(dev, B43legacy_MMIO_RADIO_HWENABLED_LO) + & B43legacy_MMIO_RADIO_HWENABLED_LO_MASK) + return 1; diff --git a/queue-2.6.32/bcm63xx_enet-fix-compilation-failure-after-get_stats_count-removal.patch b/queue-2.6.32/bcm63xx_enet-fix-compilation-failure-after-get_stats_count-removal.patch new file mode 100644 index 00000000000..d20ff1b916c --- /dev/null +++ b/queue-2.6.32/bcm63xx_enet-fix-compilation-failure-after-get_stats_count-removal.patch @@ -0,0 +1,49 @@ +From a3f92eea04101d9a8e14d50f8048cc5b7bca07a8 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Tue, 15 Dec 2009 06:45:06 +0000 +Subject: bcm63xx_enet: fix compilation failure after get_stats_count removal + +From: Florian Fainelli + +commit a3f92eea04101d9a8e14d50f8048cc5b7bca07a8 upstream. + +This patch converts bcm63xx_enet to uset get_sset_count +like the other drivers do. + +Signed-off-by: Florian Fainelli +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/bcm63xx_enet.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/drivers/net/bcm63xx_enet.c ++++ b/drivers/net/bcm63xx_enet.c +@@ -1248,9 +1248,15 @@ static void bcm_enet_get_drvinfo(struct + drvinfo->n_stats = BCM_ENET_STATS_LEN; + } + +-static int bcm_enet_get_stats_count(struct net_device *netdev) ++static int bcm_enet_get_sset_count(struct net_device *netdev, ++ int string_set) + { +- return BCM_ENET_STATS_LEN; ++ switch (string_set) { ++ case ETH_SS_STATS: ++ return BCM_ENET_STATS_LEN; ++ default: ++ return -EINVAL; ++ } + } + + static void bcm_enet_get_strings(struct net_device *netdev, +@@ -1476,7 +1482,7 @@ static int bcm_enet_set_pauseparam(struc + + static struct ethtool_ops bcm_enet_ethtool_ops = { + .get_strings = bcm_enet_get_strings, +- .get_stats_count = bcm_enet_get_stats_count, ++ .get_sset_count = bcm_enet_get_sset_count, + .get_ethtool_stats = bcm_enet_get_ethtool_stats, + .get_settings = bcm_enet_get_settings, + .set_settings = bcm_enet_set_settings, diff --git a/queue-2.6.32/drm-i915-avoid-null-dereference-with-component_only-tv_modes.patch b/queue-2.6.32/drm-i915-avoid-null-dereference-with-component_only-tv_modes.patch new file mode 100644 index 00000000000..91e1ad87b11 --- /dev/null +++ b/queue-2.6.32/drm-i915-avoid-null-dereference-with-component_only-tv_modes.patch @@ -0,0 +1,58 @@ +From d271817baecbccb47da0d9f28c285a0dae8a06b7 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Fri, 27 Nov 2009 13:06:56 +0000 +Subject: drm/i915: Avoid NULL dereference with component_only tv_modes + +From: Chris Wilson + +commit d271817baecbccb47da0d9f28c285a0dae8a06b7 upstream. + +In commit d2d9f2324, the guard for a valid video mode was removed. This +caused the regression: + + kernel crash during kms graphic boot on Intel GM4500 platform + https://bugzilla.redhat.com/show_bug.cgi?id=540218 + +This patches changes the logic slightly not to rely on a coupled +variable, but to just check whether the video_modes is valid before +dereferencing. + +Signed-off-by: Chris Wilson +Cc: David Woodhouse +Cc: Zhenyu Wang +[ickle: Actually reference the correct bug report] +Acked-by: Zhenyu Wang +Signed-off-by: Eric Anholt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_tv.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_tv.c ++++ b/drivers/gpu/drm/i915/intel_tv.c +@@ -1213,20 +1213,17 @@ intel_tv_mode_set(struct drm_encoder *en + tv_ctl |= TV_TRILEVEL_SYNC; + if (tv_mode->pal_burst) + tv_ctl |= TV_PAL_BURST; ++ + scctl1 = 0; +- /* dda1 implies valid video levels */ +- if (tv_mode->dda1_inc) { ++ if (tv_mode->dda1_inc) + scctl1 |= TV_SC_DDA1_EN; +- } +- + if (tv_mode->dda2_inc) + scctl1 |= TV_SC_DDA2_EN; +- + if (tv_mode->dda3_inc) + scctl1 |= TV_SC_DDA3_EN; +- + scctl1 |= tv_mode->sc_reset; +- scctl1 |= video_levels->burst << TV_BURST_LEVEL_SHIFT; ++ if (video_levels) ++ scctl1 |= video_levels->burst << TV_BURST_LEVEL_SHIFT; + scctl1 |= tv_mode->dda1_inc << TV_SCDDA1_INC_SHIFT; + + scctl2 = tv_mode->dda2_size << TV_SCDDA2_SIZE_SHIFT | diff --git a/queue-2.6.32/drm-i915-fix-lvds-stability-issue-on-ironlake.patch b/queue-2.6.32/drm-i915-fix-lvds-stability-issue-on-ironlake.patch new file mode 100644 index 00000000000..69d3007129e --- /dev/null +++ b/queue-2.6.32/drm-i915-fix-lvds-stability-issue-on-ironlake.patch @@ -0,0 +1,146 @@ +From 1b3c7a47f993bf9ab6c4c7cc3bbf5588052b58f4 Mon Sep 17 00:00:00 2001 +From: Zhenyu Wang +Date: Wed, 25 Nov 2009 13:09:38 +0800 +Subject: drm/i915: Fix LVDS stability issue on Ironlake + +From: Zhenyu Wang + +commit 1b3c7a47f993bf9ab6c4c7cc3bbf5588052b58f4 upstream. + +In disable sequence, all output ports on PCH have to be disabled +before PCH transcoder, but LVDS port was left always enabled. This +one fixes that by disable LVDS port properly during pipe disable +process, and resolved stability issue seen on Ironlake. Also move +panel fitting disable time just after pipe disable to align with +the spec. + +Signed-off-by: Zhenyu Wang +Signed-off-by: Eric Anholt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_display.c | 60 +++++++++++++++++++++++------------ + 1 file changed, 41 insertions(+), 19 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -1482,6 +1482,15 @@ static void igdng_crtc_dpms(struct drm_c + case DRM_MODE_DPMS_STANDBY: + case DRM_MODE_DPMS_SUSPEND: + DRM_DEBUG("crtc %d dpms on\n", pipe); ++ ++ if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { ++ temp = I915_READ(PCH_LVDS); ++ if ((temp & LVDS_PORT_EN) == 0) { ++ I915_WRITE(PCH_LVDS, temp | LVDS_PORT_EN); ++ POSTING_READ(PCH_LVDS); ++ } ++ } ++ + if (HAS_eDP) { + /* enable eDP PLL */ + igdng_enable_pll_edp(crtc); +@@ -1666,8 +1675,6 @@ static void igdng_crtc_dpms(struct drm_c + case DRM_MODE_DPMS_OFF: + DRM_DEBUG("crtc %d dpms off\n", pipe); + +- i915_disable_vga(dev); +- + /* Disable display plane */ + temp = I915_READ(dspcntr_reg); + if ((temp & DISPLAY_PLANE_ENABLE) != 0) { +@@ -1677,6 +1684,8 @@ static void igdng_crtc_dpms(struct drm_c + I915_READ(dspbase_reg); + } + ++ i915_disable_vga(dev); ++ + /* disable cpu pipe, disable after all planes disabled */ + temp = I915_READ(pipeconf_reg); + if ((temp & PIPEACONF_ENABLE) != 0) { +@@ -1697,9 +1706,15 @@ static void igdng_crtc_dpms(struct drm_c + } else + DRM_DEBUG("crtc %d is disabled\n", pipe); + +- if (HAS_eDP) { +- igdng_disable_pll_edp(crtc); ++ udelay(100); ++ ++ /* Disable PF */ ++ temp = I915_READ(pf_ctl_reg); ++ if ((temp & PF_ENABLE) != 0) { ++ I915_WRITE(pf_ctl_reg, temp & ~PF_ENABLE); ++ I915_READ(pf_ctl_reg); + } ++ I915_WRITE(pf_win_size, 0); + + /* disable CPU FDI tx and PCH FDI rx */ + temp = I915_READ(fdi_tx_reg); +@@ -1725,6 +1740,13 @@ static void igdng_crtc_dpms(struct drm_c + + udelay(100); + ++ if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { ++ temp = I915_READ(PCH_LVDS); ++ I915_WRITE(PCH_LVDS, temp & ~LVDS_PORT_EN); ++ I915_READ(PCH_LVDS); ++ udelay(100); ++ } ++ + /* disable PCH transcoder */ + temp = I915_READ(transconf_reg); + if ((temp & TRANS_ENABLE) != 0) { +@@ -1744,6 +1766,8 @@ static void igdng_crtc_dpms(struct drm_c + } + } + ++ udelay(100); ++ + /* disable PCH DPLL */ + temp = I915_READ(pch_dpll_reg); + if ((temp & DPLL_VCO_ENABLE) != 0) { +@@ -1751,14 +1775,20 @@ static void igdng_crtc_dpms(struct drm_c + I915_READ(pch_dpll_reg); + } + +- temp = I915_READ(fdi_rx_reg); +- if ((temp & FDI_RX_PLL_ENABLE) != 0) { +- temp &= ~FDI_SEL_PCDCLK; +- temp &= ~FDI_RX_PLL_ENABLE; +- I915_WRITE(fdi_rx_reg, temp); +- I915_READ(fdi_rx_reg); ++ if (HAS_eDP) { ++ igdng_disable_pll_edp(crtc); + } + ++ temp = I915_READ(fdi_rx_reg); ++ temp &= ~FDI_SEL_PCDCLK; ++ I915_WRITE(fdi_rx_reg, temp); ++ I915_READ(fdi_rx_reg); ++ ++ temp = I915_READ(fdi_rx_reg); ++ temp &= ~FDI_RX_PLL_ENABLE; ++ I915_WRITE(fdi_rx_reg, temp); ++ I915_READ(fdi_rx_reg); ++ + /* Disable CPU FDI TX PLL */ + temp = I915_READ(fdi_tx_reg); + if ((temp & FDI_TX_PLL_ENABLE) != 0) { +@@ -1767,16 +1797,8 @@ static void igdng_crtc_dpms(struct drm_c + udelay(100); + } + +- /* Disable PF */ +- temp = I915_READ(pf_ctl_reg); +- if ((temp & PF_ENABLE) != 0) { +- I915_WRITE(pf_ctl_reg, temp & ~PF_ENABLE); +- I915_READ(pf_ctl_reg); +- } +- I915_WRITE(pf_win_size, 0); +- + /* Wait for the clocks to turn off. */ +- udelay(150); ++ udelay(100); + break; + } + } diff --git a/queue-2.6.32/drm-i915-fix-sync-to-vblank-when-vga-output-is-turned-off.patch b/queue-2.6.32/drm-i915-fix-sync-to-vblank-when-vga-output-is-turned-off.patch new file mode 100644 index 00000000000..fb382050f7d --- /dev/null +++ b/queue-2.6.32/drm-i915-fix-sync-to-vblank-when-vga-output-is-turned-off.patch @@ -0,0 +1,107 @@ +From stefan.bader@canonical.com Wed Dec 16 14:42:20 2009 +From: Li Peng +Date: Wed, 16 Dec 2009 16:33:25 +0100 +Subject: drm/i915: Fix sync to vblank when VGA output is turned off +To: stable@kernel.org +Cc: Eric Anholt , Li Peng , Jesse Barnes +Message-ID: <1260977606-13664-2-git-send-email-stefan.bader@canonical.com> + + +From: Li Peng + +commit 778c902640530371a169ad1c03566e7c51b09874 upstream + +In current vblank-wait implementation, if we turn off VGA output, +drm_wait_vblank will still wait on the disabled pipe until timeout, +because vblank on the pipe is assumed be enabled. This would cause +slow system response on some system such as moblin. + +This patch resolve the issue by adding a drm helper function +drm_vblank_off which explicitly clear vblank_enabled[crtc], wake up +any waiting queue and save last vblank counter before turning off +crtc. It also slightly change drm_vblank_get to ensure that we will +will return immediately if trying to wait on a disabled pipe. + +Signed-off-by: Li Peng +Reviewed-by: Jesse Barnes +[anholt: hand-applied for conflicts with overlay changes] +Signed-off-by: Eric Anholt +Cc: Stefan Bader +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/drm_irq.c | 34 ++++++++++++++++++++++++++-------- + drivers/gpu/drm/i915/intel_display.c | 1 + + include/drm/drmP.h | 1 + + 3 files changed, 28 insertions(+), 8 deletions(-) + +--- a/drivers/gpu/drm/drm_irq.c ++++ b/drivers/gpu/drm/drm_irq.c +@@ -429,15 +429,21 @@ int drm_vblank_get(struct drm_device *de + + spin_lock_irqsave(&dev->vbl_lock, irqflags); + /* Going from 0->1 means we have to enable interrupts again */ +- if (atomic_add_return(1, &dev->vblank_refcount[crtc]) == 1 && +- !dev->vblank_enabled[crtc]) { +- ret = dev->driver->enable_vblank(dev, crtc); +- DRM_DEBUG("enabling vblank on crtc %d, ret: %d\n", crtc, ret); +- if (ret) ++ if (atomic_add_return(1, &dev->vblank_refcount[crtc]) == 1) { ++ if (!dev->vblank_enabled[crtc]) { ++ ret = dev->driver->enable_vblank(dev, crtc); ++ DRM_DEBUG("enabling vblank on crtc %d, ret: %d\n", crtc, ret); ++ if (ret) ++ atomic_dec(&dev->vblank_refcount[crtc]); ++ else { ++ dev->vblank_enabled[crtc] = 1; ++ drm_update_vblank_count(dev, crtc); ++ } ++ } ++ } else { ++ if (!dev->vblank_enabled[crtc]) { + atomic_dec(&dev->vblank_refcount[crtc]); +- else { +- dev->vblank_enabled[crtc] = 1; +- drm_update_vblank_count(dev, crtc); ++ ret = -EINVAL; + } + } + spin_unlock_irqrestore(&dev->vbl_lock, irqflags); +@@ -464,6 +470,18 @@ void drm_vblank_put(struct drm_device *d + } + EXPORT_SYMBOL(drm_vblank_put); + ++void drm_vblank_off(struct drm_device *dev, int crtc) ++{ ++ unsigned long irqflags; ++ ++ spin_lock_irqsave(&dev->vbl_lock, irqflags); ++ DRM_WAKEUP(&dev->vbl_queue[crtc]); ++ dev->vblank_enabled[crtc] = 0; ++ dev->last_vblank[crtc] = dev->driver->get_vblank_counter(dev, crtc); ++ spin_unlock_irqrestore(&dev->vbl_lock, irqflags); ++} ++EXPORT_SYMBOL(drm_vblank_off); ++ + /** + * drm_vblank_pre_modeset - account for vblanks across mode sets + * @dev: DRM device +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -1845,6 +1845,7 @@ static void i9xx_crtc_dpms(struct drm_cr + intel_update_watermarks(dev); + /* Give the overlay scaler a chance to disable if it's on this pipe */ + //intel_crtc_dpms_video(crtc, FALSE); TODO ++ drm_vblank_off(dev, pipe); + + if (dev_priv->cfb_plane == plane && + dev_priv->display.disable_fbc) +--- a/include/drm/drmP.h ++++ b/include/drm/drmP.h +@@ -1295,6 +1295,7 @@ extern u32 drm_vblank_count(struct drm_d + extern void drm_handle_vblank(struct drm_device *dev, int crtc); + extern int drm_vblank_get(struct drm_device *dev, int crtc); + extern void drm_vblank_put(struct drm_device *dev, int crtc); ++extern void drm_vblank_off(struct drm_device *dev, int crtc); + extern void drm_vblank_cleanup(struct drm_device *dev); + /* Modesetting support */ + extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); diff --git a/queue-2.6.32/drm-i915-pineview-only-has-lvds-and-crt-ports.patch b/queue-2.6.32/drm-i915-pineview-only-has-lvds-and-crt-ports.patch new file mode 100644 index 00000000000..52d5c8d7e5e --- /dev/null +++ b/queue-2.6.32/drm-i915-pineview-only-has-lvds-and-crt-ports.patch @@ -0,0 +1,69 @@ +From 103a196f4224dc6872081305cf7f82ebf67aa7bd Mon Sep 17 00:00:00 2001 +From: Zhenyu Wang +Date: Fri, 27 Nov 2009 11:44:36 +0800 +Subject: drm/i915: PineView only has LVDS and CRT ports + +From: Zhenyu Wang + +commit 103a196f4224dc6872081305cf7f82ebf67aa7bd upstream. + +PineView only has 2 ports for LVDS and CRT. Don't enable other +ports for it. + +Cc: Shaohua Li +Signed-off-by: Zhenyu Wang +Signed-off-by: Eric Anholt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_drv.h | 4 ++++ + drivers/gpu/drm/i915/intel_display.c | 6 +++--- + 2 files changed, 7 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_drv.h ++++ b/drivers/gpu/drm/i915/i915_drv.h +@@ -957,6 +957,7 @@ extern int i915_wait_ring(struct drm_dev + #define IS_I85X(dev) ((dev)->pci_device == 0x3582) + #define IS_I855(dev) ((dev)->pci_device == 0x3582) + #define IS_I865G(dev) ((dev)->pci_device == 0x2572) ++#define IS_I8XX(dev) (IS_I830(dev) || IS_845G(dev) || IS_I85X(dev) || IS_I865G(dev)) + + #define IS_I915G(dev) ((dev)->pci_device == 0x2582 || (dev)->pci_device == 0x258a) + #define IS_I915GM(dev) ((dev)->pci_device == 0x2592) +@@ -1018,9 +1019,12 @@ extern int i915_wait_ring(struct drm_dev + */ + #define HAS_128_BYTE_Y_TILING(dev) (IS_I9XX(dev) && !(IS_I915G(dev) || \ + IS_I915GM(dev))) ++#define SUPPORTS_DIGITAL_OUTPUTS(dev) (IS_I9XX(dev) && !IS_IGD(dev)) + #define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IGDNG(dev)) + #define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_IGDNG(dev)) + #define SUPPORTS_EDP(dev) (IS_IGDNG_M(dev)) ++#define SUPPORTS_TV(dev) (IS_I9XX(dev) && IS_MOBILE(dev) && \ ++ !IS_IGDNG(dev) && !IS_IGD(dev)) + #define I915_HAS_HOTPLUG(dev) (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev) || IS_I965G(dev)) + /* dsparb controlled by hw only */ + #define DSPARB_HWCONTROL(dev) (IS_G4X(dev) || IS_IGDNG(dev)) +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -4119,7 +4119,7 @@ static void intel_setup_outputs(struct d + if (I915_READ(PCH_DP_D) & DP_DETECTED) + intel_dp_init(dev, PCH_DP_D); + +- } else if (IS_I9XX(dev)) { ++ } else if (SUPPORTS_DIGITAL_OUTPUTS(dev)) { + bool found = false; + + if (I915_READ(SDVOB) & SDVO_DETECTED) { +@@ -4146,10 +4146,10 @@ static void intel_setup_outputs(struct d + + if (SUPPORTS_INTEGRATED_DP(dev) && (I915_READ(DP_D) & DP_DETECTED)) + intel_dp_init(dev, DP_D); +- } else ++ } else if (IS_I8XX(dev)) + intel_dvo_init(dev); + +- if (IS_I9XX(dev) && IS_MOBILE(dev) && !IS_IGDNG(dev)) ++ if (SUPPORTS_TV(dev)) + intel_tv_init(dev); + + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { diff --git a/queue-2.6.32/ext3-fix-data-filesystem-corruption-when-write-fails-to-copy-data.patch b/queue-2.6.32/ext3-fix-data-filesystem-corruption-when-write-fails-to-copy-data.patch new file mode 100644 index 00000000000..c9aeb824b5b --- /dev/null +++ b/queue-2.6.32/ext3-fix-data-filesystem-corruption-when-write-fails-to-copy-data.patch @@ -0,0 +1,81 @@ +From 68eb3db08344286733adac48304d9fb7a0e53b27 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Tue, 1 Dec 2009 16:53:06 +0100 +Subject: ext3: Fix data / filesystem corruption when write fails to copy data + +From: Jan Kara + +commit 68eb3db08344286733adac48304d9fb7a0e53b27 upstream. + +When ext3_write_begin fails after allocating some blocks or +generic_perform_write fails to copy data to write, we truncate blocks already +instantiated beyond i_size. Although these blocks were never inside i_size, we +have to truncate pagecache of these blocks so that corresponding buffers get +unmapped. Otherwise subsequent __block_prepare_write (called because we are +retrying the write) will find the buffers mapped, not call ->get_block, and +thus the page will be backed by already freed blocks leading to filesystem and +data corruption. + +Reported-by: James Y Knight +Signed-off-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ext3/inode.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +--- a/fs/ext3/inode.c ++++ b/fs/ext3/inode.c +@@ -1151,6 +1151,16 @@ static int do_journal_get_write_access(h + return ext3_journal_get_write_access(handle, bh); + } + ++/* ++ * Truncate blocks that were not used by write. We have to truncate the ++ * pagecache as well so that corresponding buffers get properly unmapped. ++ */ ++static void ext3_truncate_failed_write(struct inode *inode) ++{ ++ truncate_inode_pages(inode->i_mapping, inode->i_size); ++ ext3_truncate(inode); ++} ++ + static int ext3_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, + struct page **pagep, void **fsdata) +@@ -1209,7 +1219,7 @@ write_begin_failed: + unlock_page(page); + page_cache_release(page); + if (pos + len > inode->i_size) +- ext3_truncate(inode); ++ ext3_truncate_failed_write(inode); + } + if (ret == -ENOSPC && ext3_should_retry_alloc(inode->i_sb, &retries)) + goto retry; +@@ -1304,7 +1314,7 @@ static int ext3_ordered_write_end(struct + page_cache_release(page); + + if (pos + len > inode->i_size) +- ext3_truncate(inode); ++ ext3_truncate_failed_write(inode); + return ret ? ret : copied; + } + +@@ -1330,7 +1340,7 @@ static int ext3_writeback_write_end(stru + page_cache_release(page); + + if (pos + len > inode->i_size) +- ext3_truncate(inode); ++ ext3_truncate_failed_write(inode); + return ret ? ret : copied; + } + +@@ -1383,7 +1393,7 @@ static int ext3_journalled_write_end(str + page_cache_release(page); + + if (pos + len > inode->i_size) +- ext3_truncate(inode); ++ ext3_truncate_failed_write(inode); + return ret ? ret : copied; + } + diff --git a/queue-2.6.32/intel-iommu-apply-bios-sanity-checks-for-interrupt-remapping-too.patch b/queue-2.6.32/intel-iommu-apply-bios-sanity-checks-for-interrupt-remapping-too.patch new file mode 100644 index 00000000000..082127c0a8c --- /dev/null +++ b/queue-2.6.32/intel-iommu-apply-bios-sanity-checks-for-interrupt-remapping-too.patch @@ -0,0 +1,91 @@ +From 6ecbf01c7ce4c0f4c3bdfa0e64ac6258328fda6c Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 2 Dec 2009 09:20:27 +0000 +Subject: intel-iommu: Apply BIOS sanity checks for interrupt remapping too. + +From: David Woodhouse + +commit 6ecbf01c7ce4c0f4c3bdfa0e64ac6258328fda6c upstream. + +The BIOS errors where an IOMMU is reported either at zero or a bogus +address are causing problems even when the IOMMU is disabled -- because +interrupt remapping uses the same hardware. Ensure that the checks get +applied for the interrupt remapping initialisation too. + +Signed-off-by: David Woodhouse +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/dmar.c | 33 ++++++++++++++++++++++++++------- + 1 file changed, 26 insertions(+), 7 deletions(-) + +--- a/drivers/pci/dmar.c ++++ b/drivers/pci/dmar.c +@@ -582,6 +582,8 @@ int __init dmar_table_init(void) + return 0; + } + ++static int bios_warned; ++ + int __init check_zero_address(void) + { + struct acpi_table_dmar *dmar; +@@ -612,6 +614,7 @@ int __init check_zero_address(void) + dmi_get_system_info(DMI_BIOS_VENDOR), + dmi_get_system_info(DMI_BIOS_VERSION), + dmi_get_system_info(DMI_PRODUCT_VERSION)); ++ bios_warned = 1; + goto failed; + } + +@@ -631,6 +634,7 @@ int __init check_zero_address(void) + dmi_get_system_info(DMI_BIOS_VENDOR), + dmi_get_system_info(DMI_BIOS_VERSION), + dmi_get_system_info(DMI_PRODUCT_VERSION)); ++ bios_warned = 1; + goto failed; + } + } +@@ -688,6 +692,18 @@ int alloc_iommu(struct dmar_drhd_unit *d + int agaw = 0; + int msagaw = 0; + ++ if (!drhd->reg_base_addr) { ++ if (!bios_warned) { ++ WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n" ++ "BIOS vendor: %s; Ver: %s; Product Version: %s\n", ++ dmi_get_system_info(DMI_BIOS_VENDOR), ++ dmi_get_system_info(DMI_BIOS_VERSION), ++ dmi_get_system_info(DMI_PRODUCT_VERSION)); ++ bios_warned = 1; ++ } ++ return -EINVAL; ++ } ++ + iommu = kzalloc(sizeof(*iommu), GFP_KERNEL); + if (!iommu) + return -ENOMEM; +@@ -704,13 +720,16 @@ int alloc_iommu(struct dmar_drhd_unit *d + iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG); + + if (iommu->cap == (uint64_t)-1 && iommu->ecap == (uint64_t)-1) { +- /* Promote an attitude of violence to a BIOS engineer today */ +- WARN(1, "Your BIOS is broken; DMAR reported at address %llx returns all ones!\n" +- "BIOS vendor: %s; Ver: %s; Product Version: %s\n", +- drhd->reg_base_addr, +- dmi_get_system_info(DMI_BIOS_VENDOR), +- dmi_get_system_info(DMI_BIOS_VERSION), +- dmi_get_system_info(DMI_PRODUCT_VERSION)); ++ if (!bios_warned) { ++ /* Promote an attitude of violence to a BIOS engineer today */ ++ WARN(1, "Your BIOS is broken; DMAR reported at address %llx returns all ones!\n" ++ "BIOS vendor: %s; Ver: %s; Product Version: %s\n", ++ drhd->reg_base_addr, ++ dmi_get_system_info(DMI_BIOS_VENDOR), ++ dmi_get_system_info(DMI_BIOS_VERSION), ++ dmi_get_system_info(DMI_PRODUCT_VERSION)); ++ bios_warned = 1; ++ } + goto err_unmap; + } + diff --git a/queue-2.6.32/intel-iommu-check-for-an-rmrr-which-ends-before-it-starts.patch b/queue-2.6.32/intel-iommu-check-for-an-rmrr-which-ends-before-it-starts.patch new file mode 100644 index 00000000000..9188356c601 --- /dev/null +++ b/queue-2.6.32/intel-iommu-check-for-an-rmrr-which-ends-before-it-starts.patch @@ -0,0 +1,40 @@ +From 5595b528b49a702c0428c0762bab60999648254c Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 2 Dec 2009 09:21:55 +0000 +Subject: intel-iommu: Check for an RMRR which ends before it starts. + +From: David Woodhouse + +commit 5595b528b49a702c0428c0762bab60999648254c upstream. + +Some HP BIOSes report an RMRR region (a region which needs a 1:1 mapping +in the IOMMU for a given device) which has an end address lower than its +start address. Detect that and warn, rather than triggering the +BUG() in dma_pte_clear_range(). + +Signed-off-by: David Woodhouse +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/intel-iommu.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/pci/intel-iommu.c ++++ b/drivers/pci/intel-iommu.c +@@ -1991,6 +1991,16 @@ static int iommu_prepare_identity_map(st + "IOMMU: Setting identity map for device %s [0x%Lx - 0x%Lx]\n", + pci_name(pdev), start, end); + ++ if (end < start) { ++ WARN(1, "Your BIOS is broken; RMRR ends before it starts!\n" ++ "BIOS vendor: %s; Ver: %s; Product Version: %s\n", ++ dmi_get_system_info(DMI_BIOS_VENDOR), ++ dmi_get_system_info(DMI_BIOS_VERSION), ++ dmi_get_system_info(DMI_PRODUCT_VERSION)); ++ ret = -EIO; ++ goto error; ++ } ++ + if (end >> agaw_to_width(domain->agaw)) { + WARN(1, "Your BIOS is broken; RMRR exceeds permitted address width (%d bits)\n" + "BIOS vendor: %s; Ver: %s; Product Version: %s\n", diff --git a/queue-2.6.32/intel-iommu-detect-dmar-in-hyperspace-at-probe-time.patch b/queue-2.6.32/intel-iommu-detect-dmar-in-hyperspace-at-probe-time.patch new file mode 100644 index 00000000000..eeb318611a2 --- /dev/null +++ b/queue-2.6.32/intel-iommu-detect-dmar-in-hyperspace-at-probe-time.patch @@ -0,0 +1,79 @@ +From 2c99220810c1c79322034628b993573b088ff2da Mon Sep 17 00:00:00 2001 +From: Chris Wright +Date: Wed, 2 Dec 2009 09:17:13 +0000 +Subject: intel-iommu: Detect DMAR in hyperspace at probe time. + +From: Chris Wright + +commit 2c99220810c1c79322034628b993573b088ff2da upstream. + +Many BIOSes will lie to us about the existence of an IOMMU, and claim +that there is one at an address which actually returns all 0xFF. + +We need to detect this early, so that we know we don't have a viable +IOMMU and can set up swiotlb before it's too late. + +Signed-off-by: Chris Wright +Signed-off-by: David Woodhouse +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/dmar.c | 34 +++++++++++++++++++++++++++++----- + 1 file changed, 29 insertions(+), 5 deletions(-) + +--- a/drivers/pci/dmar.c ++++ b/drivers/pci/dmar.c +@@ -601,6 +601,9 @@ int __init check_zero_address(void) + } + + if (entry_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT) { ++ void __iomem *addr; ++ u64 cap, ecap; ++ + drhd = (void *)entry_header; + if (!drhd->address) { + /* Promote an attitude of violence to a BIOS engineer today */ +@@ -609,17 +612,38 @@ int __init check_zero_address(void) + dmi_get_system_info(DMI_BIOS_VENDOR), + dmi_get_system_info(DMI_BIOS_VERSION), + dmi_get_system_info(DMI_PRODUCT_VERSION)); +-#ifdef CONFIG_DMAR +- dmar_disabled = 1; +-#endif +- return 0; ++ goto failed; ++ } ++ ++ addr = early_ioremap(drhd->address, VTD_PAGE_SIZE); ++ if (!addr ) { ++ printk("IOMMU: can't validate: %llx\n", drhd->address); ++ goto failed; ++ } ++ cap = dmar_readq(addr + DMAR_CAP_REG); ++ ecap = dmar_readq(addr + DMAR_ECAP_REG); ++ early_iounmap(addr, VTD_PAGE_SIZE); ++ if (cap == (uint64_t)-1 && ecap == (uint64_t)-1) { ++ /* Promote an attitude of violence to a BIOS engineer today */ ++ WARN(1, "Your BIOS is broken; DMAR reported at address %llx returns all ones!\n" ++ "BIOS vendor: %s; Ver: %s; Product Version: %s\n", ++ drhd->address, ++ dmi_get_system_info(DMI_BIOS_VENDOR), ++ dmi_get_system_info(DMI_BIOS_VERSION), ++ dmi_get_system_info(DMI_PRODUCT_VERSION)); ++ goto failed; + } +- break; + } + + entry_header = ((void *)entry_header + entry_header->length); + } + return 1; ++ ++failed: ++#ifdef CONFIG_DMAR ++ dmar_disabled = 1; ++#endif ++ return 0; + } + + void __init detect_intel_iommu(void) diff --git a/queue-2.6.32/intel-iommu-fix-oops-with-intel_iommu-igfx_off.patch b/queue-2.6.32/intel-iommu-fix-oops-with-intel_iommu-igfx_off.patch new file mode 100644 index 00000000000..721ee5f7e3b --- /dev/null +++ b/queue-2.6.32/intel-iommu-fix-oops-with-intel_iommu-igfx_off.patch @@ -0,0 +1,38 @@ +From 44cd613c0e4cd93079ea2a93aa06649d8ca0830a Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 2 Dec 2009 10:18:30 +0000 +Subject: intel-iommu: Fix oops with intel_iommu=igfx_off + +From: David Woodhouse + +commit 44cd613c0e4cd93079ea2a93aa06649d8ca0830a upstream. + +The hotplug notifier will call find_domain() to see if the device in +question has been assigned an IOMMU domain. However, this should never +be called for devices with a "dummy" domain, such as graphics devices +when intel_iommu=igfx_off is set and the corresponding IOMMU isn't even +initialised. If you do that, it'll oops as it dereferences the (-1) +pointer. + +The notifier function should check iommu_no_mapping() for the +device before doing anything else. + +Signed-off-by: David Woodhouse +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/intel-iommu.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/pci/intel-iommu.c ++++ b/drivers/pci/intel-iommu.c +@@ -3238,6 +3238,9 @@ static int device_notifier(struct notifi + struct pci_dev *pdev = to_pci_dev(dev); + struct dmar_domain *domain; + ++ if (iommu_no_mapping(dev)) ++ return 0; ++ + domain = find_domain(pdev); + if (!domain) + return 0; diff --git a/queue-2.6.32/intel-iommu-ignore-page-table-validation-in-pass-through-mode.patch b/queue-2.6.32/intel-iommu-ignore-page-table-validation-in-pass-through-mode.patch new file mode 100644 index 00000000000..2b115068e5c --- /dev/null +++ b/queue-2.6.32/intel-iommu-ignore-page-table-validation-in-pass-through-mode.patch @@ -0,0 +1,69 @@ +From 1672af1164d3d50ba8908014fd34cc0b58afdc1e Mon Sep 17 00:00:00 2001 +From: Chris Wright +Date: Wed, 2 Dec 2009 12:06:34 -0800 +Subject: intel-iommu: ignore page table validation in pass through mode + +From: Chris Wright + +commit 1672af1164d3d50ba8908014fd34cc0b58afdc1e upstream. + +We are seeing a bug when booting w/ iommu=pt with current upstream +(bisect blames 19943b0e30b05d42e494ae6fef78156ebc8c637e "intel-iommu: +Unify hardware and software passthrough support). + +The issue is specific to this loop during identity map initialization +of each device: + +domain_context_mapping_one(si_domain, ..., CONTEXT_TT_PASS_THROUGH) +... + /* Skip top levels of page tables for + * iommu which has less agaw than default. + */ + for (agaw = domain->agaw; agaw != iommu->agaw; agaw--) { + pgd = phys_to_virt(dma_pte_addr(pgd)); + if (!dma_pte_present(pgd)) { <------ failing here + spin_unlock_irqrestore(&iommu->lock, flags); + return -ENOMEM; + } + +This box has 2 iommu's in it. The catchall iommu has MGAW == 48, and +SAGAW == 4. The other iommu has MGAW == 39, SAGAW == 2. + +The device that's failing the above pgd test is the only device connected +to the non-catchall iommu, which has a smaller address width than the +domain default. This test is not necessary since the context is in PT +mode and the ASR is ignored. + +Thanks to Don Dutile for discovering and debugging this one. + +Signed-off-by: Chris Wright +Signed-off-by: David Woodhouse +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/intel-iommu.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/drivers/pci/intel-iommu.c ++++ b/drivers/pci/intel-iommu.c +@@ -1523,12 +1523,15 @@ static int domain_context_mapping_one(st + + /* Skip top levels of page tables for + * iommu which has less agaw than default. ++ * Unnecessary for PT mode. + */ +- for (agaw = domain->agaw; agaw != iommu->agaw; agaw--) { +- pgd = phys_to_virt(dma_pte_addr(pgd)); +- if (!dma_pte_present(pgd)) { +- spin_unlock_irqrestore(&iommu->lock, flags); +- return -ENOMEM; ++ if (translation != CONTEXT_TT_PASS_THROUGH) { ++ for (agaw = domain->agaw; agaw != iommu->agaw; agaw--) { ++ pgd = phys_to_virt(dma_pte_addr(pgd)); ++ if (!dma_pte_present(pgd)) { ++ spin_unlock_irqrestore(&iommu->lock, flags); ++ return -ENOMEM; ++ } + } + } + } diff --git a/queue-2.6.32/ipvs-zero-usvc-and-udest.patch b/queue-2.6.32/ipvs-zero-usvc-and-udest.patch new file mode 100644 index 00000000000..eba70703e17 --- /dev/null +++ b/queue-2.6.32/ipvs-zero-usvc-and-udest.patch @@ -0,0 +1,50 @@ +From 258c889362aa95d0ab534b38ce8c15d3009705b1 Mon Sep 17 00:00:00 2001 +From: Simon Horman +Date: Tue, 15 Dec 2009 17:01:25 +0100 +Subject: ipvs: zero usvc and udest + +From: Simon Horman + +commit 258c889362aa95d0ab534b38ce8c15d3009705b1 upstream. + +Make sure that any otherwise uninitialised fields of usvc are zero. + +This has been obvserved to cause a problem whereby the port of +fwmark services may end up as a non-zero value which causes +scheduling of a destination server to fail for persisitent services. + +As observed by Deon van der Merwe . +This fix suggested by Julian Anastasov . + +For good measure also zero udest. + +Cc: Deon van der Merwe +Acked-by: Julian Anastasov +Signed-off-by: Simon Horman +Signed-off-by: Patrick McHardy +Signed-off-by: Greg Kroah-Hartman + +--- + net/netfilter/ipvs/ip_vs_ctl.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/net/netfilter/ipvs/ip_vs_ctl.c ++++ b/net/netfilter/ipvs/ip_vs_ctl.c +@@ -2714,6 +2714,8 @@ static int ip_vs_genl_parse_service(stru + if (!(nla_af && (nla_fwmark || (nla_port && nla_protocol && nla_addr)))) + return -EINVAL; + ++ memset(usvc, 0, sizeof(*usvc)); ++ + usvc->af = nla_get_u16(nla_af); + #ifdef CONFIG_IP_VS_IPV6 + if (usvc->af != AF_INET && usvc->af != AF_INET6) +@@ -2901,6 +2903,8 @@ static int ip_vs_genl_parse_dest(struct + if (!(nla_addr && nla_port)) + return -EINVAL; + ++ memset(udest, 0, sizeof(*udest)); ++ + nla_memcpy(&udest->addr, nla_addr, sizeof(udest->addr)); + udest->port = nla_get_u16(nla_port); + diff --git a/queue-2.6.32/ipw2100-fix-rebooting-hang-with-driver-loaded.patch b/queue-2.6.32/ipw2100-fix-rebooting-hang-with-driver-loaded.patch new file mode 100644 index 00000000000..164f40847cd --- /dev/null +++ b/queue-2.6.32/ipw2100-fix-rebooting-hang-with-driver-loaded.patch @@ -0,0 +1,51 @@ +From 52ce3e9a7db754b78cf2cbabc87013f921b25b28 Mon Sep 17 00:00:00 2001 +From: Zhu Yi +Date: Wed, 2 Dec 2009 14:24:37 +0800 +Subject: ipw2100: fix rebooting hang with driver loaded + +From: Zhu Yi + +commit 52ce3e9a7db754b78cf2cbabc87013f921b25b28 upstream. + +Add PCI .shutdown method so that we can disable the device during +shutdown or reboot. Without this, the reboot doesn't work well on +some platforms. + +This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2124 + +Tested-by: pablo +Signed-off-by: Zhu Yi +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ipw2x00/ipw2100.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/net/wireless/ipw2x00/ipw2100.c ++++ b/drivers/net/wireless/ipw2x00/ipw2100.c +@@ -6487,6 +6487,16 @@ static int ipw2100_resume(struct pci_dev + } + #endif + ++static void ipw2100_shutdown(struct pci_dev *pci_dev) ++{ ++ struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); ++ ++ /* Take down the device; powers it off, etc. */ ++ ipw2100_down(priv); ++ ++ pci_disable_device(pci_dev); ++} ++ + #define IPW2100_DEV_ID(x) { PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, x } + + static struct pci_device_id ipw2100_pci_id_table[] __devinitdata = { +@@ -6550,6 +6560,7 @@ static struct pci_driver ipw2100_pci_dri + .suspend = ipw2100_suspend, + .resume = ipw2100_resume, + #endif ++ .shutdown = ipw2100_shutdown, + }; + + /** diff --git a/queue-2.6.32/jffs2-fix-long-standing-bug-with-symlink-garbage-collection.patch b/queue-2.6.32/jffs2-fix-long-standing-bug-with-symlink-garbage-collection.patch new file mode 100644 index 00000000000..2fc227574d3 --- /dev/null +++ b/queue-2.6.32/jffs2-fix-long-standing-bug-with-symlink-garbage-collection.patch @@ -0,0 +1,33 @@ +From 2e16cfca6e17ae37ae21feca080a6f2eca9087dc Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 16 Dec 2009 03:27:20 +0000 +Subject: jffs2: Fix long-standing bug with symlink garbage collection. + +From: David Woodhouse + +commit 2e16cfca6e17ae37ae21feca080a6f2eca9087dc upstream. + +Ever since jffs2_garbage_collect_metadata() was first half-written in +February 2001, it's been broken on architectures where 'char' is signed. +When garbage collecting a symlink with target length above 127, the payload +length would end up negative, causing interesting and bad things to happen. + +Signed-off-by: David Woodhouse +Signed-off-by: Greg Kroah-Hartman + +--- + fs/jffs2/gc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/fs/jffs2/gc.c ++++ b/fs/jffs2/gc.c +@@ -700,7 +700,8 @@ static int jffs2_garbage_collect_metadat + struct jffs2_raw_inode ri; + struct jffs2_node_frag *last_frag; + union jffs2_device_node dev; +- char *mdata = NULL, mdatalen = 0; ++ char *mdata = NULL; ++ int mdatalen = 0; + uint32_t alloclen, ilen; + int ret; + diff --git a/queue-2.6.32/mac80211-fix-dynamic-power-save-for-scanning.patch b/queue-2.6.32/mac80211-fix-dynamic-power-save-for-scanning.patch new file mode 100644 index 00000000000..1859fde061d --- /dev/null +++ b/queue-2.6.32/mac80211-fix-dynamic-power-save-for-scanning.patch @@ -0,0 +1,96 @@ +From lrodriguez@atheros.com Wed Dec 16 14:41:44 2009 +From: Vivek Natarajan +Date: Wed, 16 Dec 2009 11:51:45 -0500 +Subject: mac80211: Fix dynamic power save for scanning. +To: greg@kroah.com, stable@kernel.org +Cc: linux-wireless@vger.kernel.org, Vivek Natarajan , "John W. Linville" +Message-ID: <1260982305-32244-6-git-send-email-lrodriguez@atheros.com> + + +From: Vivek Natarajan + +Upstream commit: 7c3f4bbedc241ddcd3abe1f419c356e625231da1 + +Not only ps_sdata but also IEEE80211_CONF_PS is to be considered +before restoring PS in scan_ps_disable(). For instance, when ps_sdata +is set but CONF_PS is not set just because the dynamic timer is still +running, a sw scan leads to setting of CONF_PS in scan_ps_disable +instead of restarting the dynamic PS timer. +Also for the above case, a null data frame is to be sent after +returning to operating channel which was not happening with the +current implementation. This patch fixes this too. + + +Signed-off-by: Vivek Natarajan +Reviewed-by: Kalle Valo +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman +--- + net/mac80211/ieee80211_i.h | 1 + + net/mac80211/scan.c | 20 ++++++++++++++++---- + 2 files changed, 17 insertions(+), 4 deletions(-) + +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -808,6 +808,7 @@ struct ieee80211_local { + unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */ + + bool pspolling; ++ bool scan_ps_enabled; + /* + * PS can only be enabled when we have exactly one managed + * interface (and monitors) in PS, this then points there. +--- a/net/mac80211/scan.c ++++ b/net/mac80211/scan.c +@@ -196,7 +196,8 @@ ieee80211_scan_rx(struct ieee80211_sub_i + static void ieee80211_scan_ps_enable(struct ieee80211_sub_if_data *sdata) + { + struct ieee80211_local *local = sdata->local; +- bool ps = false; ++ ++ local->scan_ps_enabled = false; + + /* FIXME: what to do when local->pspolling is true? */ + +@@ -204,12 +205,13 @@ static void ieee80211_scan_ps_enable(str + cancel_work_sync(&local->dynamic_ps_enable_work); + + if (local->hw.conf.flags & IEEE80211_CONF_PS) { +- ps = true; ++ local->scan_ps_enabled = true; + local->hw.conf.flags &= ~IEEE80211_CONF_PS; + ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); + } + +- if (!ps || !(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) ++ if (!(local->scan_ps_enabled) || ++ !(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) + /* + * If power save was enabled, no need to send a nullfunc + * frame because AP knows that we are sleeping. But if the +@@ -230,7 +232,7 @@ static void ieee80211_scan_ps_disable(st + + if (!local->ps_sdata) + ieee80211_send_nullfunc(local, sdata, 0); +- else { ++ else if (local->scan_ps_enabled) { + /* + * In !IEEE80211_HW_PS_NULLFUNC_STACK case the hardware + * will send a nullfunc frame with the powersave bit set +@@ -246,6 +248,16 @@ static void ieee80211_scan_ps_disable(st + */ + local->hw.conf.flags |= IEEE80211_CONF_PS; + ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); ++ } else if (local->hw.conf.dynamic_ps_timeout > 0) { ++ /* ++ * If IEEE80211_CONF_PS was not set and the dynamic_ps_timer ++ * had been running before leaving the operating channel, ++ * restart the timer now and send a nullfunc frame to inform ++ * the AP that we are awake. ++ */ ++ ieee80211_send_nullfunc(local, sdata, 0); ++ mod_timer(&local->dynamic_ps_timer, jiffies + ++ msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); + } + } + diff --git a/queue-2.6.32/matroxfb-fix-problems-with-display-stability.patch b/queue-2.6.32/matroxfb-fix-problems-with-display-stability.patch new file mode 100644 index 00000000000..91ab81f709e --- /dev/null +++ b/queue-2.6.32/matroxfb-fix-problems-with-display-stability.patch @@ -0,0 +1,45 @@ +From 8c651311a3a08c1e4815de6933e00a760e498dae Mon Sep 17 00:00:00 2001 +From: Alan Cox +Date: Tue, 15 Dec 2009 16:46:40 -0800 +Subject: matroxfb: fix problems with display stability + +From: Alan Cox + +commit 8c651311a3a08c1e4815de6933e00a760e498dae upstream. + +Regression caused in 2.6.23 and then despite repeated requests never fixed +or dealt with (Petr promised to sort it in 2008 but seems to have +forgotten). + +Enough is enough - remove the problem line that was added. If it upsets +someone they've had two years to deal with it and at the very least it'll +rattle their cage and wake them up. + +Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9709 + +Signed-off-by: Alan Cox +Reported-by: Damon +Tested-by: Ruud van Melick +Cc: Petr Vandrovec +Cc: Pekka Enberg +Cc: Paul A. Clarke +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/video/matrox/g450_pll.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/video/matrox/g450_pll.c ++++ b/drivers/video/matrox/g450_pll.c +@@ -368,7 +368,8 @@ static int __g450_setclk(struct matrox_f + M1064_XDVICLKCTRL_C1DVICLKEN | + M1064_XDVICLKCTRL_DVILOOPCTL | + M1064_XDVICLKCTRL_P1LOOPBWDTCTL; +- matroxfb_DAC_out(minfo, M1064_XDVICLKCTRL, tmp); ++ /* Setting this breaks PC systems so don't do it */ ++ /* matroxfb_DAC_out(minfo, M1064_XDVICLKCTRL, tmp); */ + matroxfb_DAC_out(minfo, M1064_XPWRCTRL, + xpwrctrl); + diff --git a/queue-2.6.32/memcg-fix-memory.memsw.usage_in_bytes-for-root-cgroup.patch b/queue-2.6.32/memcg-fix-memory.memsw.usage_in_bytes-for-root-cgroup.patch new file mode 100644 index 00000000000..bcf847a9297 --- /dev/null +++ b/queue-2.6.32/memcg-fix-memory.memsw.usage_in_bytes-for-root-cgroup.patch @@ -0,0 +1,37 @@ +From cd9b45b78a61e8df250e69385c74e729e5b66abf Mon Sep 17 00:00:00 2001 +From: Kirill A. Shutemov +Date: Tue, 15 Dec 2009 16:47:01 -0800 +Subject: memcg: fix memory.memsw.usage_in_bytes for root cgroup + +From: Kirill A. Shutemov + +commit cd9b45b78a61e8df250e69385c74e729e5b66abf upstream. + +A memory cgroup has a memory.memsw.usage_in_bytes file. It shows the sum +of the usage of pages and swapents in the cgroup. Presently the root +cgroup's memsw.usage_in_bytes shows the wrong value - the number of +swapents are not added. + +So take MEM_CGROUP_STAT_SWAPOUT into account. + +Signed-off-by: Kirill A. Shutemov +Reviewed-by: Daisuke Nishimura +Acked-by: KAMEZAWA Hiroyuki +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memcontrol.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/mm/memcontrol.c ++++ b/mm/memcontrol.c +@@ -2541,6 +2541,7 @@ static u64 mem_cgroup_read(struct cgroup + val += idx_val; + mem_cgroup_get_recursive_idx_stat(mem, + MEM_CGROUP_STAT_SWAPOUT, &idx_val); ++ val += idx_val; + val <<= PAGE_SHIFT; + } else + val = res_counter_read_u64(&mem->memsw, name); diff --git a/queue-2.6.32/mm-sigbus-instead-of-abusing-oom.patch b/queue-2.6.32/mm-sigbus-instead-of-abusing-oom.patch new file mode 100644 index 00000000000..9f1af7582fe --- /dev/null +++ b/queue-2.6.32/mm-sigbus-instead-of-abusing-oom.patch @@ -0,0 +1,64 @@ +From d99be1a8ecf377c2c9b3372d36411ad6547bbd4c Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Mon, 14 Dec 2009 17:59:04 -0800 +Subject: mm: sigbus instead of abusing oom + +From: Hugh Dickins + +commit d99be1a8ecf377c2c9b3372d36411ad6547bbd4c upstream. + +When do_nonlinear_fault() realizes that the page table must have been +corrupted for it to have been called, it does print_bad_pte() and returns +... VM_FAULT_OOM, which is hard to understand. + +It made some sense when I did it for 2.6.15, when do_page_fault() just +killed the current process; but nowadays it lets the OOM killer decide who +to kill - so page table corruption in one process would be liable to kill +another. + +Change it to return VM_FAULT_SIGBUS instead: that doesn't guarantee that +the process will be killed, but is good enough for such a rare +abnormality, accompanied as it is by the "BUG: Bad page map" message. + +And recent HWPOISON work has copied that code into do_swap_page(), when it +finds an impossible swap entry: fix that to VM_FAULT_SIGBUS too. + +Signed-off-by: Hugh Dickins +Cc: Izik Eidus +Cc: Andrea Arcangeli +Cc: Nick Piggin +Reviewed-by: KOSAKI Motohiro +Cc: Rik van Riel +Cc: Lee Schermerhorn +Cc: Andi Kleen +Reviewed-by: KAMEZAWA Hiroyuki +Reviewed-by: Wu Fengguang +Reviewed-by: Minchan Kim +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memory.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/mm/memory.c ++++ b/mm/memory.c +@@ -2514,7 +2514,7 @@ static int do_swap_page(struct mm_struct + ret = VM_FAULT_HWPOISON; + } else { + print_bad_pte(vma, address, orig_pte, NULL); +- ret = VM_FAULT_OOM; ++ ret = VM_FAULT_SIGBUS; + } + goto out; + } +@@ -2910,7 +2910,7 @@ static int do_nonlinear_fault(struct mm_ + * Page table corrupted: show pte and kill process. + */ + print_bad_pte(vma, address, orig_pte, NULL); +- return VM_FAULT_OOM; ++ return VM_FAULT_SIGBUS; + } + + pgoff = pte_to_pgoff(orig_pte); diff --git a/queue-2.6.32/net-fix-userspace-rtm_newlink-notifications.patch b/queue-2.6.32/net-fix-userspace-rtm_newlink-notifications.patch new file mode 100644 index 00000000000..29243db00b1 --- /dev/null +++ b/queue-2.6.32/net-fix-userspace-rtm_newlink-notifications.patch @@ -0,0 +1,71 @@ +From ebiederm@xmission.com Wed Dec 16 15:17:26 2009 +From: ebiederm@xmission.com (Eric W. Biederman) +Date: Sun, 13 Dec 2009 22:39:28 -0800 +Subject: net: Fix userspace RTM_NEWLINK notifications. +To: David Miller +Cc: netdev@vger.kernel.org, marcel@holtmann.org, stable@kernel.org +Message-ID: + +commit d90a909e1f3e006a1d57fe11fd417173b6494701 upstream. + +I received some bug reports about userspace programs having problems +because after RTM_NEWLINK was received they could not immeidate +access files under /proc/sys/net/ because they had not been +registered yet. + +The problem was trivailly fixed by moving the userspace +notification from rtnetlink_event to the end of register_netdevice. + +Signed-off-by: Eric W. Biederman +Cc: David Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/core/dev.c | 11 +++++++++++ + net/core/rtnetlink.c | 4 +--- + 2 files changed, 12 insertions(+), 3 deletions(-) + +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -4860,6 +4860,11 @@ int register_netdevice(struct net_device + rollback_registered(dev); + dev->reg_state = NETREG_UNREGISTERED; + } ++ /* ++ * Prevent userspace races by waiting until the network ++ * device is fully setup before sending notifications. ++ */ ++ rtmsg_ifinfo(RTM_NEWLINK, dev, ~0U); + + out: + return ret; +@@ -5398,6 +5403,12 @@ int dev_change_net_namespace(struct net_ + /* Notify protocols, that a new device appeared. */ + call_netdevice_notifiers(NETDEV_REGISTER, dev); + ++ /* ++ * Prevent userspace races by waiting until the network ++ * device is fully setup before sending notifications. ++ */ ++ rtmsg_ifinfo(RTM_NEWLINK, dev, ~0U); ++ + synchronize_net(); + err = 0; + out: +--- a/net/core/rtnetlink.c ++++ b/net/core/rtnetlink.c +@@ -1334,13 +1334,11 @@ static int rtnetlink_event(struct notifi + case NETDEV_UNREGISTER: + rtmsg_ifinfo(RTM_DELLINK, dev, ~0U); + break; +- case NETDEV_REGISTER: +- rtmsg_ifinfo(RTM_NEWLINK, dev, ~0U); +- break; + case NETDEV_UP: + case NETDEV_DOWN: + rtmsg_ifinfo(RTM_NEWLINK, dev, IFF_UP|IFF_RUNNING); + break; ++ case NETDEV_REGISTER: + case NETDEV_CHANGE: + case NETDEV_GOING_DOWN: + break; diff --git a/queue-2.6.32/netfilter-xtables-document-minimal-required-version.patch b/queue-2.6.32/netfilter-xtables-document-minimal-required-version.patch new file mode 100644 index 00000000000..c19fbba57de --- /dev/null +++ b/queue-2.6.32/netfilter-xtables-document-minimal-required-version.patch @@ -0,0 +1,30 @@ +From 7a92263705435d046d37a0990d0edfcb517f7ad3 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Mon, 14 Dec 2009 14:52:10 +0100 +Subject: netfilter: xtables: document minimal required version + +From: Jan Engelhardt + +commit 7a92263705435d046d37a0990d0edfcb517f7ad3 upstream. + +For both .33 and .32-stable. + +Signed-off-by: Jan Engelhardt +Signed-off-by: Patrick McHardy +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/Changes | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/Documentation/Changes ++++ b/Documentation/Changes +@@ -49,6 +49,8 @@ o oprofile 0.9 + o udev 081 # udevinfo -V + o grub 0.93 # grub --version + o mcelog 0.6 ++o iptables 1.4.1 # iptables -V ++ + + Kernel compilation + ================== diff --git a/queue-2.6.32/perf_event-fix-incorrect-range-check-on-cpu-number.patch b/queue-2.6.32/perf_event-fix-incorrect-range-check-on-cpu-number.patch new file mode 100644 index 00000000000..dca2aeb9308 --- /dev/null +++ b/queue-2.6.32/perf_event-fix-incorrect-range-check-on-cpu-number.patch @@ -0,0 +1,46 @@ +From 0f624e7e5625f4c30c836b7a5decfe2553582391 Mon Sep 17 00:00:00 2001 +From: Paul Mackerras +Date: Tue, 15 Dec 2009 19:40:32 +1100 +Subject: perf_event: Fix incorrect range check on cpu number + +From: Paul Mackerras + +commit 0f624e7e5625f4c30c836b7a5decfe2553582391 upstream. + +It is quite legitimate for CPUs to be numbered sparsely, meaning +that it possible for an online CPU to have a number which is +greater than the total count of possible CPUs. + +Currently find_get_context() has a sanity check on the cpu +number where it checks it against num_possible_cpus(). This +test can fail for a legitimate cpu number if the +cpu_possible_mask is sparsely populated. + +This fixes the problem by checking the CPU number against +nr_cpumask_bits instead, since that is the appropriate check to +ensure that the cpu number is same to pass to cpu_isset() +subsequently. + +Reported-by: Michael Neuling +Signed-off-by: Paul Mackerras +Tested-by: Michael Neuling +Acked-by: Peter Zijlstra +LKML-Reference: <20091215084032.GA18661@brick.ozlabs.ibm.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/perf_event.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/perf_event.c ++++ b/kernel/perf_event.c +@@ -1583,7 +1583,7 @@ static struct perf_event_context *find_g + if (perf_paranoid_cpu() && !capable(CAP_SYS_ADMIN)) + return ERR_PTR(-EACCES); + +- if (cpu < 0 || cpu > num_possible_cpus()) ++ if (cpu < 0 || cpu >= nr_cpumask_bits) + return ERR_PTR(-EINVAL); + + /* diff --git a/queue-2.6.32/series b/queue-2.6.32/series index f04f5b9fd7b..bc78a3e33c4 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -112,3 +112,39 @@ sparc64-don-t-specify-irqf_shared-for-ldc-interrupts.patch sparc64-fix-overly-strict-range-type-matching-for-pci-devices.patch sparc64-fix-stack-debugging-irq-stack-regression.patch sparc-set-uts_machine-correctly.patch +b43legacy-avoid-ppc-fault-during-resume.patch +tracing-fix-event-format-export.patch +ath9k-fix-tx-hang-poll-routine.patch +ath9k-fix-processing-of-tx-ps-null-data-frames.patch +ath9k-fix-maximum-tx-fifo-settings-for-single-stream-devices.patch +ath9k-fix-tx-status-reporting.patch +mac80211-fix-dynamic-power-save-for-scanning.patch +drm-i915-fix-sync-to-vblank-when-vga-output-is-turned-off.patch +memcg-fix-memory.memsw.usage_in_bytes-for-root-cgroup.patch +thinkpad-acpi-fix-default-brightness_mode-for-r50e-r51.patch +thinkpad-acpi-preserve-rfkill-state-across-suspend-resume.patch +sysctl_max_map_count-should-be-non-negative.patch +ipw2100-fix-rebooting-hang-with-driver-loaded.patch +matroxfb-fix-problems-with-display-stability.patch +acerhdf-add-new-bios-versions.patch +asus-laptop-change-light-sens-default-values.patch +vmalloc-conditionalize-build-of-pcpu_get_vm_areas.patch +acpi-use-the-arb_disable-for-the-cpu-which-model-id-is-less-than-0x0f.patch +net-fix-userspace-rtm_newlink-notifications.patch +ext3-fix-data-filesystem-corruption-when-write-fails-to-copy-data.patch +v4l-dvb-13116-gspca-ov519-webcam-041e-4067-added.patch +bcm63xx_enet-fix-compilation-failure-after-get_stats_count-removal.patch +x86-under-bios-control-restore-ap-s-apic_lvtthmr-to-the-bsp-value.patch +drm-i915-avoid-null-dereference-with-component_only-tv_modes.patch +drm-i915-pineview-only-has-lvds-and-crt-ports.patch +drm-i915-fix-lvds-stability-issue-on-ironlake.patch +mm-sigbus-instead-of-abusing-oom.patch +ipvs-zero-usvc-and-udest.patch +jffs2-fix-long-standing-bug-with-symlink-garbage-collection.patch +intel-iommu-detect-dmar-in-hyperspace-at-probe-time.patch +intel-iommu-apply-bios-sanity-checks-for-interrupt-remapping-too.patch +intel-iommu-check-for-an-rmrr-which-ends-before-it-starts.patch +intel-iommu-fix-oops-with-intel_iommu-igfx_off.patch +intel-iommu-ignore-page-table-validation-in-pass-through-mode.patch +netfilter-xtables-document-minimal-required-version.patch +perf_event-fix-incorrect-range-check-on-cpu-number.patch diff --git a/queue-2.6.32/sysctl_max_map_count-should-be-non-negative.patch b/queue-2.6.32/sysctl_max_map_count-should-be-non-negative.patch new file mode 100644 index 00000000000..b51518642e0 --- /dev/null +++ b/queue-2.6.32/sysctl_max_map_count-should-be-non-negative.patch @@ -0,0 +1,50 @@ +From 70da2340fbc68e91e701762f785479ab495a0869 Mon Sep 17 00:00:00 2001 +From: Amerigo Wang +Date: Mon, 14 Dec 2009 17:59:52 -0800 +Subject: 'sysctl_max_map_count' should be non-negative + +From: Amerigo Wang + +commit 70da2340fbc68e91e701762f785479ab495a0869 upstream. + +Jan Engelhardt reported we have this problem: + +setting max_map_count to a value large enough results in programs dying at +first try. This is on 2.6.31.6: + +15:59 borg:/proc/sys/vm # echo $[1<<31-1] >max_map_count +15:59 borg:/proc/sys/vm # cat max_map_count +1073741824 +15:59 borg:/proc/sys/vm # echo $[1<<31] >max_map_count +15:59 borg:/proc/sys/vm # cat max_map_count +Killed + +This is because we have a chance to make 'max_map_count' negative. but +it's meaningless. Make it only accept non-negative values. + +Reported-by: Jan Engelhardt +Signed-off-by: WANG Cong +Cc: Ingo Molnar +Cc: Peter Zijlstra +Cc: James Morris +Cc: Alexey Dobriyan +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sysctl.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/sysctl.c ++++ b/kernel/sysctl.c +@@ -1605,7 +1605,8 @@ static struct ctl_table debug_table[] = + .data = &show_unhandled_signals, + .maxlen = sizeof(int), + .mode = 0644, +- .proc_handler = proc_dointvec ++ .proc_handler = proc_dointvec, ++ .extra1 = &zero, + }, + #endif + { .ctl_name = 0 } diff --git a/queue-2.6.32/thinkpad-acpi-fix-default-brightness_mode-for-r50e-r51.patch b/queue-2.6.32/thinkpad-acpi-fix-default-brightness_mode-for-r50e-r51.patch new file mode 100644 index 00000000000..bfe20cd7b89 --- /dev/null +++ b/queue-2.6.32/thinkpad-acpi-fix-default-brightness_mode-for-r50e-r51.patch @@ -0,0 +1,50 @@ +From a9f8eacca4e9e8693de9b896c1fa7aadaa9402e8 Mon Sep 17 00:00:00 2001 +From: Henrique de Moraes Holschuh +Date: Wed, 9 Dec 2009 01:36:21 +0000 +Subject: thinkpad-acpi: fix default brightness_mode for R50e/R51 + +From: Henrique de Moraes Holschuh + +commit a9f8eacca4e9e8693de9b896c1fa7aadaa9402e8 upstream. + +According to a report, the R50e wants EC-based brightness control, +even if it uses an Intel GPU. The current driver default was reported +to not work at all. + +This bug can be worked around by the "brightness_mode=3" module +parameter. + +Change the default of the R50e and R51 2xxx models (which use the same +EC firmware, 1V) to TPACPI_BRGHT_Q_EC, but keep TPACPI_BRGHT_Q_ASK set +for now, as I'd like to get more reports. + +This fixes a regression caused by commit +59fe4fe34d7afdf63208124f313be9056feaa2f4, +"thinkpad-acpi: fix incorrect use of TPACPI_BRGHT_MODE_ECNVRAM" + +Kernel 2.6.31 also needs this fix. + +Reported-by: Ferenc Wagner +Tested-by: Ferenc Wagner +Signed-off-by: Henrique de Moraes Holschuh +Cc: stable@kernel.org +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/thinkpad_acpi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/platform/x86/thinkpad_acpi.c ++++ b/drivers/platform/x86/thinkpad_acpi.c +@@ -6123,8 +6123,8 @@ static const struct tpacpi_quirk brightn + + /* Models with Intel Extreme Graphics 2 */ + TPACPI_Q_IBM('1', 'U', TPACPI_BRGHT_Q_NOEC), +- TPACPI_Q_IBM('1', 'V', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_NOEC), +- TPACPI_Q_IBM('1', 'W', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_NOEC), ++ TPACPI_Q_IBM('1', 'V', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC), ++ TPACPI_Q_IBM('1', 'W', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC), + + /* Models with Intel GMA900 */ + TPACPI_Q_IBM('7', '0', TPACPI_BRGHT_Q_NOEC), /* T43, R52 */ diff --git a/queue-2.6.32/thinkpad-acpi-preserve-rfkill-state-across-suspend-resume.patch b/queue-2.6.32/thinkpad-acpi-preserve-rfkill-state-across-suspend-resume.patch new file mode 100644 index 00000000000..a0f1736cf2a --- /dev/null +++ b/queue-2.6.32/thinkpad-acpi-preserve-rfkill-state-across-suspend-resume.patch @@ -0,0 +1,114 @@ +From 208b996b6c460285650d39b2330f8ef82c007d10 Mon Sep 17 00:00:00 2001 +From: Henrique de Moraes Holschuh +Date: Wed, 9 Dec 2009 01:36:22 +0000 +Subject: thinkpad-acpi: preserve rfkill state across suspend/resume + +From: Henrique de Moraes Holschuh + +commit 208b996b6c460285650d39b2330f8ef82c007d10 upstream. + +Since the rfkill rework in 2.6.31, the driver is always resuming with +the radios disabled. + +Change thinkpad-acpi to ask the firmware to resume with the radios in +the last state. This fixes the Bluetooth and WWAN rfkill switches. + +Note that it means we respect the firmware's oddities. Should the +user toggle the hardware rfkill switch on and off, it might cause the +radios to resume enabled. + +UWB is an unknown quantity since it has nowhere the same level of +firmware support (no control over state storage in NVRAM, for +example), and might need further fixing. Testers welcome. + +This change fixes a regression from 2.6.30. + +Reported-by: Jerone Young +Reported-by: Ian Molton +Signed-off-by: Henrique de Moraes Holschuh +Tested-by: Ian Molton +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/thinkpad_acpi.c | 32 +++++--------------------------- + 1 file changed, 5 insertions(+), 27 deletions(-) + +--- a/drivers/platform/x86/thinkpad_acpi.c ++++ b/drivers/platform/x86/thinkpad_acpi.c +@@ -3866,15 +3866,6 @@ enum { + + #define TPACPI_RFK_BLUETOOTH_SW_NAME "tpacpi_bluetooth_sw" + +-static void bluetooth_suspend(pm_message_t state) +-{ +- /* Try to make sure radio will resume powered off */ +- if (!acpi_evalf(NULL, NULL, "\\BLTH", "vd", +- TP_ACPI_BLTH_PWR_OFF_ON_RESUME)) +- vdbg_printk(TPACPI_DBG_RFKILL, +- "bluetooth power down on resume request failed\n"); +-} +- + static int bluetooth_get_status(void) + { + int status; +@@ -3908,10 +3899,9 @@ static int bluetooth_set_status(enum tpa + #endif + + /* We make sure to keep TP_ACPI_BLUETOOTH_RESUMECTRL off */ ++ status = TP_ACPI_BLUETOOTH_RESUMECTRL; + if (state == TPACPI_RFK_RADIO_ON) +- status = TP_ACPI_BLUETOOTH_RADIOSSW; +- else +- status = 0; ++ status |= TP_ACPI_BLUETOOTH_RADIOSSW; + + if (!acpi_evalf(hkey_handle, NULL, "SBDC", "vd", status)) + return -EIO; +@@ -4050,7 +4040,6 @@ static struct ibm_struct bluetooth_drive + .read = bluetooth_read, + .write = bluetooth_write, + .exit = bluetooth_exit, +- .suspend = bluetooth_suspend, + .shutdown = bluetooth_shutdown, + }; + +@@ -4068,15 +4057,6 @@ enum { + + #define TPACPI_RFK_WWAN_SW_NAME "tpacpi_wwan_sw" + +-static void wan_suspend(pm_message_t state) +-{ +- /* Try to make sure radio will resume powered off */ +- if (!acpi_evalf(NULL, NULL, "\\WGSV", "qvd", +- TP_ACPI_WGSV_PWR_OFF_ON_RESUME)) +- vdbg_printk(TPACPI_DBG_RFKILL, +- "WWAN power down on resume request failed\n"); +-} +- + static int wan_get_status(void) + { + int status; +@@ -4109,11 +4089,10 @@ static int wan_set_status(enum tpacpi_rf + } + #endif + +- /* We make sure to keep TP_ACPI_WANCARD_RESUMECTRL off */ ++ /* We make sure to set TP_ACPI_WANCARD_RESUMECTRL */ ++ status = TP_ACPI_WANCARD_RESUMECTRL; + if (state == TPACPI_RFK_RADIO_ON) +- status = TP_ACPI_WANCARD_RADIOSSW; +- else +- status = 0; ++ status |= TP_ACPI_WANCARD_RADIOSSW; + + if (!acpi_evalf(hkey_handle, NULL, "SWAN", "vd", status)) + return -EIO; +@@ -4251,7 +4230,6 @@ static struct ibm_struct wan_driver_data + .read = wan_read, + .write = wan_write, + .exit = wan_exit, +- .suspend = wan_suspend, + .shutdown = wan_shutdown, + }; + diff --git a/queue-2.6.32/tracing-fix-event-format-export.patch b/queue-2.6.32/tracing-fix-event-format-export.patch new file mode 100644 index 00000000000..e397840436c --- /dev/null +++ b/queue-2.6.32/tracing-fix-event-format-export.patch @@ -0,0 +1,56 @@ +From 811cb50baf63461ce0bdb234927046131fc7fa8b Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Fri, 13 Nov 2009 23:40:09 +0100 +Subject: tracing: Fix event format export + +From: Johannes Berg + +commit 811cb50baf63461ce0bdb234927046131fc7fa8b upstream. + +For some reason the export of the event print format to userspace +uses '#fmt' which breaks if the format string is anything but a plain +string, for example if it is built with macros then the macro names +are exported instead of their contents. + +Use + "\"%s\"", fmt +instead of + "%s", #fmt +to export the string and not the way it is built. + +For example, in net/mac80211/driver-trace.h for the trace event drv_start +there is: + + TP_printk( + LOCAL_PR_FMT, LOCAL_PR_ARG + ) + +Which use to produce: + + print fmt: LOCAL_PR_FMT, REC->wiphy_name + +Now produces: + + print fmt: "%s", REC->wiphy_name + +Signed-off-by: Johannes Berg +LKML-Reference: <20091113224009.GB23942@elte.hu> +Signed-off-by: Steven Rostedt +Cc: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + include/trace/ftrace.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/trace/ftrace.h ++++ b/include/trace/ftrace.h +@@ -159,7 +159,7 @@ + #undef __get_str + + #undef TP_printk +-#define TP_printk(fmt, args...) "%s, %s\n", #fmt, __stringify(args) ++#define TP_printk(fmt, args...) "\"%s\", %s\n", fmt, __stringify(args) + + #undef TP_fast_assign + #define TP_fast_assign(args...) args diff --git a/queue-2.6.32/v4l-dvb-13116-gspca-ov519-webcam-041e-4067-added.patch b/queue-2.6.32/v4l-dvb-13116-gspca-ov519-webcam-041e-4067-added.patch new file mode 100644 index 00000000000..7c77bc421e6 --- /dev/null +++ b/queue-2.6.32/v4l-dvb-13116-gspca-ov519-webcam-041e-4067-added.patch @@ -0,0 +1,37 @@ +From 518c8df77c21b7d1690dd8b96eb0e54c4ec1c9c1 Mon Sep 17 00:00:00 2001 +From: Rafal Milecki +Date: Fri, 2 Oct 2009 03:54:44 -0300 +Subject: V4L/DVB (13116): gspca - ov519: Webcam 041e:4067 added. + +From: Rafal Milecki + +commit 518c8df77c21b7d1690dd8b96eb0e54c4ec1c9c1 upstream. + +Signed-off-by: Rafal Milecki +Signed-off-by: Jean-Francois Moine +Signed-off-by: Mauro Carvalho Chehab +Cc: Surbhi Palande +Signed-off-by: Greg Kroah-Hartman + +--- a/Documentation/video4linux/gspca.txt ++++ b/Documentation/video4linux/gspca.txt +@@ -37,6 +37,7 @@ ov519 041e:405f Creative Live! VISTA VF0330 + ov519 041e:4060 Creative Live! VISTA VF0350 + ov519 041e:4061 Creative Live! VISTA VF0400 + ov519 041e:4064 Creative Live! VISTA VF0420 ++ov519 041e:4067 Creative Live! Cam Video IM (VF0350) + ov519 041e:4068 Creative Live! VISTA VF0470 + spca561 0458:7004 Genius VideoCAM Express V2 + sunplus 0458:7006 Genius Dsc 1.3 Smart +diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c +index a5c190e..e165578 100644 +--- a/drivers/media/video/gspca/ov519.c ++++ b/drivers/media/video/gspca/ov519.c +@@ -3364,6 +3364,7 @@ static const __devinitdata struct usb_device_id device_table[] = { + {USB_DEVICE(0x041e, 0x4061), .driver_info = BRIDGE_OV519 }, + {USB_DEVICE(0x041e, 0x4064), + .driver_info = BRIDGE_OV519 | BRIDGE_INVERT_LED }, ++ {USB_DEVICE(0x041e, 0x4067), .driver_info = BRIDGE_OV519 }, + {USB_DEVICE(0x041e, 0x4068), + .driver_info = BRIDGE_OV519 | BRIDGE_INVERT_LED }, + {USB_DEVICE(0x045e, 0x028c), .driver_info = BRIDGE_OV519 }, diff --git a/queue-2.6.32/vmalloc-conditionalize-build-of-pcpu_get_vm_areas.patch b/queue-2.6.32/vmalloc-conditionalize-build-of-pcpu_get_vm_areas.patch new file mode 100644 index 00000000000..30e7ff75bd2 --- /dev/null +++ b/queue-2.6.32/vmalloc-conditionalize-build-of-pcpu_get_vm_areas.patch @@ -0,0 +1,65 @@ +From teheo@novell.com Wed Dec 16 15:12:12 2009 +From: Tejun Heo +Date: Thu, 10 Dec 2009 08:43:16 +0900 +Subject: vmalloc: conditionalize build of pcpu_get_vm_areas() +To: stable@kernel.org +Cc: tony.luck@intel.com, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Beulich , linux-mm@kvack.org, Geert Uytterhoeven , Andrew Morton +Message-ID: <4B203614.1010907@novell.com> + +From: Tejun Heo + +No matching upstream commit as it was resolved differently there. + + +pcpu_get_vm_areas() is used only when dynamic percpu allocator is used +by the architecture. In 2.6.32, ia64 doesn't use dynamic percpu +allocator and has a macro which makes pcpu_get_vm_areas() buggy via +local/global variable aliasing and triggers compile warning. + +The problem is fixed in upstream and ia64 uses dynamic percpu +allocators, so the only left issue is inclusion of unnecessary code +and compile warning on ia64 on 2.6.32. + +Don't build pcpu_get_vm_areas() if legacy percpu allocator is in use. + +Signed-off-by: Tejun Heo +Reported-by: Jan Beulich +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/vmalloc.h | 2 ++ + mm/vmalloc.c | 2 ++ + 2 files changed, 4 insertions(+) + +--- a/include/linux/vmalloc.h ++++ b/include/linux/vmalloc.h +@@ -115,9 +115,11 @@ extern rwlock_t vmlist_lock; + extern struct vm_struct *vmlist; + extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); + ++#ifndef CONFIG_HAVE_LEGACY_PER_CPU_AREA + struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, + const size_t *sizes, int nr_vms, + size_t align, gfp_t gfp_mask); ++#endif + + void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); + +--- a/mm/vmalloc.c ++++ b/mm/vmalloc.c +@@ -1993,6 +1993,7 @@ void free_vm_area(struct vm_struct *area + } + EXPORT_SYMBOL_GPL(free_vm_area); + ++#ifndef CONFIG_HAVE_LEGACY_PER_CPU_AREA + static struct vmap_area *node_to_va(struct rb_node *n) + { + return n ? rb_entry(n, struct vmap_area, rb_node) : NULL; +@@ -2257,6 +2258,7 @@ err_free: + kfree(vms); + return NULL; + } ++#endif + + /** + * pcpu_free_vm_areas - free vmalloc areas for percpu allocator diff --git a/queue-2.6.32/x86-under-bios-control-restore-ap-s-apic_lvtthmr-to-the-bsp-value.patch b/queue-2.6.32/x86-under-bios-control-restore-ap-s-apic_lvtthmr-to-the-bsp-value.patch new file mode 100644 index 00000000000..43550861044 --- /dev/null +++ b/queue-2.6.32/x86-under-bios-control-restore-ap-s-apic_lvtthmr-to-the-bsp-value.patch @@ -0,0 +1,132 @@ +From yong.y.wang@linux.intel.com Wed Dec 16 15:23:47 2009 +From: Yong Wang +Date: Wed, 16 Dec 2009 12:58:46 +0800 +Subject: x86: Under BIOS control, restore AP's APIC_LVTTHMR to the BSP value +To: Greg KH +Cc: stable@kernel.org +Message-ID: <20091216045846.GA21103@ywang-moblin2.bj.intel.com> +Content-Disposition: inline + +From: Yong Wang + +Upstream commit a2202aa29289db64ca7988b12343158b67b27f10. + +On platforms where bios handles the thermal monitor interrupt, +APIC_LVTTHMR on each logical CPU is programmed to generate a SMI and OS +can't touch it. + +Unfortunately AP bringup sequence using INIT-SIPI-SIPI clear all +the LVT entries except the mask bit. Essentially this results in +all LVT entries including the thermal monitoring interrupt set to masked +(clearing the bios programmed value for APIC_LVTTHMR). + +And this leads to kernel take over the thermal monitoring interrupt +on AP's but not on BSP (leaving the bios programmed value only on BSP). + +As a result of this, we have seen system hangs when the thermal +monitoring interrupt is generated. + +Fix this by reading the initial value of thermal LVT entry on BSP +and if bios has taken over the control, then program the same value +on all AP's and leave the thermal monitoring interrupt control +on all the logical cpu's to the bios. + +Signed-off-by: Yong Wang +Reviewed-by: Suresh Siddha +Cc: Borislav Petkov +Cc: Arjan van de Ven +LKML-Reference: <20091110013824.GA24940@ywang-moblin2.bj.intel.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/mce.h | 6 ++++++ + arch/x86/kernel/cpu/mcheck/therm_throt.c | 29 ++++++++++++++++++++++++++++- + arch/x86/kernel/setup.c | 3 +++ + 3 files changed, 37 insertions(+), 1 deletion(-) + +--- a/arch/x86/include/asm/mce.h ++++ b/arch/x86/include/asm/mce.h +@@ -214,5 +214,11 @@ void intel_init_thermal(struct cpuinfo_x + + void mce_log_therm_throt_event(__u64 status); + ++#ifdef CONFIG_X86_THERMAL_VECTOR ++extern void mcheck_intel_therm_init(void); ++#else ++static inline void mcheck_intel_therm_init(void) { } ++#endif ++ + #endif /* __KERNEL__ */ + #endif /* _ASM_X86_MCE_H */ +--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c ++++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c +@@ -49,6 +49,8 @@ static DEFINE_PER_CPU(struct thermal_sta + + static atomic_t therm_throt_en = ATOMIC_INIT(0); + ++static u32 lvtthmr_init __read_mostly; ++ + #ifdef CONFIG_SYSFS + #define define_therm_throt_sysdev_one_ro(_name) \ + static SYSDEV_ATTR(_name, 0444, therm_throt_sysdev_show_##_name, NULL) +@@ -254,6 +256,18 @@ asmlinkage void smp_thermal_interrupt(st + ack_APIC_irq(); + } + ++void __init mcheck_intel_therm_init(void) ++{ ++ /* ++ * This function is only called on boot CPU. Save the init thermal ++ * LVT value on BSP and use that value to restore APs' thermal LVT ++ * entry BIOS programmed later ++ */ ++ if (cpu_has(&boot_cpu_data, X86_FEATURE_ACPI) && ++ cpu_has(&boot_cpu_data, X86_FEATURE_ACC)) ++ lvtthmr_init = apic_read(APIC_LVTTHMR); ++} ++ + void intel_init_thermal(struct cpuinfo_x86 *c) + { + unsigned int cpu = smp_processor_id(); +@@ -270,7 +284,20 @@ void intel_init_thermal(struct cpuinfo_x + * since it might be delivered via SMI already: + */ + rdmsr(MSR_IA32_MISC_ENABLE, l, h); +- h = apic_read(APIC_LVTTHMR); ++ ++ /* ++ * The initial value of thermal LVT entries on all APs always reads ++ * 0x10000 because APs are woken up by BSP issuing INIT-SIPI-SIPI ++ * sequence to them and LVT registers are reset to 0s except for ++ * the mask bits which are set to 1s when APs receive INIT IPI. ++ * Always restore the value that BIOS has programmed on AP based on ++ * BSP's info we saved since BIOS is always setting the same value ++ * for all threads/cores ++ */ ++ apic_write(APIC_LVTTHMR, lvtthmr_init); ++ ++ h = lvtthmr_init; ++ + if ((l & MSR_IA32_MISC_ENABLE_TM1) && (h & APIC_DM_SMI)) { + printk(KERN_DEBUG + "CPU%d: Thermal monitoring handled by SMI\n", cpu); +--- a/arch/x86/kernel/setup.c ++++ b/arch/x86/kernel/setup.c +@@ -109,6 +109,7 @@ + #ifdef CONFIG_X86_64 + #include + #endif ++#include + + /* + * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries. +@@ -1031,6 +1032,8 @@ void __init setup_arch(char **cmdline_p) + #endif + #endif + x86_init.oem.banner(); ++ ++ mcheck_intel_therm_init(); + } + + #ifdef CONFIG_X86_32 -- 2.47.3