From patchwork Mon Dec 3 18:05: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: 10710231 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 D0FCC1057 for ; Mon, 3 Dec 2018 18:07:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5FFA2B487 for ; Mon, 3 Dec 2018 18:07:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9E852B49D; Mon, 3 Dec 2018 18:07:19 +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=unavailable 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 6321C2B487 for ; Mon, 3 Dec 2018 18:07:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 01F6D6B6A7D; Mon, 3 Dec 2018 13:07:14 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F12FE6B6A7E; Mon, 3 Dec 2018 13:07:13 -0500 (EST) 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 D8EC26B6A7F; Mon, 3 Dec 2018 13:07:13 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by kanga.kvack.org (Postfix) with ESMTP id A91BF6B6A7D for ; Mon, 3 Dec 2018 13:07:13 -0500 (EST) Received: by mail-ot1-f71.google.com with SMTP id 32so5926014ots.15 for ; Mon, 03 Dec 2018 10:07:13 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=gXCbx7FLYJYLoHWmTibUsDbopZnSEkoIoNBLX6Xu06g=; b=Jv98kB/9OaTOT2gmVVo83yU30HyOQAytW9szWLsjprbzijH070SUkAi6MxRmjlI6g5 IWM4+M+2/+6MWfGc5jJzsb0wqfZC7Fz+q9tg8AxwO3m3cec2RVVbIATfk5RLv9EZEJRp layd7rmjEHXrShBBEHiaK2UHIhwF8inqBHROFFhxuwnxiHlC0yhpgKKGfg0PsTsEoPAI Wu1EYv893UTdEnLdUD0RD/U15Q8LfKvrsaOjZWpqCXbPRprVkbbjYiYPhe0coAUTdO0u j5D8sebuJUgUoSx1KqEg1L0a+fpj7Idf8/+VUlc12BjA3Ogba2dXZ1Cpkmaq/rb0V/p+ dQUw== 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: AA+aEWZWNQ0XdD/GF6y1HVOTrDszp06Jzh3dmfVQHqaqAGb7BycDVVc+ Uj9znKzvmUQTlSkjvsAUyf++J3FGr/Q0xF0dHHHU5mqR9RfbWmEd2JItkzaWvgqdMWWiEVCd8xe NSvTbfXuhaqOwq2nii3hJ32jSrCc5Yvg5+GPw+3/qSdYEvd9o8U94h//gDA9t5v8+8w== X-Received: by 2002:a9d:18f:: with SMTP id e15mr11373458ote.84.1543860433373; Mon, 03 Dec 2018 10:07:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/XZQ3rJcpBLeMeNSAB6kYDJprPEWKaunuUeD/6AjnQy+Jt61rlYGVk2xKBvn74hlCyLCyd2 X-Received: by 2002:a9d:18f:: with SMTP id e15mr11373429ote.84.1543860432733; Mon, 03 Dec 2018 10:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543860432; cv=none; d=google.com; s=arc-20160816; b=E88xv6ukPAU6TIX0ZGnjKF9JPqYq0l4LDH8ix9gGdcfzUY7IKtHPXpVz2ICK6W93iE ngIIyI1Blw2iMq9JN41vlb8scCnIk4MvqfJTrnu4l/w0/8QURwkwrAZ5gX7jiqL1XuSU I2neaGjv7//1MpmjHn2aNTAfHHi0CYMRHYEkKy6oB/BY5Pz379dfY2FKeCxfvWCXvBo9 HyN4WWFX38RJYZ0BImyLjY+x/avm3u2LDSKdBEc4jWCesDNwda55VGj0SI99mIPfNvsx 0qy6caLMrGwmB55OHCQMRHu5uRuL1Xhg+kD4oXI1EJ8XrQl9KjLWql5hjTnzQnDPywr2 nhxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=gXCbx7FLYJYLoHWmTibUsDbopZnSEkoIoNBLX6Xu06g=; b=Q/YD7hHdegguP44u0NwrTHwnW2dlQCWJxuLbV8Y1tO1bRz7s8KUBxhPc+IJT85OHhE qoKrYiZVoRzX9imMQ09+r/F3NYziZYv2UZLL2YHpy+VK97+wRDZLeU80/l7DQywUowy3 Fi2uSLA/DffDOD5LwF+ewCuMdsJNIZ5wB5Qa4wgALdNefVhfkfM04tCB3QbpjUzJTJPf 4j2jiy6i5UVcVnNmF7dL478rgwvQH2UrFFkSJjWMlDBLLCl1ko/x8+uCxlBtmbb2hUDR hCbhrzB8tHZuEg2RYq0yxviZjrdDvRVm/pznmye2wDYlwtJrkt7IVvmWTW+qxoMsyfgd FzQg== 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 (usa-sjc-mx-foss1.foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id c127si6302024oib.58.2018.12.03.10.07.12 for ; Mon, 03 Dec 2018 10:07:12 -0800 (PST) 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 F15271713; Mon, 3 Dec 2018 10:07:11 -0800 (PST) Received: from eglon.cambridge.arm.com (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2D90F3F59C; Mon, 3 Dec 2018 10:07:09 -0800 (PST) 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 , Dongjiu Geng , Xie XiuQi , Fan Wu , James Morse Subject: [PATCH v7 10/25] ACPI / APEI: Tell firmware the estatus queue consumed the records Date: Mon, 3 Dec 2018 18:05:58 +0000 Message-Id: <20181203180613.228133-11-james.morse@arm.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181203180613.228133-1-james.morse@arm.com> References: <20181203180613.228133-1-james.morse@arm.com> MIME-Version: 1.0 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 ACPI has a GHESv2 which is used on hardware reduced platforms to explicitly acknowledge that the memory for CPER records has been consumed. This lets an external agent know it can re-use this memory for something else. Previously notify_nmi and the estatus queue didn't do this as they were never used on hardware reduced platforms. Once we move notify_sea over to use the estatus queue, it may become necessary. Add the call. This is safe for use in NMI context as the read_ack_register is pre-mapped by ghes_new() before the ghes can be added to an RCU list, and then found by the notification handler. Signed-off-by: James Morse --- drivers/acpi/apei/ghes.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 366dbdd41ef3..15d94373ba72 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -926,6 +926,10 @@ static int _in_nmi_notify_one(struct ghes *ghes) __process_error(ghes); ghes_clear_estatus(ghes, buf_paddr); + if (is_hest_type_generic_v2(ghes) && ghes_ack_error(ghes->generic_v2)) + pr_warn_ratelimited(FW_WARN GHES_PFX + "Failed to ack error status block!\n"); + return 0; }