mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Ostrovsky <ostr@amd64.org>
To: hpa@zytor.com, mingo@elte.hu, tglx@linutronix.de
Cc: borislav.petkov@amd.com, andreas.herrmann3@amd.com,
	mark.langsdorf@amd.com, linux-kernel@vger.kernel.org,
	Boris Ostrovsky <boris.ostrovsky@amd.com>
Subject: [PATCH RESEND] x86, AMD: Set ARAT feature on AMD processors
Date: Tue, 15 Mar 2011 12:13:44 -0400	[thread overview]
Message-ID: <1300205624-4813-1-git-send-email-ostr@amd64.org> (raw)

From: Boris Ostrovsky <boris.ostrovsky@amd.com>

Support for Always Running APIC timer (ARAT) was introduced in commit
db954b5898dd3ef3ef93f4144158ea8f97deb058. This feature allows us to
avoid switching timers from LAPIC to something else (e.g. HPET) and
go into timer broadcasts when entering deep C-states.

AMD processors don't provide a CPUID bit for that feature but they also
keep APIC timers running in deep C-states (except for cases when the
processor is affected by erratum 400). Therefore we should set ARAT
feature bit on AMD CPUs.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Tested-by: Borislav Petkov <borislav.petkov@amd.com>
Acked-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
---
 arch/x86/kernel/cpu/amd.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 7c7bedb..48eaa1b 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -594,6 +594,10 @@ 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))
+		set_cpu_cap(c, X86_FEATURE_ARAT);
 }
 
 #ifdef CONFIG_X86_32
-- 
1.7.1


             reply	other threads:[~2011-03-15 17:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 16:13 Boris Ostrovsky [this message]
2011-03-16 13:57 ` [tip:x86/urgent] " tip-bot for Boris Ostrovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300205624-4813-1-git-send-email-ostr@amd64.org \
    --to=ostr@amd64.org \
    --cc=andreas.herrmann3@amd.com \
    --cc=boris.ostrovsky@amd.com \
    --cc=borislav.petkov@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.com \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®