Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3390451ybp; Sun, 6 Oct 2019 10:53:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyI7uHduY9nDbT3ZxgM4LK209AMnKMC3O66P9It/fr6mOnqvIu2jvpAzEoTPCfm6IGqsY93 X-Received: by 2002:a05:6402:a50:: with SMTP id bt16mr25126855edb.114.1570384405602; Sun, 06 Oct 2019 10:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570384405; cv=none; d=google.com; s=arc-20160816; b=PwiPQzLkhThv+XXEbwF8UQOCMw0+lSC27A79fFg6jRDu3SP0d08USt82owUrAR8g0F YPTcv1QFzLSfemYAQYgg4zvZNTgl2FqRajXEIly0FHY7MZKEB7TAVBeZURog933LJZG8 tblrQ9n2Ha/BGf9mB9oez7iPERROMlM2P87IF5TfD2NLwTgm9kBfIZ2je1gURaVYHuFS O49+a5Sosihnh3bovsmq5TuNKgmPuc7m5YhvO6XqvNIU1uC2b7Jnh5fjplqXezrNuOEE iP8406T7OUm7AZuTznfQol0JvTB6tjvHLxUXcCvX9zA5/k10Rti+8Yax9kRyzX2YbBZ2 yPyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3pVuO8GyXj6CrJqQoVlXwSYKZpL+mh1RuX7UmoBAOLc=; b=Cq0cmJTFjMzM3up+GZWuiP/1j7OVLDHAzJ/kSAAQCy2ELcxt4ImoWbEjzyxvC43dge qcFzGtN6hpFMeoAOH4pRaS3hkXoYXdoFPMw2gwA9JOVA5kSVzlvcsFDYU/E5bUF6QaUy v3oIZn6JF5JQLJGtQuzSfCIG5J+lQbChluuYfQHNmV21bci+NM57LKMpy7p0Tyht2nzT DuU7S0S1cXAqJyye5b1s9QW6SU8kCyzXEr6MUIZeAhxnvjIByx0nvw/V026d6GJkl3zP 0lDx2Ht1+6BZGPXf4NdTVGDLxlLGP9WOpo3u4mAnap8HleYo5QdKHpEXkHkpuY7S/YbO 59hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z7Xf81rJ; 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 c14si6993177edc.81.2019.10.06.10.53.02; Sun, 06 Oct 2019 10:53:25 -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; dkim=pass header.i=@kernel.org header.s=default header.b=z7Xf81rJ; 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 S1730680AbfJFRis (ORCPT + 99 others); Sun, 6 Oct 2019 13:38:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:38138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730664AbfJFRio (ORCPT ); Sun, 6 Oct 2019 13:38:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A01EF217D6; Sun, 6 Oct 2019 17:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383524; bh=7DJSolCrQCCDsfBhpfU09oTsWICrh81yjcangCFS3fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z7Xf81rJLMz7i5TfoUgVx/5Hhn46rjih+KqEH2BBcvmaaQrK/AySVJin4fYVXglIq h8hsinKZBRYSLu8DVuXQxjpkIWXa8i62gDo49WncFU0bN5GWB3Er3yW3A4mphd3+9W Ey3HgJSrfKrOa/BjYtGijrYQg9hwmgdbyoY2Jwes= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mahesh Salgaonkar , Nicholas Piggin , Ganesh Goudar , Michael Ellerman , Sasha Levin Subject: [PATCH 5.2 083/137] powerpc: dump kernel log before carrying out fadump or kdump Date: Sun, 6 Oct 2019 19:21:07 +0200 Message-Id: <20191006171215.763091783@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171209.403038733@linuxfoundation.org> References: <20191006171209.403038733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ganesh Goudar [ Upstream commit e7ca44ed3ba77fc26cf32650bb71584896662474 ] Since commit 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path"), pstore dmesg file is not updated when dump is triggered from HMC. This commit modified system reset (sreset) handler to invoke fadump or kdump (if configured), without pushing dmesg to pstore. This leaves pstore to have old dmesg data which won't be much of a help if kdump fails to capture the dump. This patch fixes that by calling kmsg_dump() before heading to fadump ot kdump. Fixes: 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path") Reviewed-by: Mahesh Salgaonkar Reviewed-by: Nicholas Piggin Signed-off-by: Ganesh Goudar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190904075949.15607-1-ganeshgr@linux.ibm.com Signed-off-by: Sasha Levin --- arch/powerpc/kernel/traps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 47df30982de1b..c8ea3a253b815 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -472,6 +472,7 @@ void system_reset_exception(struct pt_regs *regs) if (debugger(regs)) goto out; + kmsg_dump(KMSG_DUMP_OOPS); /* * A system reset is a request to dump, so we always send * it through the crashdump code (if fadump or kdump are -- 2.20.1