mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>,
	Josef Bacik <josef@toxicpanda.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"kernel-team@fb.com" <kernel-team@fb.com>
Subject: Re: [PATCH][RESEND] Revert "PM: ACPI: reboot: Use S5 for reboot"
Date: Thu, 18 Mar 2021 16:59:41 +0100	[thread overview]
Message-ID: <03dba78e-4271-ac60-3d7f-a07924735049@intel.com> (raw)
In-Reply-To: <CAAd53p6Lp8+S0yjWi=MikQJ_zywiWamUS5p19oKoqB6uYW8jzg@mail.gmail.com>

On 3/18/2021 6:42 AM, Kai-Heng Feng wrote:
> On Thu, Mar 18, 2021 at 1:25 AM Josef Bacik <josef@toxicpanda.com> wrote:
> [snipped]
>> "shutdown now" works fine with and without your patch.  Thanks,
> Rafael,
> Please revert the patch while we are working on it.

Done, thanks!


> Josef,
> Can you please test the following patch:
>
> diff --git a/kernel/reboot.c b/kernel/reboot.c
> index eb1b15850761..263444a3fb38 100644
> --- a/kernel/reboot.c
> +++ b/kernel/reboot.c
> @@ -233,6 +233,15 @@ void migrate_to_reboot_cpu(void)
>          set_cpus_allowed_ptr(current, cpumask_of(cpu));
>   }
>
> +static void kernel_shutdown_prepare(enum system_states state)
> +{
> +       blocking_notifier_call_chain(&reboot_notifier_list,
> +               (state == SYSTEM_HALT) ? SYS_HALT : SYS_POWER_OFF, NULL);
> +       system_state = state;
> +       usermodehelper_disable();
> +       device_shutdown();
> +}
> +
>   /**
>    *     kernel_restart - reboot the system
>    *     @cmd: pointer to buffer containing command to execute for restart
> @@ -243,7 +252,7 @@ void migrate_to_reboot_cpu(void)
>    */
>   void kernel_restart(char *cmd)
>   {
> -       kernel_restart_prepare(cmd);
> +       kernel_shutdown_prepare(SYSTEM_POWER_OFF);
>          if (pm_power_off_prepare)
>                  pm_power_off_prepare();
>          migrate_to_reboot_cpu();
> @@ -257,14 +266,6 @@ void kernel_restart(char *cmd)
>   }
>   EXPORT_SYMBOL_GPL(kernel_restart);
>
> -static void kernel_shutdown_prepare(enum system_states state)
> -{
> -       blocking_notifier_call_chain(&reboot_notifier_list,
> -               (state == SYSTEM_HALT) ? SYS_HALT : SYS_POWER_OFF, NULL);
> -       system_state = state;
> -       usermodehelper_disable();
> -       device_shutdown();
> -}
>   /**
>    *     kernel_halt - halt the system
>    *
>
>> Josef



  reply	other threads:[~2021-03-18 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17  2:17 Josef Bacik
2021-03-17  2:50 ` Kai-Heng Feng
2021-03-17 15:19   ` Josef Bacik
2021-03-17 16:14     ` Kai-Heng Feng
2021-03-17 17:25       ` Josef Bacik
2021-03-18  5:42         ` Kai-Heng Feng
2021-03-18 15:59           ` Rafael J. Wysocki [this message]
2021-03-18 19:02           ` Josef Bacik
2021-03-19 16:23             ` Kai-Heng Feng
2021-07-12 17:03               ` Kai-Heng Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03dba78e-4271-ac60-3d7f-a07924735049@intel.com \
    --to=rafael.j.wysocki@intel.com \
    --cc=josef@toxicpanda.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®