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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 7CB06C2B9F4 for ; Thu, 17 Jun 2021 17:57:31 +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 41BD460E09 for ; Thu, 17 Jun 2021 17:57:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41BD460E09 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com 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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WbUwClxIC3ndPBtEzcPwCaZsPjxJoKxYi/NPiUMUt8U=; b=lX3YFqiRptmRnt iczeuKldBq5/ZbAdJ4zZmeGmJ2fkoVjULgig5LSbBaQLNhnFLxZA9pNHPPUpglojRtMjFO18yNFmc EZHpZYgZSxa2sT8TbTcUDWsfwiBtath8Z+YLt9dEvnuxFbX2o7IyCuAMkEcZz42kMXEluotkn8u8D /BbE3A2TYdY2bTlccCrao5EiZ/g/bCbz/NhcguF16B0K9m9x+JhphQJA65JITv4duvVoDKNXtjPIU fl1tYI+etGXDCWbiVqPrV3TYTJB8erHMAuNewkT0UVGWlXm7KZmDBflhtogzdwIjdYqcCaJ0jbUse NU1EZL+tzuiiwklXEJkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltwF4-00BITk-UA; Thu, 17 Jun 2021 17:55:51 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltwF1-00BISu-4B for linux-arm-kernel@lists.infradead.org; Thu, 17 Jun 2021 17:55:48 +0000 Received: by mail-ej1-x632.google.com with SMTP id l1so11349737ejb.6 for ; Thu, 17 Jun 2021 10:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kHu5Ahvm2uB8SGRZwVpZNQgeW8VrebWqIEGoVFu7Q1M=; b=OVLgJXxUYJSrzHC9qdffaG5ci3Y5z5DGNfdrMuVRW54CDY7mQKOU62hMMiZWKVxOiP 3ZDIdwQdNB90jvwPCxldI3KiSFWXg2vAHlwo7q7zlNwGElN5HHqG5U4iM7b8+j9vlrJo xQDLRLj1VhLMxIBx5H6Br38QDQk7wN+PEoD69InlDgIhW53TorL4pd900woA6ENeGQUC yNd5A8tBGxa/0BOJzLAzSz2gdZhRVea7CkAGvM38Ydxe7hS3phPBrmDqbxQarHOqR2Fz 1c9fCcUHm//WZbtr8ZtqUYrXL9xtPJmXOCWaq9EcGATLGFlamz7YOezT1DjSEbriMiWl KIVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kHu5Ahvm2uB8SGRZwVpZNQgeW8VrebWqIEGoVFu7Q1M=; b=ZSCAgdeZCPmTJPnj8Ks5diGIaCtKcOiqpFZOK4R/YiyUb36VH9mb009OVAsGhNM/Aw eVotBrCQYsF/fo9YeMxEaJjOT4C5GIForPbVaeh9O3Gtpr16Vb9Vs8+C77IOSB4qDAma CCc4P9UcpLLT1brUhuMYU2j6lOcF4wF05/p4qi0NM2DmJG+r8e7xQjUN736Esz6EIXid tsFOtfJ61fgKZ/o94Ev80qKZjyZDk+uMrSSpsdTd3gYdnhrtirjwPkV6HZXviNusMgLR iQ+AMoebRw/wa5l9a8K1eQw3htxAI+mBGQzgnaRJvpNb12iOrsLSml2+gHcd8Hv2tuZF DN4w== X-Gm-Message-State: AOAM530xaJJzEweJswwZVeVzh/r21EMjtl3yX3ACTR5xTM2MkPZo+EXF Y/H3ByVSpvE7EKI/8d7tmkqwHgtLs25pPj8HiFMwKg== X-Google-Smtp-Source: ABdhPJwE7H3RXK6EO2DKCbwxfygjufL5WjIME92jT5JermGYHiYsNDCKgk/9PyjNHwMW5xOTwNkcsFPFmaUhx8PEESo= X-Received: by 2002:a17:907:270c:: with SMTP id w12mr6647326ejk.175.1623952544562; Thu, 17 Jun 2021 10:55:44 -0700 (PDT) MIME-Version: 1.0 References: <20210617125023.7288-1-shijie@os.amperecomputing.com> <20210617175211.GE24813@willie-the-truck> In-Reply-To: <20210617175211.GE24813@willie-the-truck> From: Pavel Tatashin Date: Thu, 17 Jun 2021 13:55:08 -0400 Message-ID: Subject: Re: [PATCH] arm64: kexec: flush log to console in nmi_panic() To: Will Deacon Cc: Huang Shijie , Catalin Marinas , tabba@google.com, Ard Biesheuvel , Mark Rutland , Linux ARM , LKML , patches@amperecomputing.com, zwang@amperecomputing.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210617_105547_328775_E87F04BA X-CRM114-Status: GOOD ( 17.64 ) 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 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. > > Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel