From patchwork Tue Jun 26 17:00:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10489589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0230960386 for ; Tue, 26 Jun 2018 17:03:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E155328684 for ; Tue, 26 Jun 2018 17:03:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEEDD2870F; Tue, 26 Jun 2018 17:03:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A8EB28684 for ; Tue, 26 Jun 2018 17:02:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34F896B026C; Tue, 26 Jun 2018 13:02:05 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2FE386B026D; Tue, 26 Jun 2018 13:02:05 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1ED896B026E; Tue, 26 Jun 2018 13:02:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f69.google.com (mail-oi0-f69.google.com [209.85.218.69]) by kanga.kvack.org (Postfix) with ESMTP id EA22B6B026C for ; Tue, 26 Jun 2018 13:02:04 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id x132-v6so7613461oif.21 for ; Tue, 26 Jun 2018 10:02:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=fyEklVKFJiQMaYvPRcJlVydlfnAtR7lBv4+ac1ZUd8k=; b=oNa5WJK0EHO35eLd/l45UxRD2Qmue0CHwGf6l2snIh88lMZin0YXLWHFbpnmrLVQgO Hjgzy8DoZTJEB+Y5P87nXxT9WshYbo8TIB+x1D+9hi0QLKH5eiFoyR3Obf9hwOivo0Ue I231BIyglhUMTFhC+yPy2nvK2ssFOJTkOjSb8tjJrmXJhyhYTu6wHF+Ypoht4tzYVGd4 VvC4Ipze78/s3N5qTmo6NRk0yiVVnHT3jCDj3vFHsQ7l1BWvBuRUevwIYcVCh5pnFck+ KFOybwXVlVgoook3xiNBWBJC5m0a36DGEQY6EEt2OtYpMbSGlpmKf6jXhZxBGDrbqtLw /fNw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of james.morse@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=james.morse@arm.com X-Gm-Message-State: APt69E1d4haaGHiJq4oA/2YyftrkPrVjeZ0bN98mbgRyzfPUsBX7ApLm DNbe6BDsl88paYhP6yfwVQRlQ9SmalIN2nUrXKQ+A7szkkISbMeOHpIlJIm+eyI6Ajfh//uEQur a3KPLY+tIrn+kgRxNUfIl5sPAVTmVuBmGTToDjO37FwHpZKvNfYASvgv+rB0p2j2QVw== X-Received: by 2002:aca:f356:: with SMTP id r83-v6mr1252735oih.257.1530032524654; Tue, 26 Jun 2018 10:02:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcCPBhfW1dxdvD2FIojbjDPxF3F7y0g6mqSQBIpRP36SZ2wlAbiOur+ldGqXF797dyJk1hH X-Received: by 2002:aca:f356:: with SMTP id r83-v6mr1252681oih.257.1530032523578; Tue, 26 Jun 2018 10:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530032523; cv=none; d=google.com; s=arc-20160816; b=OiJv7pe8JKx5PTJJM5B/0Y9ezhyKl4w0RWQ6u3hcLtA70DWEAz00NxHt1jEzqs1sWP dHJHzxoxpNOzXdk3sJ0az2c5DvzizktKm3+YWnnH4tLKhLKqM2j+E7O4dp+nPmYQjg2n wYzcRbnxZXRKB+J8J9QG5q50+uGjHtbIfK+6QoE0gqnGsnxScB8+kRO1ulo0ASHzGfln LoQ2JicJ0v54+EhBbF6uQx+XA/W84sniGj0XX8QM5sqxg/On3oWDByxb9nAu/5S1772L Gc0Xmqo1BbGytgfkYd65ja/1HeaO5VFd0mln15Smxv78Sn6W7Qnvn0hMwNePW1L5eV0t 4bpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fyEklVKFJiQMaYvPRcJlVydlfnAtR7lBv4+ac1ZUd8k=; b=F+jXa2BqEvG/8ScBKnQsPkEP8+c7ywnpgGRQlsyFuTZnm3uKEC4+rt4aaICufejohq OtKDDoNp4gpjO4VSfjYT2RyCjduQqkvr24j0r4thYJLInF3jJI2hboxPeU4NQD6MGC5W 4fRiVnVqtdSU/FdauPsK8q9i3Jngoe+sn8vO9YFZhvqedJAyNgOAEeI+VYLYsYLQsUMl KHVGbVI5hMYJmh86wFo42pXs9dTLfFTdaqaQjYU8jXu2dRp8GPbaoUo71aHc5yN86rJ2 nOrWDXsMeT8PdcAs9w38w1YOITAId1+ALXGeccMv+sWldOfSIHWB16oZHXRrNFPAzokP R4vQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of james.morse@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=james.morse@arm.com Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id d80-v6si677975oig.163.2018.06.26.10.02.03 for ; Tue, 26 Jun 2018 10:02:03 -0700 (PDT) Received-SPF: pass (google.com: domain of james.morse@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of james.morse@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=james.morse@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 25A641682; Tue, 26 Jun 2018 10:02:03 -0700 (PDT) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.206.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 280733F318; Tue, 26 Jun 2018 10:01:58 -0700 (PDT) From: James Morse To: linux-acpi@vger.kernel.org Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, Borislav Petkov , Marc Zyngier , Christoffer Dall , Will Deacon , Catalin Marinas , Naoya Horiguchi , Rafael Wysocki , Len Brown , Tony Luck , Tyler Baicar , Dongjiu Geng , Xie XiuQi , Punit Agrawal , jonathan.zhang@cavium.com, James Morse Subject: [PATCH v5 03/20] ACPI / APEI: don't wait to serialise with oops messages when panic()ing Date: Tue, 26 Jun 2018 18:00:59 +0100 Message-Id: <20180626170116.25825-4-james.morse@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180626170116.25825-1-james.morse@arm.com> References: <20180626170116.25825-1-james.morse@arm.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP oops_begin() exists to group printk() messages with the oops message printed by die(). To reach this caller we know that platform firmware took this error first, then notified the OS via NMI with a 'panic' severity. Don't wait for another CPU to release the die-lock before we can panic(), our only goal is to print this fatal error and panic(). This code is always called in_nmi(), and since 42a0bb3f7138 ("printk/nmi: generic solution for safe printk in NMI"), it has been safe to call printk() from this context. Messages are batched in a per-cpu buffer and printed via irq-work, or a call back from panic(). Link: https://patchwork.kernel.org/patch/10313555/ Acked-by: Borislav Petkov Signed-off-by: James Morse --- drivers/acpi/apei/ghes.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 29d863ff2f87..d7c46236b353 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -758,9 +757,6 @@ static int _in_nmi_notify_one(struct ghes *ghes) sev = ghes_severity(ghes->estatus->error_severity); if (sev >= GHES_SEV_PANIC) { -#ifdef CONFIG_X86 - oops_begin(); -#endif ghes_print_queued_estatus(); __ghes_panic(ghes); }