lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 Oct 2017 02:51:19 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>, Lv <lv.zheng@...el.com>,
        Len Brown <lenb@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPI / LPIT: Add Low Power Idle Table (LPIT) support

On Thu, Oct 5, 2017 at 2:39 AM, Srinivas Pandruvada
<srinivas.pandruvada@...ux.intel.com> 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@...ux.intel.com> 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?

>
> [...]
>
>> >
>> > --- /dev/null+++ b/include/acpi/acpi_lpit.h
>> > @@ -0,0 +1,34 @@
>> > +/*
>> > + * acpi_lpit.h - LPIT table processing functions interface
>> > + *
>> > + * Copyright (C) 2017 Intel Corporation. All rights reserved.
>> > + *
>> > + * This program is free software; you can redistribute it and/or
>> > + * modify it under the terms of the GNU General Public License
>> > version
>> > + * 2 as published by the Free Software Foundation.
>> > + *
>> > + * This program is distributed in the hope that it will be useful,
>> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> > + * GNU General Public License for more details.
>> > + */
>> > +
>> > +#ifndef ACPI_LPIT_H
>> > +#define ACPI_LPIT_H
>> > +
>> > +#ifdef CONFIG_ACPI_LPIT
>> > +
>> > +void acpi_init_lpit(void);
>> > +int lpit_read_residency_count_address(u64 *address);
>> > +
>> > +#else
>> > +
>> > +static inline void acpi_init_lpit(void) { }
>> > +
>> > +static inline int lpit_read_residency_count_address(u64 *address)
>> > +{
>> > +       return -EINVAL;
>> > +}
>> > +
>> > +#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.

And it would be good to mention what is going to use it in the changelog.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ