Message ID | 20250402120230.596-1-shiju.jose@huawei.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 549CDC36017 for <linux-mm@archiver.kernel.org>; Wed, 2 Apr 2025 12:03:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B84DB280005; Wed, 2 Apr 2025 08:02:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFC6C280001; Wed, 2 Apr 2025 08:02:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92680280005; Wed, 2 Apr 2025 08:02:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 710DD280001 for <linux-mm@kvack.org>; Wed, 2 Apr 2025 08:02:59 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 2658D1CD505 for <linux-mm@kvack.org>; Wed, 2 Apr 2025 12:03:01 +0000 (UTC) X-FDA: 83288967762.06.9BE85C6 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf16.hostedemail.com (Postfix) with ESMTP id 18B29180011 for <linux-mm@kvack.org>; Wed, 2 Apr 2025 12:02:58 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf16.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743595379; a=rsa-sha256; cv=none; b=NTWI+GYkpw8juB2KR5TH/QXPxcMKzqeFovKmU4bbC/JtXDzHaipOLMFGiZk00ZvWSyiljo A1sde+qlnnxnTjYixQaCfnRRJln4jfko7GaB2ORWg3MNgsweiF1D/RTbKvB+69GfPOJ0os 2poQCI4wNAEp33tjOQQXCi1LXjCJmLY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf16.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743595379; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=ePxiGu+e7E3+pygSSq5hMCtCGsGZ7Yk4+/6DvMLhjo8=; b=Ch4gS38Axlr6/wtxkBxszM8iwj2/koTp0NMntvUlgQ/a+QPEm/i3Wa2v1mgp5GEu8ZbHqh Nzmv9eXtegxznQ9LwSe4eNebguJDqGqeS/z5msAPNCssaFG/Bb/i60OijAj/gurRTu71Ns 6b/wH6AZOsFXQTQFhpEJMBzNa7XQHRg= Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ZSNh25PrKz6M4my; Wed, 2 Apr 2025 19:59:14 +0800 (CST) Received: from frapeml500007.china.huawei.com (unknown [7.182.85.172]) by mail.maildlp.com (Postfix) with ESMTPS id 852EB140736; Wed, 2 Apr 2025 20:02:53 +0800 (CST) Received: from P_UKIT01-A7bmah.china.huawei.com (10.126.171.80) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 2 Apr 2025 14:02:51 +0200 From: <shiju.jose@huawei.com> To: <linux-edac@vger.kernel.org>, <linux-acpi@vger.kernel.org>, <linux-doc@vger.kernel.org> CC: <bp@alien8.de>, <rafael@kernel.org>, <tony.luck@intel.com>, <lenb@kernel.org>, <leo.duran@amd.com>, <Yazen.Ghannam@amd.com>, <mchehab@kernel.org>, <jonathan.cameron@huawei.com>, <linux-mm@kvack.org>, <linuxarm@huawei.com>, <rientjes@google.com>, <jiaqiyan@google.com>, <Jon.Grimm@amd.com>, <dave.hansen@linux.intel.com>, <naoya.horiguchi@nec.com>, <james.morse@arm.com>, <jthoughton@google.com>, <somasundaram.a@hpe.com>, <erdemaktas@google.com>, <pgonda@google.com>, <duenwen@google.com>, <gthelen@google.com>, <wschwartz@amperecomputing.com>, <dferguson@amperecomputing.com>, <wbs@os.amperecomputing.com>, <nifan.cxl@gmail.com>, <tanxiaofei@huawei.com>, <prime.zeng@hisilicon.com>, <roberto.sassu@huawei.com>, <kangkang.shen@futurewei.com>, <wanghuiqiang@huawei.com>, <shiju.jose@huawei.com> Subject: [PATCH v3 0/3] ACPI: Add support for ACPI RAS2 feature table Date: Wed, 2 Apr 2025 13:02:26 +0100 Message-ID: <20250402120230.596-1-shiju.jose@huawei.com> X-Mailer: git-send-email 2.43.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.171.80] X-ClientProxiedBy: lhrpeml100009.china.huawei.com (7.191.174.83) To frapeml500007.china.huawei.com (7.182.85.172) X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 18B29180011 X-Stat-Signature: job9uz4kz54npnbdedq8tmcsuappsmt9 X-HE-Tag: 1743595378-411431 X-HE-Meta: U2FsdGVkX1+cFn8OPBhkD9cEP1J1oKYBwyOy1UY6Q5rYORjK2T1XqXkX6913W75UeWz/xC90LIb/tNp+CEdsJSv+NBSvtolIHyejU5qxLtN2l1kr6UvjTirugbYfIyyaOTuTViclxns/rcJ0FXH+PAnWyvQ1+hm0YaWRnlSvn7UB8tsz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+jM3 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
ACPI: Add support for ACPI RAS2 feature table
|
expand
|
From: Shiju Jose <shiju.jose@huawei.com> Add support for ACPI RAS2 feature table (RAS2) defined in the ACPI 6.5 specification, section 5.2.21 and RAS2 HW based memory scrubbing feature. ACPI RAS2 patches were part of the EDAC series [1]. The code is based on ras.git: edac-cxl branch [2]. 1. https://lore.kernel.org/linux-cxl/20250212143654.1893-1-shiju.jose@huawei.com/ 2. https://web.git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git/log/?h=edac-cxl Changes ======= v2 -> v3: 1. Rename RAS2 table structure and field names in include/acpi/actbl2.h limited to only necessary for RAS2 scrub feature. Not for merging. Corresponding changes are merged in the acpica: https://github.com/acpica/acpica/commit/2c8a38f747de9d977491a494faf0dfaf799b777b 2. Changes for feedbacks from Jonathan on v2. 3. Daniel reported a known behaviour: when readback 'size' attribute after setting in, returns 0 before starting scrubbing via 'addr' attribute. Changes added to fix this. 4. Daniel reported that firmware cannot update status of demand scrubbing via the 'Actual Address Range (OUTPUT)', thus add workaround in the kernel to update sysfs 'addr' attribute with the status of demand scrubbing. 5. Optimized logic in ras2_check_pcc_chan() function (patch - ACPI:RAS2: Add ACPI RAS2 driver). 6. Add PCC channel lock to struct ras2_pcc_subspace and change lock in ras2_mem_ctx as a pointer to pcc channel lock to make sure writing to PCC subspace shared memory is protected from race conditions. v1 -> v2: 1. Changes for feedbacks from Borislav. - Shorten ACPI RAS2 structures and variables names. - Shorten some of the other variables in the RAS2 drivers. - Fixed few CamelCases. 2. Changes for feedbacks from Yazen. - Added newline after number of '}' and return statements. - Changed return type for "ras2_add_aux_device() to 'int'. - Deleted a duplication of acpi_get_table("RAS2",...) in the ras2_acpi_parse_table(). - Add "FW_WARN" to few error logs in the ras2_acpi_parse_table(). - Rename ras2_acpi_init() to acpi_ras2_init() and modified to call acpi_ras2_init() function from the acpi_init(). - Moved scrub related variables from the struct ras2_mem_ctx from patch "ACPI:RAS2: Add ACPI RAS2 driver" to "ras: mem: Add memory ACPI RAS2 driver". Shiju Jose (3): ACPI: ACPI 6.5: RAS2: Rename RAS2 table structure and field names ACPI:RAS2: Add ACPI RAS2 driver ras: mem: Add memory ACPI RAS2 driver Documentation/edac/scrub.rst | 76 +++++++ drivers/acpi/Kconfig | 11 + drivers/acpi/Makefile | 1 + drivers/acpi/bus.c | 3 + drivers/acpi/ras2.c | 420 +++++++++++++++++++++++++++++++++++ drivers/ras/Kconfig | 11 + drivers/ras/Makefile | 1 + drivers/ras/acpi_ras2.c | 406 +++++++++++++++++++++++++++++++++ include/acpi/actbl2.h | 16 +- include/acpi/ras2.h | 51 +++++ 10 files changed, 988 insertions(+), 8 deletions(-) create mode 100644 drivers/acpi/ras2.c create mode 100644 drivers/ras/acpi_ras2.c create mode 100644 include/acpi/ras2.h