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]
Message-ID: <CAHQZ30DjkyDT8KbsHzfwiyg6Tst9EFhtCnjx3MmwbWRerzW_6A@mail.gmail.com>
Date:   Fri, 5 Aug 2022 20:19:56 -0600
From:   Raul Rangel <rrangel@...omium.org>
To:     Hans de Goede <hdegoede@...hat.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        "Limonciello, Mario" <mario.limonciello@....com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux ACPI <linux-acpi@...r.kernel.org>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-input <linux-input@...r.kernel.org>,
        Kai-Heng Feng <kai.heng.feng@...onical.com>
Subject: Re: [PATCH] i2c: ACPI: Do not check ACPI_FADT_LOW_POWER_S0

I do plan on coming back and updating those patches. I got derailed
with other priorities. But as Hans pointed out, we wanted to use
`ExclusiveAndWake` to make the decision since not all IRQs can be wake
sources while in s0i3.


On Fri, Aug 5, 2022 at 12:54 PM Hans de Goede <hdegoede@...hat.com> wrote:
>
> Hi,
>
> On 8/5/22 19:08, Rafael J. Wysocki wrote:
> > On Fri, Aug 5, 2022 at 6:59 PM Limonciello, Mario
> > <mario.limonciello@....com> wrote:
> >>
> >> On 8/5/2022 11:51, Rafael J. Wysocki wrote:
> >>> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >>>
> >>> The ACPI_FADT_LOW_POWER_S0 flag merely means that it is better to
> >>> use low-power S0 idle on the given platform than S3 (provided that
> >>> the latter is supported) and it doesn't preclude using either of
> >>> them (which of them will be used depends on the choices made by user
> >>> space).
> >>>
> >>> Because of that, ACPI_FADT_LOW_POWER_S0 is generally not sufficient
> >>> for making decisions in device drivers and so i2c_hid_acpi_probe()
> >>> should not use it.
> >>>
> >>> Moreover, Linux always supports suspend-to-idle, so if a given
> >>> device can wake up the system from suspend-to-idle, then it can be
> >>> marked as wakeup capable unconditionally, so make that happen in
> >>> i2c_hid_acpi_probe().
> >>>
> >>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >>
> >> +Raul
> >> +Hans
> >> +KH
> >>
> >> Raul had a patch that was actually going to just tear out this code
> >> entirely:
> >> https://lkml.kernel.org/lkml/20211220163823.1.Ie20ca47a26d3ea68124d8197b67bb1344c67f650@changeid/
> >>
> >> As part of that patch series discussion another suggestion had
> >> transpired
> >> (https://patchwork.kernel.org/project/linux-input/patch/20211220163823.2.Id022caf53d01112188308520915798f08a33cd3e@changeid/#24681016):
> >>
> >> ```
> >> if ((acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) &&
> >>             !adev->flags.power_manageable) {
> >>                  device_set_wakeup_capable(dev, true);
> >>                  device_set_wakeup_enable(dev, false);
> >>          }
> >> ```
> >>
> >> If this is being changed, maybe consider that suggestion to
> >> check `adev->flags.power_manageable`.
> >
> > Fair enough, I'll send a v2 with this check added.
>
> Re-reading the original thread:
> https://lkml.kernel.org/lkml/20211220163823.1.Ie20ca47a26d3ea68124d8197b67bb1344c67f650@changeid/T/#u
>
> The conclusion there was that the :
>
>                  device_set_wakeup_capable(dev, true);
>                  device_set_wakeup_enable(dev, false);
>
> Calls should be made conditional on the IRQ being
> marked ExclusiveAndWake instead of the ACPI_FADT_LOW_POWER_S0
> check.
>
> Regards,
>
> Hans
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ