From patchwork Fri Sep 21 22:17:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10611069 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 6AAC714BD for ; Fri, 21 Sep 2018 22:19:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CCEF2DDC8 for ; Fri, 21 Sep 2018 22:19:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 501362DDD4; Fri, 21 Sep 2018 22:19:03 +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 E8D332DDC8 for ; Fri, 21 Sep 2018 22:19:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C6FC8E0021; Fri, 21 Sep 2018 18:19:01 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9A6238E0001; Fri, 21 Sep 2018 18:19:01 -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 88A888E0021; Fri, 21 Sep 2018 18:19:01 -0400 (EDT) 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 5D0DA8E0001 for ; Fri, 21 Sep 2018 18:19:01 -0400 (EDT) Received: by mail-ot1-f71.google.com with SMTP id p23-v6so13630607otl.23 for ; Fri, 21 Sep 2018 15:19:01 -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:mime-version :content-transfer-encoding; bh=FxGw+iV01oGrcLCTyFbW5iMNYV3xDYX8+cWpbfzyJ0M=; b=sd8LTEf7B4Q7DYgLxMpabXG4JrQx94FBJDyhZOcOGet6OXfICbnhjGAE20UDVfeEnD xNMzfaeLgOSB4Xb2mQeZcVhtYqkl7f5jVq4Ppl30aZdMJzNa++zPiHrqyNr1kEj2Xcj/ 0TFedXhmD04lTPLGAi6cIyo3Ryw8V2k2E4ArShbvFrw/OJwlytM2WclRed/WD59xWb8w QL6NRgxLWPuaO3+ihSzB6omRzD6y8uyoSpYvok2YwFEpawYn9FLjXuAlfffO2zcVooSQ DSwELxaVrT7kRdJRFM0rZKsKh3NHnM2kCEGQ8gXwZ3Hd/qvJWJewoUlCkX6Acy9iOO02 bsgg== 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: APzg51AzzorvivSD1ERm6x/pKCQooed+Hgdox7ZfwLyYNNPjGNA1TxUj lAFtKbh+fEaA0BTjRvtOfjqzkh0j3yZFjk3Ql5Yj1y96EwdIVuhQyQH7CkPbeBpx14Rtps/UOhS OvktdRFfnvwNtbDGlG0DMDGU/ELwWu1GHgu7YLwWmA40QI5WCYyOv80+aoHQM8RN8hg== X-Received: by 2002:a9d:4887:: with SMTP id d7-v6mr26496005otf.94.1537568341167; Fri, 21 Sep 2018 15:19:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYZptVCnZ1hxt6TGgZcDT+tFtYINlLTypEHtQWHpj7apJ4XKOIf05B/8Ju4Yp+TssLxzv8i X-Received: by 2002:a9d:4887:: with SMTP id d7-v6mr26495978otf.94.1537568340363; Fri, 21 Sep 2018 15:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537568340; cv=none; d=google.com; s=arc-20160816; b=DuHCOF9aFOmmP/5x9ECyNErkj9Ht0kFUaU3v8sfCVS7jXVBZSIvEToQaVmYGrxZPY1 Y8+yisew2cK8JUE+WJn3iNqS0A94BFeLV9kzrXzlrtsGeAJTZc+gs4EpViRtYYErBkJV cePegNVHMzLuVRyzRA9krtaSJm4aAdJ+oa1Xvtb6Fc23Z10fZdoje6GhNiG0iscuWD6v HjA7Qhxv0pALhyR8ckCOgNUpuV17r3DzsICDq8Ny//DyMwb/hXv422kIXIKX4WIlTzT3 tk6XB0NF1rU54LURnJT4vqm9KgvUfiRiuhvgl5tz7gWLuXV6N78iL72PWavPvMJXKHs3 HFRA== 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=FxGw+iV01oGrcLCTyFbW5iMNYV3xDYX8+cWpbfzyJ0M=; b=iwyE5gXafEAot/5xQVDv5tfTtxDRX42VhReuF2TU2Q2tMaYJAudeCmkgTI5qZRdKwf wmF/EJxZTEUqfNLhX9VqIgFsbjShl+wGGtPjX3ikSfEtILrB2NH32qngqc63d4BmVw0/ mp2Uo3NtZx6Ba8bA5XGbtdqAzAOYMPvZMF/QW0Iw+Ofi+VOBHH4BrjWJetSngeZJeHom DuIIkyTaCXJDEl1nx4jKCp9BkIo4wUI1YoUQKlVRnKr0gf2AhFwjSpZUSurSUuuEtQBV Ahw2jbIfbSLLs4NAKXcGaj+KTkO2EdcyedGmRBUwADsBswsWEeBsQSDO5oykIxQW0c+4 wBeg== 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 k5-v6si12626985oih.2.2018.09.21.15.19.00 for ; Fri, 21 Sep 2018 15:19:00 -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 EBABF15BF; Fri, 21 Sep 2018 15:18:59 -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 D62BB3F557; Fri, 21 Sep 2018 15:18:56 -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 v6 16/18] ACPI / APEI: Split fixmap pages for arm64 NMI-like notifications Date: Fri, 21 Sep 2018 23:17:03 +0100 Message-Id: <20180921221705.6478-17-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-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 Now that ghes notification helpers provide the fixmap slots and take the lock themselves we can support multiple NMI-like notifications on arm64. These should be named after their notification method. x86's NOTIFY_NMI already is, move it to live with the ghes_nmi list. Change the SEA fixmap entry to be called FIX_APEI_GHES_SEA. Future patches can add support for FIX_APEI_GHES_SEI and FIX_APEI_GHES_SDEI_{NORMAL,CRITICAL}. Signed-off-by: James Morse --- Changes since v3: * idx/lock are now in a separate struct. * Add to the comment above ghes_fixmap_lock_irq so that it makes more sense in isolation. --- arch/arm64/include/asm/fixmap.h | 4 +++- drivers/acpi/apei/ghes.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h index ec1e6d6fa14c..c3974517c2cb 100644 --- a/arch/arm64/include/asm/fixmap.h +++ b/arch/arm64/include/asm/fixmap.h @@ -55,7 +55,9 @@ enum fixed_addresses { #ifdef CONFIG_ACPI_APEI_GHES /* Used for GHES mapping from assorted contexts */ FIX_APEI_GHES_IRQ, - FIX_APEI_GHES_NMI, +#ifdef CONFIG_ACPI_APEI_SEA + FIX_APEI_GHES_SEA, +#endif #endif /* CONFIG_ACPI_APEI_GHES */ #ifdef CONFIG_UNMAP_KERNEL_AT_EL0 diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index a0c10b60ad44..463c8e6d1bb5 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -994,7 +994,7 @@ int ghes_notify_sea(void) int rv; raw_spin_lock(&ghes_notify_lock_sea); - rv = ghes_estatus_queue_notified(&ghes_sea, FIX_APEI_GHES_NMI); + rv = ghes_estatus_queue_notified(&ghes_sea, FIX_APEI_GHES_SEA); raw_spin_unlock(&ghes_notify_lock_sea); return rv; @@ -1025,8 +1025,8 @@ static inline void ghes_sea_remove(struct ghes *ghes) { } #ifdef CONFIG_HAVE_ACPI_APEI_NMI /* - * NMI may be triggered on any CPU, so ghes_in_nmi is used for - * having only one concurrent reader. + * NOTIFY_NMI may be triggered on any CPU, so ghes_in_nmi is + * used for having only one concurrent reader. */ static atomic_t ghes_in_nmi = ATOMIC_INIT(0);