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: 10489779 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 AF1FF6023A for ; Tue, 26 Jun 2018 17:14:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9223A212D5 for ; Tue, 26 Jun 2018 17:14:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85AE528779; Tue, 26 Jun 2018 17:14:04 +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,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 34F71212D5 for ; Tue, 26 Jun 2018 17:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Dh4Ao6IVeF4SmwDs2MsVxeRRcOobCTvwNbykgZFLrEs=; b=CZ7oYmnKZ4M1jNz/bnAmiDVKSh P2mTu/Dtp6MfUh7gUvGdwHdGKdzw8QjrKmoRK5EgP3JCrORpnHa3UsJc567aeP5KK16nmlSWM/OlU YkhwHeaK1IXRdcQiOxZnh95L7S3EZYmbtmVULkDtJuIPlniLkZkjj1oxOndbr8hsW6wpMpDQQuj7Y zCCPAWstufaz0UzHjtNW/iOH/P7ky1/vAbSckBZEvhNjToGmJfiMP4Ff7vptKREu8tGEawv87uMk4 SpRzVEtGWHdF1sDZUGoFJqKr+bO5MHnZ3I14KJA3U9kodCWSAemsj1mSsXh6DQCCYAgmg+ZxPEmYD 1MPQ0A6g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXrXN-0008Tk-6g; Tue, 26 Jun 2018 17:13:53 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXrV3-0006oq-Lj for linux-arm-kernel@bombadil.infradead.org; Tue, 26 Jun 2018 17:11:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2snB6Gf0rib5NV/PjvXcvxR8RPqrvfVhNqEA7WTISFk=; b=nJmrxlKqYVuuZVTM13nvDNGR1 tspl/SwPQTSz9gLwfvYdGmthyJXH44Ka2IAu+SHDtqoCKuLdcWjTx/DK6Mql04oSA0sh9i+g7Z/ie REyjUHBt1BK/caos0Y8Hg/t7dphydVeIHzIyXw3yx60TBiPhlfAZUhQWaLkGGwU1ugZrESwKGbs4c u68x3NZnaCnMTeJRtXPKLSYTy83xOimx2kHnTujkLLFfrocdhBxDsOl6a6rkfgPHueRyk8n02xgM+ 3872PPSMfRyH7gj0h7xkJog65+4hud9t/tNpiSk9ub6iFpxoiKbD0b8wtHt7vMmo3XBKLjq3Oggjs fK9ocgprw==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXrMc-0007kY-DF for linux-arm-kernel@lists.infradead.org; Tue, 26 Jun 2018 17:02:48 +0000 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180626_180246_646392_AD8838AD X-CRM114-Status: GOOD ( 12.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jonathan.zhang@cavium.com, Rafael Wysocki , Tony Luck , Punit Agrawal , Xie XiuQi , Marc Zyngier , Catalin Marinas , Tyler Baicar , Will Deacon , Christoffer Dall , Dongjiu Geng , linux-mm@kvack.org, Borislav Petkov , James Morse , Naoya Horiguchi , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Len Brown MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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;