Fix stalls on AMD Sempron notebooks (#704059)

This commit is contained in:
Chuck Ebbert 2011-05-20 22:35:34 -04:00
parent cdf695a919
commit 7a131a574f
2 changed files with 27 additions and 2 deletions

View File

@ -746,6 +746,9 @@ Patch12406: ips-use-interruptible-waits-in-ips-monitor.patch
Patch12407: scsi_dh_hp_sw-fix-deadlock-in-start_stop_endio.patch
# temporary fix for Sempron machines stalling (#704059)
Patch12408: x86-amd-arat-bug-on-sempron-workaround.patch
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@ -1385,6 +1388,9 @@ ApplyPatch ips-use-interruptible-waits-in-ips-monitor.patch
ApplyPatch scsi_dh_hp_sw-fix-deadlock-in-start_stop_endio.patch
# temporary fix for Sempron machines stalling (#704059)
ApplyPatch x86-amd-arat-bug-on-sempron-workaround.patch
# END OF PATCH APPLICATIONS
%endif
@ -1993,15 +1999,16 @@ fi
# and build.
%changelog
* Fri May 20 2011 Chuck Ebbert <cebbert@redhat.com>
* Fri May 20 2011 Chuck Ebbert <cebbert@redhat.com> 2.6.38.7-28.rc1
- Linux 2.6.38.7-rc1
- Fix up context in utrace-ptrace.patch
- Revert radeon patches already in our radeon update:
drm-radeon-kms-fix-gart-setup-on-fusion-parts-v2-backport.patch
- Drop merged patches:
iwlwifi-add-_ack_plpc_check-module-parameters.patch
- Fix stalls on AMD Sempron notebooks (#704059)
* Fri May 13 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38.6-28
* Fri May 13 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38.6-27
- [fabbione@] Fix a deadlock when using hp_sw with an HP san.
(7a1e9d82 upstream)

View File

@ -0,0 +1,18 @@
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -724,6 +724,15 @@ bool cpu_has_amd_erratum(const int *erra
if (cpu->x86_vendor != X86_VENDOR_AMD)
return false;
+ /*
+ * Temporary workaround for ARAT bug on Sempron.
+ * The BIOS clears the bit in OSVW, so the check
+ * fails, then ARAT gets set and when the processor
+ * uses C3 it hangs. Always return true for that CPU.
+ */
+ if (cpu->x86 == 0x10 && cpu->x86_model == 6 && cpu->x86_mask == 2)
+ return true;
+
if (osvw_id >= 0 && osvw_id < 65536 &&
cpu_has(cpu, X86_FEATURE_OSVW)) {
u64 osvw_len;