lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 04/19] cpufreq: amd: introduce a new amd pstate driver to support future processors
    On Wed, Sep 08, 2021 at 10:59:46PM +0800, Huang Rui wrote:

    > +static int pstate_init_perf(struct amd_cpudata *cpudata)
    > +{
    > + u64 cap1;
    > +
    > + int ret = rdmsrl_safe_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1,
    > + &cap1);
    > + if (ret)
    > + return ret;
    > +
    > + /* Some AMD processors has specific power features that the cppc entry
    > + * doesn't indicate the highest performance. It will introduce the
    > + * feature in following days.
    > + */

    Wrong comment style; also imagine reading this comment half a year from
    now...

    > + WRITE_ONCE(cpudata->highest_perf, amd_get_highest_perf());
    > +
    > + WRITE_ONCE(cpudata->nominal_perf, CAP1_NOMINAL_PERF(cap1));
    > + WRITE_ONCE(cpudata->lowest_nonlinear_perf, CAP1_LOWNONLIN_PERF(cap1));
    > + WRITE_ONCE(cpudata->lowest_perf, CAP1_LOWEST_PERF(cap1));
    > +
    > + return 0;
    > +}

    \
     
     \ /
      Last update: 2021-09-09 17:05    [W:4.060 / U:0.280 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site