Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3912657yba; Tue, 9 Apr 2019 07:21:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwErsEJ030yVDgp+zA7Lb9OxeCA8TAdyhvSJ8soTXuhgISdi7QMClMBron0uI3rMu7PHVIV X-Received: by 2002:a63:ff66:: with SMTP id s38mr35267287pgk.120.1554819672965; Tue, 09 Apr 2019 07:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554819672; cv=none; d=google.com; s=arc-20160816; b=qXJFkf+zrgV3E6kUGPtZkeZjEP3zNy/Jg77yrIx79zDbBCM8DUTx4Z6adNHtSraEMT 4dfiQsIYIZSJsBtoFTmwSDtvLCk/n1QAPgASCwYBANgYUVdsmsDolzkH9r0/GlF/NEiM xyiZhJihcz/noZUetwlj0sFOvNyyeYmGCvoEoV0J533ULFsCaX6QrOmvrLL8yrIfTgq+ s8hRFY6LbsgGPfk9KR0ilHaUJthygPSjoR2ffnPXa55FyCRMlw01i7V0Rzvi/z8Ic3G/ OgTzH3samkAWEg9IhXcXHZltJvcU6jRg/0qSdQusr+ohIqKQPzscYr8FlTLX17+yP3SR D7MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lwD4YjirQLSZjqNOUh4mNGw4xyEZkT/F3tx/9RRHYfQ=; b=qNeX4YpnVr5s2XgDH1/EGfdTqbQ5dSEtsEl8n43NgFKCe1coIjjr0iVwb5R4rYQPNz 5kT4MHaQaoQWngcnQmx8mhNCUjJPi6rTO8FvueedXd+oQ8461trmwhMZ9quo/8b9Whzi aFuGdDVepf+fnX3FoiFu1eq3t3Ksd+FhPtOZLUi93P5RiVR296j46nqgZpVA8x6cw3Jc KVnUztHyutsBCND0hN/6prHUeaE7+iJPwiSaVqn4GDMK+agqVEyL8xYw0f5fFfug35z+ W5yRI8fc7OCKVHgZlmkmLX3OobhHyhlCNU7UheBwJDKHMv6MUDQzWvLT2hCkr+UBGMRR 1zRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c184si8746251pga.578.2019.04.09.07.20.56; Tue, 09 Apr 2019 07:21:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbfDIOSr (ORCPT + 99 others); Tue, 9 Apr 2019 10:18:47 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:38968 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726456AbfDIOSq (ORCPT ); Tue, 9 Apr 2019 10:18:46 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC69EA78; Tue, 9 Apr 2019 07:18:45 -0700 (PDT) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B94653F68F; Tue, 9 Apr 2019 07:18:44 -0700 (PDT) Date: Tue, 9 Apr 2019 15:18:42 +0100 From: Will Deacon To: Jinyoung Park Cc: Catalin Marinas , Alex Van Brunt , Ketan Patil , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] arch: arm64: process: Unlock console after SMP stopped Message-ID: <20190409141842.GF2990@fuggles.cambridge.arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > Signed-off-by: Jinyoung Park > --- > 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 > #include > #include > +#include > > #include > #include > @@ -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(); Hmm, why don't other architectures seem to do this? Will