[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 08/45] kernel: Add combined power-off+restart handler call chain API
- To: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
- From: Dmitry Osipenko <digetx@xxxxxxxxx>
- Date: Fri, 29 Oct 2021 00:36:23 +0300
- Cc: Thierry Reding <thierry.reding@xxxxxxxxx>, Jonathan Hunter <jonathanh@xxxxxxxxxx>, Lee Jones <lee.jones@xxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Ulf Hansson <ulf.hansson@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Greg Ungerer <gerg@xxxxxxxxxxxxxx>, Joshua Thompson <funaho@xxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, Nick Hu <nickhu@xxxxxxxxxxxxx>, Greentime Hu <green.hu@xxxxxxxxx>, Vincent Chen <deanbo422@xxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Rich Felker <dalias@xxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Len Brown <lenb@xxxxxxxxxx>, Santosh Shilimkar <ssantosh@xxxxxxxxxx>, Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Chen-Yu Tsai <wens@xxxxxxxx>, Jonathan Neuschäfer <j.neuschaefer@xxxxxxx>, Tony Lindgren <tony@xxxxxxxxxxx>, Liam Girdwood <lgirdwood@xxxxxxxxx>, Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>, Vladimir Zapolskiy <vz@xxxxxxxxx>, Avi Fishman <avifishman70@xxxxxxxxx>, Tomer Maimon <tmaimon77@xxxxxxxxx>, Tali Perry <tali.perry1@xxxxxxxxx>, Patrick Venture <venture@xxxxxxxxxx>, Nancy Yuen <yuenn@xxxxxxxxxx>, Benjamin Fair <benjaminfair@xxxxxxxxxx>, Pavel Machek <pavel@xxxxxx>, Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, linux-csky@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev <linuxppc-dev@xxxxxxxxxxxxxxxx>, linux-riscv@xxxxxxxxxxxxxxxxxxx, Linux-sh list <linux-sh@xxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, ACPI Devel Maling List <linux-acpi@xxxxxxxxxxxxxxx>, Linux OMAP Mailing List <linux-omap@xxxxxxxxxxxxxxx>, openbmc@xxxxxxxxxxxxxxxx, linux-tegra <linux-tegra@xxxxxxxxxxxxxxx>, Linux PM <linux-pm@xxxxxxxxxxxxxxx>
- Delivery-date: Thu, 28 Oct 2021 21:36:34 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
28.10.2021 12:53, Rafael J. Wysocki пишет:
>> +/**
>> + * struct power_handler - Machine power-off + restart handler
>> + *
>> + * Describes power-off and restart handlers which are invoked by kernel
>> + * to power off or restart this machine. Supports prioritized chaining for
>> + * both restart and power-off handlers. Callback's priority must be unique.
>> + * Intended to be used by device drivers that are responsible for restarting
>> + * and powering off hardware which kernel is running on.
>> + *
>> + * Struct power_handler can be static. Members of this structure must not
>> be
>> + * altered while handler is registered.
>> + *
>> + * Fill the structure members and pass it to register_power_handler().
>> + */
>> +struct power_handler {
> The name of this structure is too generic IMV. There are many things
> that it might apply to in principle.
>
> What about calling power_off_handler or sys_off_handler as it need not
> be about power at all?
I didn't like much the 'power' either, but couldn't come up with a
better variant. Will change it in v3, thank you.
|