All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: Thomas Renninger <trenn@suse.de>
Cc: akpm@linux-foundation.org, davej@redhat.com,
	cpufreq@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] cpufreq: Add APERF/MPERF support for AMD processors
Date: Tue, 23 Mar 2010 12:59:57 +0100	[thread overview]
Message-ID: <20100323115957.GD16493@aftab> (raw)
In-Reply-To: <201003231226.22756.trenn@suse.de>

From: Thomas Renninger <trenn@suse.de>
Date: Tue, Mar 23, 2010 at 12:26:22PM +0100

> On Monday 22 March 2010 19:38:39 Borislav Petkov wrote:
> > From: Mark Langsdorf <mark.langsdorf@amd.com>
> > 
> > Starting with model 10 of Family 0x10, AMD processors may have
> > support for APERF/MPERF.  Add support for identifying it and using
> > it within cpufreq.  Move the APERF/MPERF functions out of the
> > acpi-cpufreq code and into their own file so they can easily be
> > shared.
> > 
> > Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
> > Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
> > ---
> >  arch/x86/kernel/cpu/amd.c                  |    6 +++
> >  arch/x86/kernel/cpu/cpufreq/Makefile       |    4 +-
> >  arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c |   44 +-----------------------
> >  arch/x86/kernel/cpu/cpufreq/mperf.c        |   50 ++++++++++++++++++++++++++++
> >  arch/x86/kernel/cpu/cpufreq/mperf.h        |    9 +++++
> >  arch/x86/kernel/cpu/cpufreq/powernow-k8.c  |    8 ++++
> >  6 files changed, 77 insertions(+), 44 deletions(-)
> >  create mode 100644 arch/x86/kernel/cpu/cpufreq/mperf.c
> >  create mode 100644 arch/x86/kernel/cpu/cpufreq/mperf.h
> > 
> > diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> > index e485825..796f662 100644
> > --- a/arch/x86/kernel/cpu/amd.c
> > +++ b/arch/x86/kernel/cpu/amd.c
> > @@ -537,6 +537,12 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
> >  		set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
> >  	}
> >  
> > +	if (c->cpuid_level >= 6) {
> > +		unsigned ecx = cpuid_ecx(6);
> > +		if (ecx & 0x01)
> > +			set_cpu_cap(c, X86_FEATURE_APERFMPERF);
> > +	}
> This is nearly identical to (beside c->cpuid_level > 6),
> in arch/x86/kernel/cpu/intel.c:
> if (c->cpuid_level > 6) {
>                 unsigned ecx = cpuid_ecx(6);
>                 if (ecx & 0x01)
>                         set_cpu_cap(c, X86_FEATURE_APERFMPERF);
> }
> I expect you are correct... or could it get moved to general x86 init code?

Sounds good...

-- 
Regards/Gruss,
Boris.

--
Advanced Micro Devices, Inc.
Operating Systems Research Center

  reply	other threads:[~2010-03-23 11:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 18:38 [PATCH 0/5] powernow-k8: Core Performance Boost and effective frequency support Borislav Petkov
2010-03-22 18:38 ` [PATCH 1/5] cpufreq: Unify sysfs attribute definition macros Borislav Petkov
2010-03-23 11:07   ` Thomas Renninger
2010-03-23 11:44     ` Borislav Petkov
2010-03-23 11:55       ` Thomas Renninger
2010-03-23 12:05         ` Borislav Petkov
2010-03-23 12:30           ` Thomas Renninger
2010-03-22 18:38 ` [PATCH 2/5] powernow-k8: Add core performance boost support Borislav Petkov
2010-03-23 11:17   ` Thomas Renninger
2010-03-23 11:58     ` Borislav Petkov
2010-03-23 13:27       ` Dominik Brodowski
2010-03-23 14:19         ` Borislav Petkov
2010-03-23 14:47           ` Dominik Brodowski
2010-03-23 16:26             ` Borislav Petkov
2010-03-22 18:38 ` [PATCH 3/5] cpufreq: Add APERF/MPERF support for AMD processors Borislav Petkov
2010-03-23 11:26   ` Thomas Renninger
2010-03-23 11:59     ` Borislav Petkov [this message]
2010-03-22 18:38 ` [PATCH 4/5] powernow-k8: Fix frequency reporting Borislav Petkov
2010-03-22 18:38 ` [PATCH 5/5] cpufreq: Add support for actual freq Borislav Petkov
2010-03-23 11:51   ` Thomas Renninger
2010-03-23 14:23     ` Borislav Petkov
2010-03-23 14:41       ` Dominik Brodowski
2010-03-23 15:12       ` Thomas Renninger
2010-03-24 14:02         ` Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2010-03-24 17:46 [PATCH 0/5] powernow-k8: Core Performance Boost and effective frequency support Borislav Petkov
2010-03-24 17:46 ` [PATCH 3/5] cpufreq: Add APERF/MPERF support for AMD processors Borislav Petkov
2010-03-25  9:43   ` Thomas Renninger
2010-03-25 11:06     ` Borislav Petkov
2010-03-25 19:55     ` Valdis.Kletnieks
2010-03-25 20:59       ` Thomas Renninger
2010-03-25 22:16         ` Borislav Petkov

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=20100323115957.GD16493@aftab \
    --to=bp@amd64.org \
    --cc=akpm@linux-foundation.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trenn@suse.de \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.