args->height;
> - args->size = ALIGN(args->size, PAGE_SIZE);
> -
> params.format = virtio_gpu_translate_format(DRM_FORMAT_HOST_XRGB);
> params.width = args->width;
> params.height = args->height;
> @@ -92,7 +92,6 @@ int virtio_gpu_mode_dumb_create(struct d
On 10/10/23 14:51, Daniel P. Berrangé wrote:
> On Tue, Oct 10, 2023 at 02:41:22PM +0300, Dmitry Osipenko wrote:
>> On 9/15/23 14:11, Huang Rui wrote:
>>> Configure context init feature flag for virglrenderer.
>>>
>>> Originally-by: Antonio Caggiano
>>>
On 9/15/23 14:11, Huang Rui wrote:
> + if virgl.version().version_compare('>= 0.9.0') and
> virgl.version().version_compare('< 1.0.0')
> +message('Enabling virglrenderer unstable APIs')
> +virgl = declare_dependency(compile_args:
> '-DVIRGL_RENDERER_UNSTABLE_APIS',
> +
On 9/15/23 14:11, Huang Rui wrote:
> Hi all,
>
> Antonio Caggiano made the venus with QEMU on KVM platform last
> September[1]. This series are inherited from his original work to support
> the features of context init, hostmem, resource uuid, and blob resources
> for venus.
> At March of this yea
On 9/15/23 14:11, Huang Rui wrote:
> Venus in virglrenderer has required render server support.
>
> Signed-off-by: Huang Rui
> ---
> hw/display/virtio-gpu-virgl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl
On 9/15/23 14:11, Huang Rui wrote:
> Configure context init feature flag for virglrenderer.
>
> Originally-by: Antonio Caggiano
> Signed-off-by: Huang Rui
> ---
>
> V4 -> V5:
> - Inverted patch 5 and 6 because we should configure
> HAVE_VIRGL_CONTEXT_INIT firstly. (Philippe)
>
> mes
On 9/9/23 13:53, Huang Rui wrote:
> On Thu, Aug 31, 2023 at 11:51:50PM +0800, Dmitry Osipenko wrote:
>> On 8/31/23 13:40, Antonio Caggiano wrote:
>>> Hi Huang,
>>>
>>> Thank you for pushing this forward!
>>>
>>> On 31/08/2023 11:32, Huang Rui
On 8/31/23 13:40, Antonio Caggiano wrote:
> Hi Huang,
>
> Thank you for pushing this forward!
>
> On 31/08/2023 11:32, Huang Rui wrote:
>> From: Antonio Caggiano
>>
>> Request Venus when initializing VirGL.
>>
>> Signed-off-by: Antonio Caggiano
>> Signed-off-by: Huang Rui
>> ---
>>
>> v1->v2:
On 3/24/23 16:22, Huang Rui wrote:
> On Thu, Mar 16, 2023 at 07:14:47AM +0800, Dmitry Osipenko wrote:
>> On 3/13/23 18:55, Huang Rui wrote:
>>> On Mon, Mar 13, 2023 at 01:51:03AM +0800, Dmitry Osipenko wrote:
>>>> On 3/12/23 12:22, Huang Rui wrote:
>>>>>
On 3/13/23 18:55, Huang Rui wrote:
> On Mon, Mar 13, 2023 at 01:51:03AM +0800, Dmitry Osipenko wrote:
>> On 3/12/23 12:22, Huang Rui wrote:
>>> From: Antonio Caggiano
>>>
>>> Request Venus when initializing VirGL.
>>>
>>> Signed-off-by: Antoni
On 3/12/23 20:51, Dmitry Osipenko wrote:
> On 3/12/23 12:22, Huang Rui wrote:
>> From: Antonio Caggiano
>>
>> Request Venus when initializing VirGL.
>>
>> Signed-off-by: Antonio Caggiano
>> ---
>> hw/display/virtio-gpu-virgl.c | 4
>> 1
On 3/12/23 12:22, Huang Rui wrote:
> From: Antonio Caggiano
>
> Request Venus when initializing VirGL.
>
> Signed-off-by: Antonio Caggiano
> ---
> hw/display/virtio-gpu-virgl.c | 4
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-v
On 2/25/23 17:55, Dmitry Osipenko wrote:
> On 2/24/23 18:34, Oleksandr Tyshchenko wrote:
>> From: Oleksandr Tyshchenko
>>
>> The "vdev->dev.parent" should be used instead of "vdev->dev" as a device
>> for which to perform the DMA opera
m(bo) && use_dma_api)
> - dma_sync_sgtable_for_device(&vgdev->vdev->dev,
> + dma_sync_sgtable_for_device(vgdev->vdev->dev.parent,
> bo->base.sgt, DMA_TO_DEVICE);
>
> cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p));
Indeed, it's only the vgpu drm device that was moved to use the pci
parent device. On x86 the vdev always has dma-ops, also
virtio_has_dma_quirk=true for modern Qemu. So I didn't test this code
path and apparently it's only testable on Xen, which is good to know.
Reviewed-by: Dmitry Osipenko
--
Best regards,
Dmitry
On 5/31/22 22:04, Geert Uytterhoeven wrote:
> Hi Dmitry,
>
> On Tue, May 10, 2022 at 1:34 AM Dmitry Osipenko
> wrote:
>> Kernel now supports chained power-off handlers. Use
>> register_power_off_handler() that registers power-off handlers and
>> do_kernel_power_of
On 5/24/22 18:03, Geert Uytterhoeven wrote:
> Hi Dmitry,
>
> On Tue, May 24, 2022 at 3:41 PM Dmitry Osipenko
> wrote:
>> On 5/24/22 16:14, Geert Uytterhoeven wrote:
>>> On Tue, May 10, 2022 at 1:33 AM Dmitry Osipenko
>>> wrote:
>>>> Add kernel
On 5/24/22 16:14, Geert Uytterhoeven wrote:
> Hi Dmitry,
>
> On Tue, May 10, 2022 at 1:33 AM Dmitry Osipenko
> wrote:
>> Add kernel_can_power_off() helper that replaces open-coded checks of
>> the global pm_power_off variable. This is a necessary step towards
>>
On 5/18/22 17:46, Rafael J. Wysocki wrote:
> On Tue, May 10, 2022 at 1:33 AM Dmitry Osipenko
> wrote:
...
>> Introduce new API that provides call chains support for all restart and
>> power-off modes. The new API is designed with simplicity and extensibility
>> in mind.
On 5/10/22 21:14, Rafael J. Wysocki wrote:
> On Tue, May 10, 2022 at 1:33 AM Dmitry Osipenko
> wrote:
>> Add atomic_notifier_call_chain_is_empty() that returns true if given
>> atomic call chain is empty.
> It would be good to mention a use case for it.
>
I
Use devm_register_sys_off_handler() that replaces global
pm_power_off_prepare variable and allows to register multiple
power-off handlers.
Acked-by: Mark Brown
Signed-off-by: Dmitry Osipenko
---
drivers/regulator/pfuze100-regulator.c | 42 +++---
1 file changed, 17
Mirosław
Signed-off-by: Dmitry Osipenko
---
arch/arm64/kernel/process.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 142a51256669..92bcc1768f0b 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel
All pm_power_off_prepare() users were converted to sys-off handler API.
Remove the obsolete global callback variable.
Signed-off-by: Dmitry Osipenko
---
include/linux/pm.h | 1 -
kernel/reboot.c| 19 ---
2 files changed, 20 deletions(-)
diff --git a/include/linux/pm.h b
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new sys-off API.
Reviewed-by: Michał Mirosław
Signed-off-by: Dmitry
.
Signed-off-by: Dmitry Osipenko
---
include/linux/reboot.h | 4
kernel/reboot.c| 22 ++
2 files changed, 26 insertions(+)
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index f185b64faae0..7c6e1f308f7c 100644
--- a/include/linux/reboot.h
+++ b/include
Mirosław
Signed-off-by: Dmitry Osipenko
---
arch/powerpc/kernel/setup-common.c | 4 +---
arch/powerpc/xmon/xmon.c | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kernel/setup-common.c
b/arch/powerpc/kernel/setup-common.c
index 518ae5aa9410..1b586577e75b
: Michał Mirosław
Signed-off-by: Dmitry Osipenko
---
arch/arm/kernel/reboot.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c
index 3044fcb8d073..2cb943422554 100644
--- a/arch/arm/kernel/reboot.c
+++ b/arch/arm/kernel/reboot.c
Mirosław
Signed-off-by: Dmitry Osipenko
---
arch/mips/kernel/reset.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c
index 6288780b779e..e7ce07b3e79b 100644
--- a/arch/mips/kernel/reset.c
+++ b/arch/mips/kernel/reset.c
callbacks functionality that is required for powering-off
devices properly. It also brings resource-managed API for the restart
handler registration that makes PMC driver code cleaner.
Signed-off-by: Dmitry Osipenko
---
drivers/soc/tegra/pmc.c | 87 +
1 file
Replace legacy pm_power_off with kernel_can_power_off() helper that
is aware about chained power-off handlers.
Acked-by: Krzysztof Kozlowski
Reviewed-by: Michał Mirosław
Signed-off-by: Dmitry Osipenko
---
drivers/memory/emif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Signed-off-by: Dmitry Osipenko
---
arch/x86/xen/enlighten_pv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index 5038edb79ad5..af1f6e886225 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen
-by: Dmitry Osipenko
---
include/linux/reboot.h | 4
kernel/reboot.c| 22 ++
2 files changed, 26 insertions(+)
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 7c6e1f308f7c..e5d9ef886179 100644
--- a/include/linux/reboot.h
+++ b/include/linux
Switch to sys-off API that replaces legacy pm_power_off callbacks,
allowing us to remove global pm_* variables and support chaining of
all restart and power-off modes consistently.
Signed-off-by: Dmitry Osipenko
---
drivers/acpi/sleep.c | 16
1 file changed, 12 insertions(+), 4
Signed-off-by: Dmitry Osipenko
---
arch/riscv/kernel/reset.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c
index 9c842c41684a..912288572226 100644
--- a/arch/riscv/kernel/reset.c
+++ b/arch/riscv/kernel
Mirosław
Signed-off-by: Dmitry Osipenko
---
arch/parisc/kernel/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index a6a2a558fc5b..7c37e09c92da 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new sys-off API.
Reviewed-by: Michał Mirosław
Signed-off-by: Dmitry
e can't convert platforms to the new API separately. There are only
two platforms changed here, so it's not a big deal.
Acked-by: Geert Uytterhoeven
Reviewed-by: Michał Mirosław
Signed-off-by: Dmitry Osipenko
---
arch/m68k/emu/natfeat.c | 3 ++-
arch/m68k/include/asm/machdep.
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new sys-off API.
Reviewed-by: Michał Mirosław
Signed-off-by: Dmitry
Signed-off-by: Dmitry Osipenko
---
arch/csky/kernel/power.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/csky/kernel/power.c b/arch/csky/kernel/power.c
index 923ee4e381b8..86ee202906f8 100644
--- a/arch/csky/kernel/power.c
+++ b/arch/csky/kernel/power.c
@@ -9,16 +9,14
Add platform-level registration helpers that will ease transition of the
arch/platform power-off callbacks to the new sys-off based API, allowing
us to remove the global pm_power_off variable in the future.
Signed-off-by: Dmitry Osipenko
---
include/linux/reboot.h | 3 +++
kernel/reboot.c
Add weak stub for the global pm_power_off callback variable. This will
allow us to remove pm_power_off definitions from arch/ code and transition
to the new sys-off based API that will replace the global variable.
Signed-off-by: Dmitry Osipenko
---
kernel/reboot.c | 6 ++
1 file changed, 6
Add do_kernel_power_off() helper that will remove open-coded pm_power_off
invocations from the architecture code. This is the first step on the way
to remove the global pm_power_off variable, which will allow us to
implement consistent power-off chaining support.
Signed-off-by: Dmitry Osipenko
Wrap legacy power-off callbacks into sys-off handlers in order to
support co-existence of both legacy and new callbacks while we're
in process of upgrading legacy callbacks to the new API.
Signed-off-by: Dmitry Osipenko
---
kernel/reboot.c | 44 ++
: Dmitry Osipenko
---
include/linux/reboot.h | 77 +
kernel/reboot.c| 182 +
2 files changed, 259 insertions(+)
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index a2429648d831..05981ef079d8 100644
--- a/include/linux
Add kernel_can_power_off() helper that replaces open-coded checks of
the global pm_power_off variable. This is a necessary step towards
supporting chained power-off handlers.
Signed-off-by: Dmitry Osipenko
---
include/linux/reboot.h | 1 +
kernel/reboot.c| 14 +-
2 files
Add atomic_notifier_call_chain_is_empty() that returns true if given
atomic call chain is empty.
Reviewed-by: Michał Mirosław
Signed-off-by: Dmitry Osipenko
---
include/linux/notifier.h | 2 ++
kernel/notifier.c| 13 +
2 files changed, 15 insertions(+)
diff --git a
Add variant of blocking/atomic_notifier_chain_register() functions that
allow registration of a notifier only if it has unique priority, otherwise
-EBUSY error code is returned by the new functions.
Reviewed-by: Michał Mirosław
Signed-off-by: Dmitry Osipenko
---
include/linux/notifier.h | 5
This preserves old
behaviour for existing drivers once they are converted to the new
API.
Dmitry Osipenko (27):
notifier: Add atomic_notifier_call_chain_is_empty()
notifier: Add blocking/atomic_notifier_chain_register_unique_prio()
kernel/reboot: Introduce sys-off handler API
On 4/20/22 21:47, Rafael J. Wysocki wrote:
+ spin_unlock(&platform_power_off_lock);
+
+ if (ret)
+ return ret;
+
+ ret = register_power_off_handler(&priv->power_off_nb);
+ if (ret)
+ priv->platform_power_off
On 4/20/22 21:47, Rafael J. Wysocki wrote:
+ void (*platform_power_off_cb)(void);
+ void (*simple_power_off_cb)(void *data);
+ void *simple_power_off_cb_data;
>>> Is there any particular reason to put these callbacks here and not
>>> directly into struct sys_off_han
On 4/20/22 21:47, Rafael J. Wysocki wrote:
+/**
+ * devm_register_prioritized_power_off_handler - Register prioritized
power-off callback
+ * @dev: Device that registers callback
+ * @priority: Callback's priority
+ * @callback: Callback function
On 4/20/22 21:47, Rafael J. Wysocki wrote:
+ POWEROFF_PREPARE,
+};
+
+/**
+ * struct power_off_data - Power-off callback argument
+ *
+ * @cb_data: Callback data.
+ */
+struct power_off_data {
+ void *cb_data;
+};
+
+/**
>
On 4/15/22 21:14, Rafael J. Wysocki wrote:
> Honestly, I would prefer this to be split so as to make it easier to
> review if nothing else.
I'll try to split it in v8.
> On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko
> wrote:
>>
>> SoC platforms often have mu
On 4/14/22 14:19, Rafael J. Wysocki wrote:
> On Thu, Apr 14, 2022 at 12:24 AM Dmitry Osipenko
> wrote:
>>
>> On 4/13/22 21:48, Rafael J. Wysocki wrote:
>>> On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko
>>> wrote:
>>>>
>>>> Add sanit
On 4/13/22 21:48, Rafael J. Wysocki wrote:
> On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko
> wrote:
>>
>> Add sanity check which ensures that there are no two restart handlers
>> registered using the same priority. This requirement will become mandatory
>> once al
On 4/12/22 02:38, Dmitry Osipenko wrote:
> Replace legacy pm_power_off with kernel_can_power_off() helper that
> is aware about chained power-off handlers.
>
> Signed-off-by: Dmitry Osipenko
> ---
> drivers/memory/emif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deleti
On 4/12/22 02:38, Dmitry Osipenko wrote:
> Kernel now supports chained power-off handlers. Use do_kernel_power_off()
> that invokes chained power-off handlers. It also invokes legacy
> pm_power_off() for now, which will be removed once all drivers will
> be converted to the new p
On 4/12/22 10:06, Geert Uytterhoeven wrote:
> Hi Dmitry,
>
> On Tue, Apr 12, 2022 at 1:38 AM Dmitry Osipenko
> wrote:
>> Problem
>> ---
>>
>> SoC devices require power-off call chaining functionality from kernel.
>> We have a widely used restart
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/mips
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/ia64
e can't convert platforms to the new API separately. There are only
two platforms changed here, so it's not a big deal.
Acked-by: Geert Uytterhoeven
Signed-off-by: Dmitry Osipenko
---
arch/m68k/emu/natfeat.c | 3 ++-
arch/m68k/include/asm/machdep.h | 1 -
arch/m68k/kernel/proce
: Dmitry Osipenko
---
arch/parisc/kernel/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 28b6a2a5574c..d145184696ea 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -26,6
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Juergen Gross
Signed-off-by: Dmitry
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Guo Ren
Signed-off-by: Dmitry Osipenko
Add sanity check which ensures that there are no two restart handlers
registered using the same priority. This requirement will become mandatory
once all drivers will be converted to the new API and such errors will be
fixed.
Signed-off-by: Dmitry Osipenko
---
kernel/reboot.c | 15
Use devm_register_sys_off_handler() that replaces global
pm_power_off_prepare variable and allows to register multiple
power-off handlers.
Acked-by: Mark Brown
Signed-off-by: Dmitry Osipenko
---
drivers/regulator/pfuze100-regulator.c | 38 ++
1 file changed, 14
All pm_power_off_prepare() users were converted to sys-off handler API.
Remove the obsolete callback.
Signed-off-by: Dmitry Osipenko
---
include/linux/pm.h | 1 -
kernel/reboot.c| 11 ---
2 files changed, 12 deletions(-)
diff --git a/include/linux/pm.h b/include/linux/pm.h
index
e unique priority. Suggested by Guenter Roeck.
- v2 API has power-off chaining disabled by default and require
drivers to explicitly opt-in to the chaining. This preserves old
behaviour for existing drivers once they are converted to the new
API.
Dmitry Osipenko (20):
notifi
Switch to sys-off API that replaces legacy pm_power_off callbacks.
Signed-off-by: Dmitry Osipenko
---
drivers/acpi/sleep.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index c992e57b2c79..426297258e26
Replace legacy pm_power_off with kernel_can_power_off() helper that
is aware about chained power-off handlers.
Signed-off-by: Dmitry Osipenko
---
drivers/memory/emif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/x86/kernel
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/sh/kernel
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Michael Ellerman
Signed-off-by: Dmitry
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Catalin Marinas
Signed-off-by: Dmitry
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Palmer Dabbelt
Signed-off-by: Dmitry
l existing
drivers want, and thus, they could be easily converted to the new API.
Users of the new API should explicitly enable power-off chaining by
setting corresponding flag of the power_handler structure.
Signed-off-by: Dmitry Osipenko
---
include/linux/reboot.h | 229 ++-
ke
Add variant of atomic/blocking_notifier_chain_register() functions that
doesn't allow to register notifier using a duplicated priority. The -EBUSY
error code is returned in this case by the new API functions.
Signed-off-by: Dmitry Osipenko
---
include/linux/notifier.h | 5 +++
k
Add blocking_notifier_call_chain_is_empty() that returns true if call
chain is empty.
Signed-off-by: Dmitry Osipenko
---
include/linux/notifier.h | 2 ++
kernel/notifier.c| 13 +
2 files changed, 15 insertions(+)
diff --git a/include/linux/notifier.h b/include/linux
: Dmitry Osipenko
---
arch/arm/kernel/reboot.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c
index 3044fcb8d073..2cb943422554 100644
--- a/arch/arm/kernel/reboot.c
+++ b/arch/arm/kernel/reboot.c
@@ -116,9 +116,7 @@ void
16.02.2022 23:30, Helge Deller пишет:
> On 2/16/22 13:25, Rafael J. Wysocki wrote:
>> On Tue, Feb 15, 2022 at 11:00 PM Dmitry Osipenko wrote:
>>>
>>> 31.01.2022 02:36, Dmitry Osipenko пишет:
>>>> Problem
>>>> ---
>>>>
>>>
31.01.2022 02:36, Dmitry Osipenko пишет:
> Problem
> ---
>
> SoC devices require power-off call chaining functionality from kernel.
> We have a widely used restart chaining provided by restart notifier API,
> but nothing for power-off.
>
> Solution
>
Switch to sys-off API that replaces legacy pm_power_off callbacks.
Signed-off-by: Dmitry Osipenko
---
drivers/acpi/sleep.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index a60ff5dfed3a..e27ac5b4645b
Use devm_register_sys_off_handler() that replaces global
pm_power_off_prepare variable and allows to register multiple
power-off handlers.
Acked-by: Mark Brown
Signed-off-by: Dmitry Osipenko
---
drivers/regulator/pfuze100-regulator.c | 38 ++
1 file changed, 14
All pm_power_off_prepare() users were converted to sys-off handler API.
Remove the obsolete callback.
Signed-off-by: Dmitry Osipenko
---
include/linux/pm.h | 1 -
kernel/reboot.c| 11 ---
2 files changed, 12 deletions(-)
diff --git a/include/linux/pm.h b/include/linux/pm.h
index
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/mips
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/nds32
Replace legacy pm_power_off with kernel_can_power_off() helper that
is aware about chained power-off handlers.
Signed-off-by: Dmitry Osipenko
---
drivers/memory/emif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/ia64
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/x86/kernel
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko
---
arch/sh/kernel
e can't convert platforms to the new API separately. There are only
two platforms changed here, so it's not a big deal.
Acked-by: Geert Uytterhoeven
Signed-off-by: Dmitry Osipenko
---
arch/m68k/emu/natfeat.c | 3 ++-
arch/m68k/include/asm/machdep.h | 1 -
arch/m68k/kernel/proce
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Michael Ellerman
Signed-off-by: Dmitry
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Juergen Gross
Signed-off-by: Dmitry
: Dmitry Osipenko
---
arch/parisc/kernel/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index ea3d83b6fb62..928201b1f58f 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -26,6
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Catalin Marinas
Signed-off-by: Dmitry
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Palmer Dabbelt
Signed-off-by: Dmitry
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Acked-by: Guo Ren
Signed-off-by: Dmitry Osipenko
l existing
drivers want, and thus, they could be easily converted to the new API.
Users of the new API should explicitly enable power-off chaining by
setting corresponding flag of the power_handler structure.
Signed-off-by: Dmitry Osipenko
---
include/linux/reboot.h | 265 ++-
ke
: Dmitry Osipenko
---
arch/arm/kernel/reboot.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c
index 3044fcb8d073..2cb943422554 100644
--- a/arch/arm/kernel/reboot.c
+++ b/arch/arm/kernel/reboot.c
@@ -116,9 +116,7 @@ void
Add sanity check which ensures that there are no two restart handlers
registered using the same priority. This requirement will become mandatory
once all drivers will be converted to the new API and such errors will be
fixed.
Signed-off-by: Dmitry Osipenko
---
kernel/reboot.c | 15
Add blocking_notifier_call_chain_is_empty() that returns true if call
chain is empty.
Signed-off-by: Dmitry Osipenko
---
include/linux/notifier.h | 2 ++
kernel/notifier.c| 13 +
2 files changed, 15 insertions(+)
diff --git a/include/linux/notifier.h b/include/linux
1 - 100 of 250 matches
Mail list logo