From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 BF8E3C83F27 for ; Wed, 16 Jul 2025 14:28:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 658446B00A3; Wed, 16 Jul 2025 10:28:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 609366B00A6; Wed, 16 Jul 2025 10:28:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F83D6B00A7; Wed, 16 Jul 2025 10:28:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 367C86B00A3 for ; Wed, 16 Jul 2025 10:28:30 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E40FC1A03AB for ; Wed, 16 Jul 2025 14:28:29 +0000 (UTC) X-FDA: 83670358338.27.4D1736B Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf24.hostedemail.com (Postfix) with ESMTP id C2782180008 for ; Wed, 16 Jul 2025 14:28:26 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1752676107; 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:in-reply-to:references:references; bh=xX58NPE0xRXscl8jVAuWc2wtj9mnwN24F2De6k3M+Vw=; b=fiaSaTC7ajuDLCgOuTdHZGQ/Bzq4Ilj+6nDyAxwmC//kIaentf7S8xvxYkYgEfsKm/5q5I Fj10k3kQm68hkaebI1hqIKQQEjMABHObX+Hf/6jKid2WsYI4B0wOpqbV67wn1C9uCfdd0h Drhi2SKuYtrOEpGqv0hEv831PyrjFFg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1752676107; a=rsa-sha256; cv=none; b=mqyaIiSNCPS/JVYRr6kSoeGii1D8PQq+LJcFx2bKgC/fb2YOyyPWcHxRMbQPI7F6/hQbDJ 5xsVOAhyTOGxmYONccQotOj6wKQXIEYkV/EE9Yct7oFIFX+yJGmwfNZtYal0QuO+xOPNLH vFswdecN0+tFm6j9HSL4qXU8gu4oLm8= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4bhz0B1WTPz6GDmd; Wed, 16 Jul 2025 22:27:06 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id B58161400D3; Wed, 16 Jul 2025 22:28:21 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 16 Jul 2025 16:28:20 +0200 Date: Wed, 16 Jul 2025 15:28:18 +0100 From: Jonathan Cameron To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v9 0/2] ACPI: Add support for ACPI RAS2 feature table Message-ID: <20250716152818.00006759@huawei.com> In-Reply-To: <20250617161417.1681-1-shiju.jose@huawei.com> References: <20250617161417.1681-1-shiju.jose@huawei.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml500009.china.huawei.com (7.191.174.84) To frapeml500008.china.huawei.com (7.182.85.71) X-Stat-Signature: z5rzn455c4q117x7es8xrm8ggky1acp8 X-Rspamd-Queue-Id: C2782180008 X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1752676106-922066 X-HE-Meta: U2FsdGVkX1+T+1kC1x+/RYbnDjfifMuhx8cbvtxQfenwpJ9/3Dyd7Wm8DR0gdFqa3N2CEme0ntyU3D8bkio3uDnSqz7K1upxvvuS28QC/OFO2tEpcG95nZu9JQrzAvWPYZnUi+t8chalqThxOV8YRtg5sa4I9zEkKQtfB+M7CGal4R+GVtUZ0oOr4XcHYuoK5f3CjFuoEaTv/TyWiCUoN76pkaDhNbkn4kaMtbgTqtoj/uLg0BWxBuTR7ffWfWZGVCaUVXQDyfKsjt6Q4+dbr0kWkR4W0XQA7vVOMPqy0423HSlCze+M1209rkcRNgaEINR4lnDuVfrN6z+W0/8OYqj840uIr9hn8zBoFrtuad0uS2RioOf0vK0/bqnTM8/qEmMV/kuKa9hi2RkRPRXLhCgj9lyKlIQgsiIqP7qBOAkXlD3mIG3TOoafVSj4RZ2vMqUlh3to30dWX4IPkRzqa38sbT/7x3GWiBYz95YEU0R7a3uJOG4ihVFtjpKDUdQx8rLWo7dvu2w4wV4LIq6JYQd59DoSL4/S8F8zXUNwiyUSZ2+Ht6es6bHPr6tZS+CuzSkRmPXeWvgdhiZFdCWgK3wkzzOkREVys8izR8wavG9KNvgsOG7np61lfSYLMXFDLJEppHs9FDI4ymP37sNo1I0vJuRf5IeWEcoRDFOHKvodL3XcfTlD/ijsxiSkf01om42bAa+oMaCSeu/D1L4GDV7cK2PIjLtG5SAmeQb5GxiyXC9aJpdSAjNrw3EYgAmQkI8il6YbuyAAuJtFSfa83U3toOFlcAV/252xzD33pfGmRAoCsYk+dMJ6NOMhCPgGvYPV8s1Oe3XB7ek6xSX5bVwc24/Ed7LjjV6s/e5Yao+NBYU8YCDJ6puijFRZKNWoTtx407mIS2DYPYSfoi0EyvKDbuVgnycFsXIIYGYr0pHUZS3kIL7L1XpPm0djc9931VEg5DqyM44Wux3AO3n PdVIdgik KzRctQg5QNpA25sjyIKpYSkWjXE4ydrUlQQuhw4XD9kx4KNF+OIxrme+HS6cYyFhC5tFnaVXQsHFsZ6EQel2HeivBetuexNxdFt6DMFGTvBI4dxJjNRVLH/4LxusPXynFubF4zU+UIoncKEUfjJk31g0ipgbOExo2Q3YpjXjikuQQ+dtZHlRe4WISdbNbYMwjD3MW81cjQrUlMeBvjgsQiP5IWIt+JHdW4NIZi+YvtUB/suHPsfdV71HNcYs7K1EGQTGIyiYz1BQ6Rfz44t1mjKm2jUQSusMK4A0oV7JL4/p6hBjlgZdVploMgdBQA5ckwEI4wr9oPODaSOrZsO0f7q22jH+ROdXU3AGMFBnLpoGDJAr8NNisZF4sh3nAP1yTEMdUKFqF7lchQffqVyE4D5skydXiMo9RUbCJL4+7IqLQQtkCno0OUG7VH12J5L+3P6Em 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: List-Subscribe: List-Unsubscribe: On Tue, 17 Jun 2025 17:14:14 +0100 wrote: > From: Shiju Jose > > 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. Hi Rafael, Anything remaining that you are look for wrt to this series? Back in v5 Borislav agreed with suggestion that this series should go through the ACPI tree. https://lore.kernel.org/all/3A6C3FC9-B347-4FA9-BA88-3DAF423853C5@alien8.de/ Thanks, Jonathan > > ACPI RAS2 patches were part of the EDAC series [1]. > > The code is based on linux.git v6.16-rc2 [2]. > > 1. https://lore.kernel.org/linux-cxl/20250212143654.1893-1-shiju.jose@huawei.com/ > 2. https://github.com/torvalds/linux.git > > Changes > ======= > v8 -> v9: > 1. Added following changes for feedback from Yazen. > 1.1 In ras2_check_pcc_chan(..) function > - u32 variables moved to the same line. > - Updated error log for readw_relaxed_poll_timeout() > - Added error log for if (status & PCC_STATUS_ERROR), error condition. > - Removed an impossible condition check. > 1.2. Added guard for ras2_pc_list_lock in ras2_get_pcc_subspace(). > > 2. Rebased to linux.git v6.16-rc2 [2]. > > v7 -> v8: > 1. Rebased to linux.git v6.16-rc1 [2]. > > v6 -> v7: > 1. Fix for the issue reported by Daniel, > In ras2_check_pcc_chan(), add read, clear and check RAS2 set_cap_status outside > if (status & PCC_STATUS_ERROR) check. > https://lore.kernel.org/all/51bcb52c-4132-4daf-8903-29b121c485a1@os.amperecomputing.com/ > > v5 -> v6: > 1. Fix for the issue reported by Daniel, in start scrubbing with correct addr and size > after firmware return INVALID DATA error for scrub request with invalid addr or size. > https://lore.kernel.org/all/8cdf7885-31b3-4308-8a7c-f4e427486429@os.amperecomputing.com/ > > v4 -> v5: > 1. Fix for the build warnings reported by kernel test robot. > https://patchwork.kernel.org/project/linux-edac/patch/20250423163511.1412-3-shiju.jose@huawei.com/ > 2. Removed patch "ACPI: ACPI 6.5: RAS2: Rename RAS2 table structure and field names" > from the series as the patch was merged to linux-pm.git : branch linux-next > 3. Rebased to ras.git: edac-for-next branch merged with linux-pm.git : linux-next branch. > > v3 -> v4: > 1. Changes for feedbacks from Yazen on v3. > https://lore.kernel.org/all/20250415210504.GA854098@yaz-khff2.amd.com/ > > v2 -> v3: > 1. Rename RAS2 table structure and field names in > include/acpi/actbl2.h limited to only necessary > for RAS2 scrub feature. > 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 (2): > ACPI:RAS2: Add ACPI RAS2 driver > ras: mem: Add memory ACPI RAS2 driver > > Documentation/edac/scrub.rst | 73 ++++++ > drivers/acpi/Kconfig | 11 + > drivers/acpi/Makefile | 1 + > drivers/acpi/bus.c | 3 + > drivers/acpi/ras2.c | 450 +++++++++++++++++++++++++++++++++++ > drivers/ras/Kconfig | 11 + > drivers/ras/Makefile | 1 + > drivers/ras/acpi_ras2.c | 424 +++++++++++++++++++++++++++++++++ > include/acpi/ras2.h | 70 ++++++ > 9 files changed, 1044 insertions(+) > create mode 100644 drivers/acpi/ras2.c > create mode 100644 drivers/ras/acpi_ras2.c > create mode 100644 include/acpi/ras2.h >