lkml.org 
[lkml]   [2021]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 08/21] cpufreq: amd: add acpi cppc function as the backend for legacy processors
    On Fri, Oct 29, 2021 at 10:20:09PM +0800, Limonciello, Mario wrote:
    > On 10/29/2021 08:02, Huang Rui wrote:
    > > In some old Zen based processors, they are using the shared memory that
    > > exposed from ACPI SBIOS.
    >
    > I don't think this is only "old" processors. I think there are "new"
    > processors that just don't happen to implement the MSR too.
    >

    Yes, I will correct the description.

    > >
    > > Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
    > > Signed-off-by: Huang Rui <ray.huang@amd.com>
    > > ---
    > > drivers/cpufreq/amd-pstate.c | 58 ++++++++++++++++++++++++++++++++----
    > > 1 file changed, 53 insertions(+), 5 deletions(-)
    > >
    > > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
    > > index 55ff03f85608..d399938d6d85 100644
    > > --- a/drivers/cpufreq/amd-pstate.c
    > > +++ b/drivers/cpufreq/amd-pstate.c
    > > @@ -73,6 +73,19 @@ static inline int pstate_enable(bool enable)
    > > return wrmsrl_safe(MSR_AMD_CPPC_ENABLE, enable ? 1 : 0);
    > > }
    > >
    > > +static int cppc_enable(bool enable)
    > > +{
    > > + int cpu, ret = 0;
    > > +
    > > + for_each_online_cpu(cpu) {
    >
    > I wonder if this should also be changed to present CPU instead of
    > offline CPU. Otherwise could this turn into a situation that the user
    > starts with some CPU's offlined and enables them later but this doesn't
    > end up applying to the CPUs that were started offlined and changed?
    >

    Yes, make sense. It is actually similiar with previous acpi_cpc_valid fix
    patch. I will update it in V4.

    Thanks,
    Ray

    \
     
     \ /
      Last update: 2021-11-01 10:07    [W:4.310 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site