mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Jinyoung Park <gt.jypark@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Alex Van Brunt <avanbrunt@nvidia.com>,
	Ketan Patil <ketanp@nvidia.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] arch: arm64: process: Unlock console after SMP stopped
Date: Tue, 9 Apr 2019 15:21:12 +0100	[thread overview]
Message-ID: <20190409142112.mcvzdxigjfxnzrb4@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAMfhKb-PNYrEqc6S=AJKRvfwUU61x4La6dM-1EsxoCa69et6eQ@mail.gmail.com>

On Tue, Apr 09, 2019 at 11:17:14PM +0900, Jinyoung Park wrote:
> If the console lock is held by other CPU running while the system is
> restarting or shutting down, the Kernel messages in the printk log buffer
> can not be printed out to the console drivers. The Kernel messages can be
> lost or messed up.
> This change calls console_unlock after SMP stopped to flush the kernel
> messages in the printk log buffer to the console drivers.

I think you need to explain how we can get to each of these points
while the current CPU is holding the console lock - and why this is
only an ARM64 problem (or why you are only fixing this on ARM64 and
not any of the other architectures.)

> 
> Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
> ---
>  arch/arm64/kernel/process.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
> index 3767fb21a5b8..d629a75c7602 100644
> --- a/arch/arm64/kernel/process.c
> +++ b/arch/arm64/kernel/process.c
> @@ -49,6 +49,7 @@
>  #include <trace/events/power.h>
>  #include <linux/percpu.h>
>  #include <linux/thread_info.h>
> +#include <linux/console.h>
> 
>  #include <asm/alternative.h>
>  #include <asm/arch_gicv3.h>
> @@ -164,6 +165,7 @@ void machine_halt(void)
>  {
>   local_irq_disable();
>   smp_send_stop();
> + console_unlock();
>   while (1);
>  }
> 
> @@ -177,6 +179,7 @@ void machine_power_off(void)
>  {
>   local_irq_disable();
>   smp_send_stop();
> + console_unlock();
>   if (pm_power_off)
>   pm_power_off();
>  }
> @@ -195,6 +198,7 @@ void machine_restart(char *cmd)
>   /* Disable interrupts first */
>   local_irq_disable();
>   smp_send_stop();
> + console_unlock();
> 
>   /*
>   * UpdateCapsule() depends on the system being reset via
> -- 
> 2.19.0
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

  parent reply	other threads:[~2019-04-09 14:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 14:17 Jinyoung Park
2019-04-09 14:18 ` Will Deacon
2019-04-09 14:21 ` Russell King - ARM Linux admin [this message]
2019-04-11  6:28   ` Jinyoung Park
2019-04-12  7:26     ` Fwd: " Jinyoung Park

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=20190409142112.mcvzdxigjfxnzrb4@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=avanbrunt@nvidia.com \
    --cc=catalin.marinas@arm.com \
    --cc=gt.jypark@gmail.com \
    --cc=ketanp@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.deacon@arm.com \
    /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®