From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00621C48BE5 for ; Thu, 17 Jun 2021 18:00:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C67EF613CE for ; Thu, 17 Jun 2021 18:00:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C67EF613CE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=61fEvue1+YL70tyICb+dOCSK3lO4NmGFpy+hGM9bT8M=; b=Rsa1pCy2D2baUY icOb3OHrbyHdGCsLG0TfLnfp7eJnJo1NwZkNwPBRknPRZrD62A5gNXqjOT3I9/R2lddg6PK3bg9Ve F5efht6oVEiHKtGvHM3JDpOnTyUQlfbLLYbibdt/wQ3jwFS43uF74+heTw5glnv37otL4T0QBzxOO VEnnp50Cx6W/a9XNzGwXP7KeBW/+xWSdT9NBLilB60s4PCHHLCW7exDhKiE+jmHzFL4f3PlxUTIXA KXeZIvbP1fwN0auZBiTmpIVguoKAmowfzenp/cngIMAeDSouIwgpPAbUVZnZePsvENotYS6aae5xb MAIx5txWs/MI5Nw6Ibrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltwHh-00BJ0I-Cf; Thu, 17 Jun 2021 17:58:33 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltwHd-00BIyM-AW for linux-arm-kernel@lists.infradead.org; Thu, 17 Jun 2021 17:58:30 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4F490613CE; Thu, 17 Jun 2021 17:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623952709; bh=rUjI764QttB/GaYGInrf4Tbe3/WWS/GT+QlHLDq6rwc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M0QIfx4jt+jacagR6M6LJC3xQiHe796rittntIFM1prryAJ+TaikDFLq84l6AzUdj pPIWyoKbMjXeDPlFRUVp+UQJOu7j7qgpJZcNbYvetfWCbstYxKyH9h1+Q4Wf6NG9Js xQFMQyGqfWUpMsdR0NsHkwnJThihlAWqSCMDQ07svg8cAMAez0TdRLfSCnSTwMW+KR Cw8aTUE9Ckqqgxy8LsfC83kp2WnFZkPGQ5k2LsNESurM9VAKROrqF7TYwbGGNcdPft cfK1aoBJDgZ1I6eQBqCZfDjw9/RRTNUmTKWUu5VO9W4wrCaOZ+hlnPjFTbty5E2SdB 0ZSkF2y/loFiQ== Date: Thu, 17 Jun 2021 18:58:23 +0100 From: Will Deacon To: Pavel Tatashin Cc: Huang Shijie , Catalin Marinas , tabba@google.com, Ard Biesheuvel , Mark Rutland , Linux ARM , LKML , patches@amperecomputing.com, zwang@amperecomputing.com Subject: Re: [PATCH] arm64: kexec: flush log to console in nmi_panic() Message-ID: <20210617175822.GG24813@willie-the-truck> References: <20210617125023.7288-1-shijie@os.amperecomputing.com> <20210617175211.GE24813@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210617_105829_433998_2306CE7D X-CRM114-Status: GOOD ( 19.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 17, 2021 at 01:55:08PM -0400, Pavel Tatashin wrote: > On Thu, Jun 17, 2021 at 1:52 PM Will Deacon wrote: > > > > On Thu, Jun 17, 2021 at 12:50:23PM +0000, Huang Shijie wrote: > > > If kdump is configured, nmi_panic() may run to machine_kexec(). > > > > > > But in NMI context, the log is put in PER-CPU nmi_print_seq. > > > So we can not see any log on the console since we entered the NMI context, > > > such as the "Bye!" in previous line. > > > > > > This patch fixes this issue by two steps: > > > 1) Uses printk_safe_flush_on_panic() to flush the log from > > > nmi_print_seq to global printk ring buffer, > > > 2) Then uses console_flush_on_panic() to flush to console. > > > > > > After this patch, we can see the "Bye!" log in the panic console. > > > > Does it matter? I'd be more inclined to remove the print altogether... > > I agree, the print could be removed entirely. But, my assumption was > that this patch meant to flush other buffered prints beside this last > "Bye" one. That sounds like something which should be done in the core code, rather than the in the architecture backend (and looks like panic() might do this already?) Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel