From patchwork Thu Mar 8 00:36:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balbir Singh X-Patchwork-Id: 882898 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zxWpc4Pl0z9s8k for ; Thu, 8 Mar 2018 11:38:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iCD9+Idz"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zxWpc2RpXzF1jM for ; Thu, 8 Mar 2018 11:38:48 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iCD9+Idz"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::241; helo=mail-pf0-x241.google.com; envelope-from=bsingharora@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iCD9+Idz"; dkim-atps=neutral Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zxWlm3GJCzF1cp for ; Thu, 8 Mar 2018 11:36:20 +1100 (AEDT) Received: by mail-pf0-x241.google.com with SMTP id d26so1658814pfn.5 for ; Wed, 07 Mar 2018 16:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WslO30jBQnY7HTpPeZQpOhV6mpSL0w5BzM0SfFPGHiI=; b=iCD9+IdzbbFx8tJ8rbSx8/6oMO5tyRaxzjfp6ueqK4Ft8ZXcUFphx5lQNvl0cUnS8X xQdxRQyZdDVmnukrxgndcyKuqKeFCFnW/rIiE5rhPHUoq6nQqdtxcCvVCO/PWSthCTDq /qWjcGOFNWwLuvBNGywKNdJOujKA4p2QzfZYQokapJyQeBM66PrssUo9qLjqY5ecvIvP gt++Y4jXXDq+iQT7vD3GYQs8LBUDq0txi2DHsn2puBdcXV84l0rP9HB1ZgT61Fo6Xvqm hMd0eKXZPNouSr4w2kwaGiv7SoXM1DlVPwp3/DI4Q+2pNrZ8ttJyBjfJ9musrdHmsmdH csdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WslO30jBQnY7HTpPeZQpOhV6mpSL0w5BzM0SfFPGHiI=; b=JJO1LwLSNLE9+1YIbdxKSOJenO54RaQqGQ2AaIFrO2fY7fKBOPqMuApCxHf1nx1lZF Br1aL7Z7e9LCzDN5oDLroUMCAJwtNL+5JII7XCD41ZE0J93QNuOybqtzUnoHVz2QmKW2 Bq+QhyLm2BEMwRqnfeI8jlhkHYNdxlMkYxo4ix2O+2kdUcoSYoLjMEVWRRwjUw4cteZt mAlkQYOP1VkIvz7cuxBT3adtkjxB+nl5hnd6Udrjw45aK7FFEcq0jBFsLrNSRxQOMRkA LheoBKb8CFVY/pcuWqCLd4meHMSGdkldH4Z2HrFE5Ruw9emNk2zv9yOyGd+C05dE7DzU fFLw== X-Gm-Message-State: APf1xPBbizIUmnMKF57nMFSYBRQ8kNdV6mn97f16OzOG9HljTI6BXOso i/zg8iiXPBroYc3XeqtlG6help30 X-Google-Smtp-Source: AG47ELsTCZw7JZnD0nDDlfZSbaJ2QkxILT0vvp6cruuRiT60ufgNnK8saqbt/TuUseAqgeWy+nhxFQ== X-Received: by 10.98.166.85 with SMTP id t82mr24211023pfe.237.1520469377771; Wed, 07 Mar 2018 16:36:17 -0800 (PST) Received: from balbir.ozlabs.ibm.com ([122.99.82.10]) by smtp.googlemail.com with ESMTPSA id r28sm37177536pfl.9.2018.03.07.16.36.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Mar 2018 16:36:16 -0800 (PST) From: Balbir Singh To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/powernv/mce: Don't silently restart the machine Date: Thu, 8 Mar 2018 11:36:06 +1100 Message-Id: <20180308003606.10721-1-bsingharora@gmail.com> X-Mailer: git-send-email 2.13.6 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: npiggin@gmail.com Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" On MCE the current code will restart the machine with ppc_md.restart(). This case was extremely unlikely since prior to that a skiboot call is made and that resulted in a checkstop for analysis. With newer skiboots, on P9 we don't checkstop the box by default, instead we return back to the kernel to extract useful information at the time of the MCE. While we still get this information, this patch converts the restart to a panic(), so that if configured a dump can be taken and we can track and probably debug the potential issue causing the MCE. Signed-off-by: Balbir Singh Reviewed-by: Nicholas Piggin Reviewed-by: Stewart Smith --- Changelog - Change panic to use the passed msg, instead of a hard coded MCE one, since this code path is common to both HMI's and MCE's arch/powerpc/platforms/powernv/opal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index c15182765ff5..516e23de5a3d 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c @@ -490,9 +490,12 @@ void pnv_platform_error_reboot(struct pt_regs *regs, const char *msg) * opal to trigger checkstop explicitly for error analysis. * The FSP PRD component would have already got notified * about this error through other channels. + * 4. We are running on a newer skiboot that by default does + * not cause a checkstop, drops us back to the kernel to + * extract context and state at the time of the error. */ - ppc_md.restart(NULL); + panic(msg); } int opal_machine_check(struct pt_regs *regs)