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-next>] [day] [month] [year] [list]
Date:   Thu, 7 Feb 2019 22:18:05 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Enrico Granata <egranata@...gle.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Gwendal Grignou <gwendal@...omium.org>,
        Dmitry Torokhov <dtor@...omium.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Brian Norris <briannorris@...omium.org>,
        Enrico Granata <egranata@...omium.org>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH] driver: platform: Add support for GpioInt() ACPI to platform_get_irq()

On Thu, Feb 7, 2019 at 9:45 PM Enrico Granata <egranata@...gle.com> wrote:
> On Thu, Feb 7, 2019 at 11:39 AM Andy Shevchenko <andy.shevchenko@...il.com> wrote:
>> On Thu, Feb 7, 2019 at 9:04 PM Rafael J. Wysocki <rafael@...nel.org> wrote:

>> > > This is not currently done for the platform drivers, as platform_get_irq()
>> > > does not try to parse GpioInt() resources.
>>
>> And why is this a problem?

> In ChromeOS, we have a driver (cros_ec_lpc) which can run either on systems that directly expose the interrupt,
> or systems where the interrupt goes through a GPIO controller. On the former, firmware provides an Interrupt resource
> and platform_get_irq() finds it. On the latter, firmware provides a GpioInt resource and platform_get_irq does not
> find it. We could work around this in the driver by probing both paths, but since other subsystems seem to directly
> look for GpioInt resources, it seemed to us to make more sense to extend platform_get_irq() instead.

Looking briefly into the driver I found third scenario — no resource at all.
So, you already have a quirk for that. Now it's the question either
you go for global quirk (trying to find an IRQ via iterating over
GpioInt() resources like in this patch, but in the driver), or use DMI
table for more stricter rules.

Either way you choose, I don't see a necessity to put this to the
driver core for now since it would be the only (let's assume properly
written ACPI tables) driver needs such.

> Do you have a suggestion as to how to write ACPI tables to avoid the issue?

1. Allocate new ID and use it (perhaps not the best path).
2. Use GPE(s).

--
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ