Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp851513pxj; Thu, 17 Jun 2021 15:39:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpkqxriUUvtJIvj+wQFmnvUfKAwzqkKeFP7Jk1vN4SfFGBVK+M3aXaGuzV5U18uW5nv/rw X-Received: by 2002:a17:907:6f2:: with SMTP id yh18mr7676244ejb.5.1623969547115; Thu, 17 Jun 2021 15:39:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623969547; cv=none; d=google.com; s=arc-20160816; b=K5TJtf4abXyUi3GEgRI12/dUz6/DqO2n4D89jwCKWfvOvfJNpJXEhCMesT58JZ2yUV hwYYw/rl+LEOISHj3hH/SYDrKEPI2U4xn8byz51CpXM0woM7cAU5J9Eb3T2M/LZs3WLb tN4PaAr6aBMq3g9Tcw46Lwa0DMPPkK8p610+pl33NQxECySS3blBHeOFNkLXM/NmC8bh u5dF4/HdZNxZSj0doYZUwoHsHtlgPhqP68tKMJ0paaYt42+5Prs3e6aD77BE7zLR3XTL x+9vmm6xPo7OaNIU4CUknePsr3Lvqu7TKkvz5Ecx0408qtHQoEkbKw1Y1rMqB8H41MnS gSUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Fqj6yBCUXzWHGADNsSz9lpwtsNpAk8R1H7qidHs8SXo=; b=jQNZB3Uoksz23jZBIGS4vVBTy/lTDluMwstixm2NVCFfK7xPuxnPhmcV9cgFaTk3Ls nDWMgjyhVS5u6IFaYd/3yw7zi4xlhe1tKi8urwuQm1Ut33V2jKnOCc9oiv1v0QEJY80J VhvYF3uxpU8zsaAit8P2sjgxsmxl2uKQovf0/LCemtghM9qFUgVYQwhJVjAEMZyL03RX 3BNbC4joy4VHE6RsVceKDTpgVjX4G9KssmbB7Dt4NkG1VUoK74wEJXwMeX9NY8Gj5CKt 2Y+OZUbXSdqv/nHXILv5A+B/9iNMIeIEHrYoC2Tie/zTPidra6RVnWpm93evZSba2nvG SN9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gb9Jq4uT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si6717935edw.182.2021.06.17.15.38.45; Thu, 17 Jun 2021 15:39:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gb9Jq4uT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232723AbhFQRyY (ORCPT + 99 others); Thu, 17 Jun 2021 13:54:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:35874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231249AbhFQRyY (ORCPT ); Thu, 17 Jun 2021 13:54:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6D08B613CB; Thu, 17 Jun 2021 17:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623952336; bh=4IX1e5vIdk5jwOpCXbPzGqSlbvv8WHJXrcPwl/Cstyo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gb9Jq4uTBja3jdpcJXl5FC7w7GgbxiRKthiWD8XiTytdCYvCEK1X/f+M1Yb2KGdWa UCkNbgprmLLtNuK/MYvmUhamlnwxkYtZNy0aF94mFcx7chVnek85R49kh+FcLfJqSc AZRLS4/8bvRYFzJXH2VueT594nvegHBqRbPPWRnfTOXQFrAbU7H2Gv3RZKWn0CzN37 euVhP3B4iHWFXCAQeGiYFUANk8xnLxDuKmSAHFD83nncKIsXJMP1pC7w1M1O43z2Wd TqJ/3HacfpUV4MgByZl2s6g+p5fs5TatKDrhvCtp9M7evCL/vl03LduY8bbRkrN7P5 N0zZwcIJ8c2aA== Date: Thu, 17 Jun 2021 18:52:11 +0100 From: Will Deacon To: Huang Shijie Cc: catalin.marinas@arm.com, tabba@google.com, ardb@kernel.org, mark.rutland@arm.com, pasha.tatashin@soleen.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@amperecomputing.com, zwang@amperecomputing.com Subject: Re: [PATCH] arm64: kexec: flush log to console in nmi_panic() Message-ID: <20210617175211.GE24813@willie-the-truck> References: <20210617125023.7288-1-shijie@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210617125023.7288-1-shijie@os.amperecomputing.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... Will