Re: [PATCH 08/44] kernel: Move pm_power_off to common code

Pavel Machek
2014-10-09T10:38:47Z

Hi!

> @@ -184,6 +179,8 @@ machine_halt(void)
> void
> machine_power_off(void)
> {
> + do_kernel_poweroff();
> +

poweroff -> power_off for consistency.

> index c4f50a3..1da27d1 100644
> --- a/arch/blackfin/kernel/reboot.c
> +++ b/arch/blackfin/kernel/reboot.c
> @@ -106,6 +107,7 @@ void machine_halt(void)
> __attribute__((weak))
> void native_machine_power_off(void)
> {
> + do_kernel_poweroff();
> idle_with_irq_disabled();
> }
>

So here we handle do_kernel_poweroff() returning,

> diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
> index b78498e..eaafad0 100644
> --- a/arch/cris/kernel/process.c
> +++ b/arch/cris/kernel/process.c
> @@ -60,6 +57,7 @@ void machine_halt(void)
>
> void machine_power_off(void)
> {
> + do_kernel_poweroff();
> }
>

Here we don't.

> diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
> index 5d40aeb77..a673725 100644
> --- a/arch/frv/kernel/process.c
> +++ b/arch/frv/kernel/process.c
> @@ -107,6 +104,8 @@ void machine_power_off(void)
> gdbstub_exit(0);
> #endif
>
> + do_kernel_poweroff();
> +
> for (;;);
> }
>

And here we do.

What is right?
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html