From patchwork Tue Jun 26 17:01:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10489613 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 7274D60542 for ; Tue, 26 Jun 2018 17:04:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F92528236 for ; Tue, 26 Jun 2018 17:04:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53F0C28426; Tue, 26 Jun 2018 17:04:02 +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 163D3287BE for ; Tue, 26 Jun 2018 17:02:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD8036B027E; Tue, 26 Jun 2018 13:02:37 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D5E7D6B027F; Tue, 26 Jun 2018 13:02:37 -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 C4E466B0280; Tue, 26 Jun 2018 13:02:37 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by kanga.kvack.org (Postfix) with ESMTP id 9B0246B027E for ; Tue, 26 Jun 2018 13:02:37 -0400 (EDT) Received: by mail-oi0-f71.google.com with SMTP id u11-v6so1044616oif.22 for ; Tue, 26 Jun 2018 10:02:37 -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=2snB6Gf0rib5NV/PjvXcvxR8RPqrvfVhNqEA7WTISFk=; b=DxC/l51PEkDJw2pqQ2b7JxJiiPVMP2KNQP0HOzmpXEMIWv6n/e7mklg6+1ppTPc1pP 9cobEbHm60NxB86KQZk0vWyCXnHjZKQnWMSYVbMM0OJb3tO06c33YJSHWTBEcxBLXTlV X+uQxhyIU9eQDxod029VedXwwoC15LlIC3OxhNAk2df3go/1itCpU8HCkkR8jC5ragy6 f4z54nAsaeSvp07+lpHTPacxD395OcTmfER+PzFJ8dYKDiJzBsTiS4Q0uBHc3Cfais9A ZBrgP8MYvz2oZSrH1irw3DJ2K/x587rjGivEbrmV7E+KbVmkMa2zS7fM7Pe/wNVK6cyN h2mQ== 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: APt69E04radSKfwmoQrvxOYEHz3VFnr5Mt/E/2K6iKSUTjSBq6E1jnel lGWs/ckPce2vVuQDQX5W1ItcBngDDW3hQVPl/Pr8uXkAdnHdMP/k+BLgjMLhfpBUeAUZcuSfT4e pnKW6+HnAPxSw+v0DqOjX/xlr5DtTKrzYxHJDghARBiFfoe0RCGnKL1v2Px4QJfO4Kw== X-Received: by 2002:a9d:1dbc:: with SMTP id y57-v6mr1259086otd.370.1530032557418; Tue, 26 Jun 2018 10:02:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpecFuYNlW4l9UMvcNq6QO9HM4RAIeI/WzKxUtRRrk3vhsMVLYfvS5aO4IV1J8486ed6/abC X-Received: by 2002:a9d:1dbc:: with SMTP id y57-v6mr1259006otd.370.1530032555794; Tue, 26 Jun 2018 10:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530032555; cv=none; d=google.com; s=arc-20160816; b=clVM42mYsAzK5nsHWoa4/Xj0LLVlzDqVwCzBeyAKrX8V3+hwevfxR+H0p7x/l2DlSQ DZMUajBfgz8wM0diqb+qVJW+jni8ZCTC4tD5HJm3ip+35aeUdQhE8zndUTq1k7taA7j7 28AZ8AUjG61o7za+oGGr5ElasyD5oAUE0bz51TgPkMq2gzulj9voDECTUpZvHJLAWHOv VLZM2RpW+jKt6Fxwft0TsrEJRjU24ums/hc8O7t6pkeA4TU2D9i3Vtycr3zRANvtER/Z LOelXRbrhIm8I4iN0xwhX5FPV7po8V/g4saVaxVNNOyIyB8H+cMFm63IkV68naqSYYIL DpyQ== 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=2snB6Gf0rib5NV/PjvXcvxR8RPqrvfVhNqEA7WTISFk=; b=C57IOfvQI+vYx7fOBxQ5KQt6IZweH7YGIZl61MEegg5rJSeutmeiEuWnBZukuYF5q5 P9VzIaWr6KqF/Nr4CDCtmp5YCu248qChQ0luouEKJFHlHz8lir5eQMmAWiFjkZ2vV+Gs ghI+aYDc1V8tSK1W6h+uB6QjUCGv9dpN6KXGEh0rfjioUPYroG1TxEQvFPSUyRFm6pbO +2CP3K4z8BxDQo6thoFaMKLBNSaNLTyqQVKVodgoR113wpgXUK6U9PkpGD2jRcEcauEg SeTi/wE+AdmhDEMynBal8zxaTxlRdf8rU7LNolaeNhbtsY+E+6qgmzWnJkrESwZAF4jx /rUQ== 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 f143-v6si669992oih.58.2018.06.26.10.02.35 for ; Tue, 26 Jun 2018 10:02:35 -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 74D8022BE; Tue, 26 Jun 2018 10:02:35 -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 DF5A23F318; Tue, 26 Jun 2018 10:02:31 -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 11/20] ACPI / APEI: Remove silent flag from ghes_read_estatus() Date: Tue, 26 Jun 2018 18:01:07 +0100 Message-Id: <20180626170116.25825-12-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 Subsequent patches will split up ghes_read_estatus(), at which point passing around the 'silent' flag gets annoying. This is to suppress prink() messages, which prior to 42a0bb3f7138 ("printk/nmi: generic solution for safe printk in NMI"), were unsafe in NMI context. We don't need to do this anymore, remove the flag. printk() messages are batched in a per-cpu buffer and printed via irq-work, or a call back from panic(). Signed-off-by: James Morse --- drivers/acpi/apei/ghes.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 9bb00a06ba6e..7b412508b3ea 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -291,7 +291,7 @@ static void ghes_copy_tofrom_phys(void *buffer, u64 paddr, u32 len, static int ghes_read_estatus(struct ghes *ghes, struct acpi_hest_generic_status *estatus, - int silent, int fixmap_idx) + int fixmap_idx) { struct acpi_hest_generic *g = ghes->generic; u64 buf_paddr; @@ -300,7 +300,7 @@ static int ghes_read_estatus(struct ghes *ghes, rc = apei_read(&buf_paddr, &g->error_status_address); if (rc) { - if (!silent && printk_ratelimit()) + if (printk_ratelimit()) pr_warning(FW_WARN GHES_PFX "Failed to read error status block address for hardware error source: %d.\n", g->header.source_id); @@ -333,7 +333,7 @@ static int ghes_read_estatus(struct ghes *ghes, rc = 0; err_read_block: - if (rc && !silent && printk_ratelimit()) + if (rc && printk_ratelimit()) pr_warning(FW_WARN GHES_PFX "Failed to read error status block!\n"); return rc; @@ -720,7 +720,7 @@ static int _in_nmi_notify_one(struct ghes *ghes, int fixmap_idx) int sev; struct acpi_hest_generic_status *estatus = ghes->estatus; - if (ghes_read_estatus(ghes, estatus, 1, fixmap_idx)) { + if (ghes_read_estatus(ghes, estatus, fixmap_idx)) { ghes_clear_estatus(ghes, estatus, fixmap_idx); return -ENOENT; } @@ -857,7 +857,7 @@ static int ghes_proc(struct ghes *ghes) spin_lock_irqsave(&ghes_notify_lock_irq, flags); - rc = ghes_read_estatus(ghes, estatus, 0, FIX_APEI_GHES_IRQ); + rc = ghes_read_estatus(ghes, estatus, FIX_APEI_GHES_IRQ); if (rc) goto out;