From patchwork Tue Nov 21 10:18:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 746565 Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CC7C1737; Tue, 21 Nov 2023 02:19:11 -0800 (PST) Received: from lhrpeml500006.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SZKxb0j8xz67ZyK; Tue, 21 Nov 2023 18:14:59 +0800 (CST) Received: from SecurePC30232.china.huawei.com (10.122.247.234) by lhrpeml500006.china.huawei.com (7.191.161.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 21 Nov 2023 10:19:08 +0000 From: To: , , , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 10/10] cxl: scrub: sysfs: Add Documentation for CXL memory device scrub control attributes Date: Tue, 21 Nov 2023 18:18:43 +0800 Message-ID: <20231121101844.1161-11-shiju.jose@huawei.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20231121101844.1161-1-shiju.jose@huawei.com> References: <20231121101844.1161-1-shiju.jose@huawei.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.122.247.234] X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500006.china.huawei.com (7.191.161.198) X-CFilter-Loop: Reflected From: Shiju Jose Add sysfs documentation entries for the CXL memory device scrub control attributes those are exposed in /sys/class/scrub/ by the scrub driver. These attributes support configuring a CXL memory device scrub. Signed-off-by: Shiju Jose --- .../testing/sysfs-class-cxl-scrub-configure | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-cxl-scrub-configure diff --git a/Documentation/ABI/testing/sysfs-class-cxl-scrub-configure b/Documentation/ABI/testing/sysfs-class-cxl-scrub-configure new file mode 100644 index 000000000000..57ba63d5390f --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-cxl-scrub-configure @@ -0,0 +1,135 @@ +What: /sys/class/scrub/ +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + The scrub/ class subdirectory belongs to the scrub + subsystem. + +What: /sys/class/scrub/scrubX/ +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + The /sys/class/scrub/scrub{0,1,2,3,...} directories + correspond to each scrub device. + +What: /sys/class/scrub/scrubX/name +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RO) name of the memory scrub device + +What: /sys/class/scrub/scrubX/regionY/ +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + The /sys/class/scrub/scrubX/region{0,1,2,3,...} + directories correspond to each scrub region under a scrub device. + Scrub region is a physical address range or for example + memory media FRU of DDR5 ECS feature for which scrub may be + separately controlled. + +What: /sys/class/scrub/scrubX/regionY/enable +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (WO) Start/Stop CXL memory patrol scrub. + 1 - enable the CXL memory patrol scrub. + 0 - disable the CXL memory patrol scrub. + +What: /sys/class/scrub/scrubX/regionY/speed +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RW) The scrub cycle to set for the CXL memory + patrol scrub and it must be within the supported + range. The unit of the scrub cycle is hour. + +What: /sys/class/scrub/scrubX/regionY/speed_available +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RO) Supported range of the scrub cycle by the + CXL memory patrol scrub. + The unit of the scrub cycle is hour. + +What: /sys/class/scrub/scrubX/regionY/ecs_log_entry_type +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RW) The log entry type of how the DDR5 ECS log is + reported. + 00b - per DRAM. + 01b - per memory media FRU. + +What: /sys/class/scrub/scrubX/regionY/ecs_log_entry_type_per_dram +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RO) Returns true if current log entry type of DDR5 ECS + region is per DRAM. + +What: /sys/class/scrub/scrubX/regionY/ecs_log_entry_type_per_memory_media +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RO) Returns true if current log entry type of DDR5 ECS + region is per memory media FRU. + +What: /sys/class/scrub/scrubX/regionY/mode +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RW) The mode of how the DDR5 ECS counts the errors. + 0 - ECS counts rows with errors. + 1 - ECS counts codewords with errors. + +What: /sys/class/scrub/scrubX/regionY/mode_counts_rows +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RO) Returns true if current mode of DDR5 ECS region + is counts rows with errors. + +What: /sys/class/scrub/scrubX/regionY/mode_counts_codewords +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RO) Returns true if current mode of DDR5 ECS region + is counts codewords with errors. + +What: /sys/class/scrub/scrubX/regionY/reset_counter +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (WO) DDR5 ECS reset ECC counter. + 0 - normal, ECC counter running actively. + 1 - reset ECC counter to the default value. + +What: /sys/class/scrub/scrubX/regionY/threshold +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RW) DDR5 ECS threshold count per GB of memory cells. + +What: /sys/class/scrub/scrubX/regionY/threshold_available +Date: November 2023 +KernelVersion: 6.8 +Contact: linux-kernel@vger.kernel.org +Description: + (RO) Supported list of DDR5 ECS threshold count per GB of + memory cells.