From patchwork Fri Sep 21 22:16:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10611159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E3E9913 for ; Fri, 21 Sep 2018 22:41:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BD9F2DC8C for ; Fri, 21 Sep 2018 22:41:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BDF32DCB4; Fri, 21 Sep 2018 22:41:22 +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,RCVD_IN_DNSWL_NONE 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 B1E8A2DC8C for ; Fri, 21 Sep 2018 22:41:21 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=GHVWytlmdNDNJg2/7Abjy5c1AhnsFaxc269/RoWkVlI=; b=PBYxLfHsA2l5Lz Efzml7tswC65klyoOYI1qoGmHxd8lhM9EhxdjyLlr8sthNMOLG0YeUj+E3VziAfatZ3tCg1F3189A g0V6/91nAuX+lqGfaICfsGorq1xiMCZp/MrQt0RCdaRmsq7weJhsn1UM8yumBrG4U7wp4LoPtzO4+ 1Yi79oBlN5lhHOcgJ41DXA3FcC9RqPZpVd/iSbHJRqQ9OKd2j0qpMRBRypns/1W3tV3k+CzBGbK6m LnzkQiMnYXNWXt4osBYTMPF+T+2NFDyfJsYTRcOofR7qDvQKZ6lrcxh/7wggfn4PItkZiRLDQbjje wkFU7o/DF4iabPkZqvxw==; 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 1g3U6n-0001sk-7n; Fri, 21 Sep 2018 22:41:09 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3U4q-0008In-G4 for linux-arm-kernel@bombadil.infradead.org; Fri, 21 Sep 2018 22:39:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=l5JGnkBBXH8lQz6scfVyIXH0qZPR0stWI9sdTV4O/R0=; b=ky7vOeVjx8uOoxtJWDq1n5dsc6 d7itWROvKdbVVJug2hjFRUII7NnshnGgeHlXqlHAqqjgRZaVOapEQfCyhL0tMRFmvIToQi46GovQr RMIxTy6rIKxztre5N+HUagdO4cSYb6P5ROcgNnS7B/D3rptLP7skTHkDnTU7B+OrZSRS4Z1OAZ9dq io6uNWct/hqXQvcX8g/1digodgOBwc2DKSNB61sTVOOtGZsj4Kzc5Ccz1ksDipGqIMl3lNVE5cN5M 1+uc4wUJUm47e5inhXnBrzQDHy57gTMgIjE9QwM7PMSuaxMKopopVEi5fyQXEWwC0DNrklpcmeDfy FWrcY1gg==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3Tl8-0002B4-7k for linux-arm-kernel@lists.infradead.org; Fri, 21 Sep 2018 22:18:47 +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 4C0051596; Fri, 21 Sep 2018 15:18:35 -0700 (PDT) Received: from melchizedek.Emea.Arm.com (melchizedek.emea.arm.com [10.4.12.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3765B3F557; Fri, 21 Sep 2018 15:18:32 -0700 (PDT) From: James Morse To: linux-acpi@vger.kernel.org Subject: [PATCH v6 11/18] ACPI / APEI: Remove silent flag from ghes_read_estatus() Date: Fri, 21 Sep 2018 23:16:58 +0100 Message-Id: <20180921221705.6478-12-james.morse@arm.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180921221705.6478-1-james.morse@arm.com> References: <20180921221705.6478-1-james.morse@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180921_181846_402158_52C7D428 X-CRM114-Status: GOOD ( 15.93 ) 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 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 586689cbc0fd..ba5344d26a39 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -300,7 +300,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; @@ -309,7 +309,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); @@ -342,7 +342,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; @@ -729,7 +729,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; } @@ -863,7 +863,7 @@ static int ghes_proc(struct ghes *ghes) int rc; struct acpi_hest_generic_status *estatus = ghes->estatus; - 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;