public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] x86, AMD: Do not enable ARAT feature on AMD processors below family 0x12
@ 2011-05-26 15:19 Boris Ostrovsky
  2011-05-26 18:13 ` [tip:x86/urgent] x86, amd: " tip-bot for Boris Ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Ostrovsky @ 2011-05-26 15:19 UTC (permalink / raw)
  To: hpa, mingo, tglx
  Cc: borislav.petkov, Hans.Rosenfeld, Andreas.Herrmann3, cebbert,
	Boris.Ostrovsky, linux-kernel, jvpeetz, stable, x86

Commit b87cf80af3ba4b4c008b4face3c68d604e1715c6 added support for
ARAT (Always Running APIC timer) on AMD processors that are not
affected by erratum 400. This erratum is present on certain processor
families and prevents APIC timer from waking up the CPU when it
is in a deep C state, including C1E state.

Determining whether a processor is affected by this erratum may
have some corner cases and handling these cases is somewhat
complicated. In the interest of simplicity we won't claim ARAT
support on processor families below 0x12 and will go back to
broadcasting timer when going idle.

Signed-off-by: Boris Ostrovsky <ostr@amd64.org>
Tested-by: Boris Petkov <borislav.petkov@amd.com>
Cc: Hans Rosenfeld <Hans.Rosenfeld@amd.com>
Cc: Andreas Herrmann <Andreas.Herrmann3@amd.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: stable@kernel.org # 32.x, 38.x, 39.x
---
 arch/x86/kernel/cpu/amd.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 6f9d1f6..728b223 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -612,8 +612,11 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 	}
 #endif
 
-	/* As a rule processors have APIC timer running in deep C states */
-	if (c->x86 > 0xf && !cpu_has_amd_erratum(amd_erratum_400))
+	/*
+	 * Family 0x12 and above processors have APIC timer
+	 * running in deep C states.
+	 */
+	if (c->x86 > 0x11)
 		set_cpu_cap(c, X86_FEATURE_ARAT);
 
 	/*
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:x86/urgent] x86, amd: Do not enable ARAT feature on AMD processors below family 0x12
  2011-05-26 15:19 [PATCH RESEND] x86, AMD: Do not enable ARAT feature on AMD processors below family 0x12 Boris Ostrovsky
@ 2011-05-26 18:13 ` tip-bot for Boris Ostrovsky
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Boris Ostrovsky @ 2011-05-26 18:13 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, Andreas.Herrmann3, cebbert, tglx, hpa,
	ostr, borislav.petkov, Hans.Rosenfeld

Commit-ID:  e9cdd343a5e42c43bcda01e609fa23089e026470
Gitweb:     http://git.kernel.org/tip/e9cdd343a5e42c43bcda01e609fa23089e026470
Author:     Boris Ostrovsky <ostr@amd64.org>
AuthorDate: Thu, 26 May 2011 11:19:52 -0400
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 26 May 2011 10:38:30 -0700

x86, amd: Do not enable ARAT feature on AMD processors below family 0x12

Commit b87cf80af3ba4b4c008b4face3c68d604e1715c6 added support for
ARAT (Always Running APIC timer) on AMD processors that are not
affected by erratum 400. This erratum is present on certain processor
families and prevents APIC timer from waking up the CPU when it
is in a deep C state, including C1E state.

Determining whether a processor is affected by this erratum may
have some corner cases and handling these cases is somewhat
complicated. In the interest of simplicity we won't claim ARAT
support on processor families below 0x12 and will go back to
broadcasting timer when going idle.

Signed-off-by: Boris Ostrovsky <ostr@amd64.org>
Link: http://lkml.kernel.org/r/1306423192-19774-1-git-send-email-ostr@amd64.org
Tested-by: Boris Petkov <borislav.petkov@amd.com>
Cc: Hans Rosenfeld <Hans.Rosenfeld@amd.com>
Cc: Andreas Herrmann <Andreas.Herrmann3@amd.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: stable@kernel.org # 32.x, 38.x, 39.x
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/kernel/cpu/amd.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 8f5cabb..b13ed39 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -612,8 +612,11 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 	}
 #endif
 
-	/* As a rule processors have APIC timer running in deep C states */
-	if (c->x86 > 0xf && !cpu_has_amd_erratum(amd_erratum_400))
+	/*
+	 * Family 0x12 and above processors have APIC timer
+	 * running in deep C states.
+	 */
+	if (c->x86 > 0x11)
 		set_cpu_cap(c, X86_FEATURE_ARAT);
 
 	/*

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-26 18:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 15:19 [PATCH RESEND] x86, AMD: Do not enable ARAT feature on AMD processors below family 0x12 Boris Ostrovsky
2011-05-26 18:13 ` [tip:x86/urgent] x86, amd: " tip-bot for Boris Ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox