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 A32D8C3ABC3 for ; Mon, 12 May 2025 08:16:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B6A686B00D1; Mon, 12 May 2025 04:16:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B163A6B00D2; Mon, 12 May 2025 04:16:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B8086B00D3; Mon, 12 May 2025 04:16:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 799A06B00D1 for ; Mon, 12 May 2025 04:16:52 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 34C85C0866 for ; Mon, 12 May 2025 08:16:53 +0000 (UTC) X-FDA: 83433549906.30.1BC4509 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf10.hostedemail.com (Postfix) with ESMTP id DA878C0002 for ; Mon, 12 May 2025 08:16:50 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1747037811; 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=luD8e1MM/Dp3zzl4cr18gTPQZIIUp/4ARn32RCJA3lc=; b=zFZlUBagULe0pc7SKibc1TlRApC+L9pG42AQ55jER3gQnS2cEyyXjvKmFbD+LilqVglUzL iiSuYNsiyD86hSFCJXjHF0plfu5Vf3hdR6jMwL101+1+Adq2hrXYi8VpLUWOS3oiA+sp9f FohDTvMsyTbVOu3+gsuB5gaYWL2Sh00= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1747037811; a=rsa-sha256; cv=none; b=nvdEuRxq0GOfnLjXN4ZG7hYBvtu5bQtHpAYEB/S8fykZEIvUeEHK/6xHJCCzGZK5mkDOnC 2VIyNi07QMxftWAdc3H7tHcy5Mr9go7jooJQP8GeKg0ju6dousMgoMs3ZV+ibRg51dlZ8k hEYRlZEOIO5QBoRuHW4PCaaA9g5JQPc= Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ZwslY2thcz6M4h0; Mon, 12 May 2025 16:12:09 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 0054C1404F4; Mon, 12 May 2025 16:16:48 +0800 (CST) Received: from localhost (10.48.146.192) 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; Mon, 12 May 2025 10:16:45 +0200 Date: Mon, 12 May 2025 09:16:44 +0100 From: Jonathan Cameron To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v5 0/2] ACPI: Add support for ACPI RAS2 feature table Message-ID: <20250512091644.00001598@huawei.com> In-Reply-To: <20250507214344.709-1-shiju.jose@huawei.com> References: <20250507214344.709-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.48.146.192] X-ClientProxiedBy: lhrpeml100011.china.huawei.com (7.191.174.247) To frapeml500008.china.huawei.com (7.182.85.71) X-Stat-Signature: djtwmgzezye493kqrpyhqiua7gzi3yxs X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: DA878C0002 X-HE-Tag: 1747037810-192740 X-HE-Meta: U2FsdGVkX18d9Cuj7KcsynsxcL+c/v4nMX/f5A3v0WrhkILjtvnXgSftUrfS4Vo53TnL2Ch2eNdDNLD2kD6koOeiGEOksOqEpveFnxGSpMpMTR+SWiJZUi1DQAG+xkF4KQfHQA28l3jntu4IDQnOwuRijJQpw2IMcHqNnm+3k7AkMSZN0ZhzSfxix1V7hF9DtXLW8IP1AN0VR+xoYhbCtu75W+LIro98EYV3JlOsPWfwIGV4DsmfcYywroUYe7pfuLD+rmaSRrFa4U9on52FMkVVRJrCM9Hs/TA6yUVKV8AO7wHD6zpAOUYwVHJRR/FkEEAw+glk1hdOlxo6SDuGInYsC6cb6YLqkLONIg1/nQbQOMAScOdLwiHLPV1R6GuW2KwP+TCyE79cMbrXRWNunPyMQVGWS3BoUnLhWjr8EO93Dw+85Y8+RQ9tI5EKKzexi9dIpV7U5KbS3SMqJGTeCNKZ97vk7PtGFA97NbtG55R6xiHaUasqqqgbdpbybRAUHRnjtFI/xVZQ/051M9zNYIhZ2YnUOlCNJGYBixcCNFaZI2A43TnMXcd/a+MMV/qQj6z1Vo4jQRpWqupsALbWWq/HCoyUDvb73GhDOB+UIHfLdVDK22j2qsqnysa2TOMSKg4G8fLqIQip49/Lp2SDhZKofsWaoUg7woxnNE5X4aBEWEue/zQiy1n9gaF/QUmgFLy7fE/jxKTJeECNqXasx930BOnH/31j3LkFLvPs6P/lSqUXXOd/OrqRfZ+SFu07PqL7gOGRcL5OfzuEjfNwhs0nJzCaptgYbsx0/c/9kfG3MupZYmTl/fL0QiM6waYeNnUyn6SJOBCs6IxuPHj8QgJngT5Im96l4HFyMfiVmt4USk+v0Fz8q1Cn8Gjl3GsmNvJHEiSsNkptUtbb5fEms1n3n2gkPds+/EH8XgyrXhjrotC2iTgeD2mFlZkQg2NtYFHQiVXAIphwXqck9Ib xiCL+WKk s9R7fb8hAAIXcKJHu1BuOpdDfpjPJXpo4XGP/GsJ0zhofbuZgBJxCfpxt5yNsukp0twlAcuRkngKltzaNOa2n2SMFBeWjpPZdjed9103Rs8UdeVJjdHn6zW7EY/ebUisIa9puzXw7fmo8LvpYGkTiJhj2PqhCaoHfSHZes3vcPhMQK5hnZ6IYwYhY0Y6AEhw2pwPAc2ZYXam+c8yYsahHUR1DW2MfNbqC9UXaB8sPLeyxziwT/AGf0ED8Szh+pwEHcOTzJ5Pinl2aMfQjeZ79qRDCi0CNYFIfzhrSLj9P4U8zyoCuLdvTOTNRLOMW6Yak7/BybzQN8BnIZZMZxLH4R1X5+w== 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 Wed, 7 May 2025 22:43:41 +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. > > ACPI RAS2 patches were part of the EDAC series [1]. > > The code is based on ras.git: edac-for-next branch [2] > merged with linux-pm.git [3] : linux-next branch. > > 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-for-next > 3. https://web.git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/ Rafael, Borislav, What path do we expect this little series to take forwards? I'm kind of assuming through ACPI given the acpica dependency, but anything works for us. Last few iterations have been minor and around the renames of stuff in acpica to shorten some silly long lines. So I hope this is ready to go. Yazen, Daniel, others thanks for your reviews and testing etc - if you want to give RB tags or similar that would be great as well! Jonathan > > Changes > ======= > 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 ACPICA 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. 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 (2): > 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 | 451 +++++++++++++++++++++++++++++++++++ > drivers/ras/Kconfig | 11 + > drivers/ras/Makefile | 1 + > drivers/ras/acpi_ras2.c | 406 +++++++++++++++++++++++++++++++ > include/acpi/ras2.h | 70 ++++++ > 9 files changed, 1030 insertions(+) > create mode 100644 drivers/acpi/ras2.c > create mode 100644 drivers/ras/acpi_ras2.c > create mode 100644 include/acpi/ras2.h >