Re: [PATCH 03/15] powercap/intel_rapl: Support per Interface rapl_defaults

From: Zhang, Rui
Date: Sun Apr 02 2023 - 03:41:00 EST


On Thu, 2023-03-30 at 19:54 +0200, Rafael J. Wysocki wrote:
> On Thu, Mar 16, 2023 at 4:41 PM Zhang Rui <rui.zhang@xxxxxxxxx>
> wrote:
> > rapl_defaults is Interface specific.
> >
> > Although current MSR and MMIO Interface share the same
> > rapl_defaults,
> > new Interface like TPMI need its own rapl_defaults callbacks.
> >
> > Save the rapl_defaults information in the Interface private
> > structure.
> >
> > No functional change.
> >
> > Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>
> > ---
> > drivers/powercap/intel_rapl_common.c | 46 ++++++++++++++++++++--
> > ------
> > include/linux/intel_rapl.h | 2 ++
> > 2 files changed, 35 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/powercap/intel_rapl_common.c
> > b/drivers/powercap/intel_rapl_common.c
> > index 2d2c15eea8eb..56e8af2a1e6f 100644
> > --- a/drivers/powercap/intel_rapl_common.c
> > +++ b/drivers/powercap/intel_rapl_common.c
> > @@ -115,6 +115,11 @@ struct rapl_defaults {
> > };
> > static struct rapl_defaults *rapl_defaults;
> >
> > +static struct rapl_defaults *get_rpd(struct rapl_package *rp)
>
> I would replace "rpd" with "defaults" here and everywhere below in
> this patch.

sure, will update in next release.

thanks,
rui