Re: [PATCH] ACPI / LPIT: Add Low Power Idle Table (LPIT) support

From: Rafael J. Wysocki
Date: Thu Oct 05 2017 - 09:02:46 EST


On Thursday, October 5, 2017 3:27:14 AM CEST Srinivas Pandruvada wrote:
> On Thu, 2017-10-05 at 02:51 +0200, Rafael J. Wysocki wrote:
> > On Thu, Oct 5, 2017 at 2:39 AM, Srinivas Pandruvada
> > <srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:
> > >
> > > On Thu, 2017-10-05 at 02:10 +0200, Rafael J. Wysocki wrote:
> > > >
> > > > On Thu, Oct 5, 2017 at 1:43 AM, Srinivas Pandruvada
> > > > <srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:
> > > > >
> > > > >
> > > > > Added functionality to read LPIT table, which provides:
> > > > >
> > > > > - Sysfs interface to read residency counters via
> > > > > /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us
> > > > > /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency
> > > > > _us
> > > > >
> > > > >
> > > [...]
> > >
> > > >
> > > > >
> > > > > +int lpit_read_residency_count_address(u64 *address)
> > > > > +{
> > > > > + if (!residency_info_mem.gaddr.address)
> > > > > + return -EINVAL;
> > > > > +
> > > > > + *address = residency_info_mem.gaddr.address;
> > > > > +
> > > > > + return 0;
> > > > > +}
> > > > I don't see users of this. Are there any?
> > > The user will be pmc_core_driver which will go through platform x86
> > > drivers tree.
> > OK
> >
> > >
> > > Also some mei drivers will also need.
> > What for?
> They also need to get the PMC base address.

Fair enough.

> [...]
> > > > > +
> > > > > +#endif
> > > > > +#endif
> > > > The above can go into internal.h or sleep.h in drivers/acpi/ IMO.
> > > > There's not need to export it.
> > > The pmc core driver is in drivers/platform/x86. Do you want to
> > > include
> > > a local file from there?
> > So the _init() thing can go to internal.h and the one-line header of
> > the other one can go to include/linux/acpi.h just fine.
> OK.
>
> >
> > And it would be good to mention what is going to use it in the
> > changelog.
> It is already described in the change log for pmc core driver.

OK, I seem to have overlooked that, sorry.

Thanks,
Rafael