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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 Jun 2018 18:12:30 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Sudeep Holla <sudeep.holla@....com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Catalin Marinas <catalin.marinas@....com>,
        Jeremy Linton <jeremy.linton@....com>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Hanjun Guo <hanjun.guo@...aro.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH v2 2/3] ACPI / PPTT: fix build when CONFIG_ACPI_PPTT is
 not enabled

On Tue, Jun 5, 2018 at 5:33 PM, Sudeep Holla <sudeep.holla@....com> wrote:
>
>
> On 05/06/18 16:00, Rafael J. Wysocki wrote:
>> On Tue, Jun 5, 2018 at 4:35 PM, Sudeep Holla <sudeep.holla@....com> wrote:
>>> Though CONFIG_ACPI_PPTT is selected by platforms and nor user visible,
>>> it may be useful to support the build with CONFIG_ACPI_PPTT disabled.
>>>
>>> This patch adds the missing dummy/boiler plate implementation to fix
>>> the build.
>>>
>>> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
>>> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
>>> ---
>>>  include/linux/acpi.h      | 15 +++++++++++++++
>>>  include/linux/cacheinfo.h |  2 +-
>>>  2 files changed, 16 insertions(+), 1 deletion(-)
>>>
>>> Hi Rafael,
>>>
>>> If you are fine with this, can you provide Ack, so that we route this
>>> through ARM64 tree where most of the ACPI PPTT support is present.
>>>
>>> Regards,
>>> Sudeep
>>>
>>> v1->v2:
>>>         - removed duplicate definition for acpi_find_last_cache_level
>>>
>>> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
>>> index 8f2cdb0eca71..4b35a66383f9 100644
>>> --- a/include/linux/acpi.h
>>> +++ b/include/linux/acpi.h
>>> @@ -1299,8 +1299,23 @@ static inline int lpit_read_residency_count_address(u64 *address)
>>>  }
>>>  #endif
>>>
>>> +#ifdef CONFIG_ACPI_PPTT
>>>  int find_acpi_cpu_topology(unsigned int cpu, int level);
>>>  int find_acpi_cpu_topology_package(unsigned int cpu);
>>>  int find_acpi_cpu_cache_topology(unsigned int cpu, int level);
>>> +#else
>>> +static inline int find_acpi_cpu_topology(unsigned int cpu, int level)
>>> +{
>>> +       return -EINVAL;
>>
>> Why -EINVAL?
>>
>
> I am not sure either. I used to return -ENOTSUPP, but IIRC someone
> suggested to use it only for syscalls. Also I just based it on other
> existing functions in acpi.h
>
> I am open for any alternatives if you think that is better here.

It would be good to make it consistent with the error codes returned
by the functions when they are present.

Anyway, it's fine by me if that's consistent with the other acpi.h stubs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ