lkml.org 
[lkml]   [2021]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v2 27/45] mfd: ntxec: Use devm_register_power_handler()
    From
    Date
    07.11.2021 20:08, Guenter Roeck пишет:
    > On 11/7/21 8:53 AM, Dmitry Osipenko wrote:
    >> 06.11.2021 23:54, Jonathan Neuschäfer пишет:
    >>> Hi,
    >>>
    >>> On Thu, Oct 28, 2021 at 12:16:57AM +0300, Dmitry Osipenko wrote:
    >>>> Use devm_register_power_handler() that replaces global pm_power_off
    >>>> variable and allows to register multiple power-off handlers. It also
    >>>> provides restart-handler support, i.e. all in one API.
    >>>>
    >>>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
    >>>> ---
    >>>
    >>> When I boot with (most of) this patchset applied, I get the warning at
    >>> kernel/reboot.c:187:
    >>>
    >>>     /*
    >>>      * Handler must have unique priority. Otherwise call order is
    >>>      * determined by registration order, which is unreliable.
    >>>      */
    >>>     WARN_ON(!atomic_notifier_has_unique_priority(&restart_handler_list,
    >>> nb));
    >>>
    >>> As the NTXEC driver doesn't specify a priority, I think this is an issue
    >>> to be fixed elsewhere.
    >>>
    >>> Other than that, it works and looks good, as far as I can tell.
    >>>
    >>>
    >>> For this patch:
    >>>
    >>> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
    >>> Tested-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
    >>
    >> Thank you. You have conflicting restart handlers, apparently NTXEC
    >> driver should have higher priority than the watchdog driver. It should
    >> be a common problem for the watchdog drivers, I will lower watchdog's
    >> default priority to fix it.
    >>
    >
    > The watchdog subsystem already uses "0" as default priority, which was
    > intended as priority of last resort for restart handlers. I do not see
    > a reason to change that.

    Right, I meant that watchdog drivers which use restart handler set the
    level to the default 128 [1]. Although, maybe it's a problem only for
    i.MX drivers in practice, I'll take a closer look at the other drivers.

    [1]
    https://elixir.bootlin.com/linux/latest/source/drivers/watchdog/imx2_wdt.c#L318

    \
     
     \ /
      Last update: 2021-11-07 18:17    [W:3.982 / U:0.272 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site