From patchwork Tue Nov 14 12:56:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 13455273 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 10B74C072A2 for ; Tue, 14 Nov 2023 12:57:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2D1FE8000E; Tue, 14 Nov 2023 07:57:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 25A568000D; Tue, 14 Nov 2023 07:57:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0AAF48000E; Tue, 14 Nov 2023 07:57:11 -0500 (EST) 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 E0FDB8000D for ; Tue, 14 Nov 2023 07:57:11 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C07BD4037C for ; Tue, 14 Nov 2023 12:57:11 +0000 (UTC) X-FDA: 81456560262.30.88AF661 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf02.hostedemail.com (Postfix) with ESMTP id A754E80017 for ; Tue, 14 Nov 2023 12:57:09 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@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=1699966629; 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=WTp5QKZQFFib8V+OdJFcgN79XU9TXWMwDOrIGIZbYw4=; b=MVMRYXH9gEHA5mAYp3gePZeb9gegvedEhjqb+vEiBHRZguZxYq56lKWVunpWg3dbWI3TIx nZSWEb6kLg0YzAtiSPXJCZF4WGVZL3p3TQHBO7PlvjMeQQgYtjhjWF5XSml3qA8CimCVDX OJMC3XsJeWy++RqOpTO9yFZ5h42omME= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699966630; a=rsa-sha256; cv=none; b=J/daB0e30ppYWMOKWLimsIA4GBVxJioLe3iBWL4MRuinTZveX/S1gZ624Kd7cFGxBvbu6N PE6noWD6pdP8WpYUgNDgMCDF0o36e1daO30RvmRQHqF2OF4uXfk9Ggdh/r3HmhpVF49G3b 1ljzDAEZaOgwtnH90aZbbhs96iKgNes= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from lhrpeml500006.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SV5rW3Jxqz6K9LJ; Tue, 14 Nov 2023 20:55:55 +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.31; Tue, 14 Nov 2023 12:57:07 +0000 From: To: CC: , , , , , , , , , , , , , , , , , , , , <"pgonda@pgonda"@google.com>, , , , , , , , , Subject: [RFC PATCH 6/6] cxl: scrub: sysfs: Add Documentation for CXL memory device scrub control attributes Date: Tue, 14 Nov 2023 20:56:47 +0800 Message-ID: <20231114125648.1146-7-shiju.jose@huawei.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20231114125648.1146-1-shiju.jose@huawei.com> References: <20231114125648.1146-1-shiju.jose@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.122.247.234] X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500006.china.huawei.com (7.191.161.198) X-CFilter-Loop: Reflected X-Stat-Signature: arq41xapb1h949ptjyi8epe36dbp1o4q X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: A754E80017 X-Rspam-User: X-HE-Tag: 1699966629-910886 X-HE-Meta: U2FsdGVkX1+ab6rWXcAkboT5N0yPSoCa8fMw5GaN4A7+yrdz/RN5DysyCKuDUoVyYOcdF4tguIdqRp9+4lYEaaspFo+Uvvfo2upyOTXcFImzMUiuzPPOerHZCJzgfcTZSG9At4ZqhH3ydbJ/yu8WYrqvJ+EiUKpF2ojOrZSu2RZLbEshii4URomqs7JVGeWpLgGGtSFM0b/ve/WM63QPe5t3tbBjDXU8P4G3QmrbCm3uRtqn4ZeYKN08DkNSFAhT4jhCJxUHYd3nXUxf3gSxj2vNzv4SNQ4kMjJtiByyBXDCSgj8rgpkRFrAL8wGZJWpF6dlBTE7MyOHunpFPlXS2oBWVrKbhqlQJ75h4CGePxY3z9RjVoz5V/sIrDlkf9/jsN6P0i9gQ18V/GRVUGbBBAczedjdMLs/WfpHGsGuMpVnnOfdPKiqWykzlLQwj4GvimqNiMhQ6Jq0LgjVLmOmyQsLdXRdyAJIQDPEiGtBiC+vmSvz9T/or0ZqNJbNcYIyQB+mWXBEx5EwrwmJileCecAl7Fc2OJrDip+QCvsCv72RrOx0agyyctoEtpkPGRDo3mEpuDIc/zpdegFM1fslpVkNE6SBAfkGJHX26IyWeTesaTM6xvblbkW3q6q8WkOAcTfQ+NW5UuOG/dKcuWkxbi25rJJJvFaX32BabYyLs/JMAUKTOYtBmB4XMeoAzc7NXs0w9IwM/96/GNnF9Wy+MBLBeZ5D6FCdhHwvljEUOBFQtAVGipjALk8Mg+CPXUAeryp8lec4c0B0dgv0qo2WcCjIsQ/QU4n/bgHK+PjvgpouAJAMj/PjV80U/D1IXbS1X3TYQexqNKD9MpoLdd3s5/ZBymuGqfdRlxB6zV0dbvCrCnKRo+xopjKn4DgtSctSjn16dK9l5Yie+HzKGD3aRAjiqGhZsbmCPPW5g29knSLGAd1OcNUPzVnU6gk01PBrzpnIFz3f2czvCKB3eI3 UII3JyVp knp6mqp9SWmRoeZckLuq5/jFRrxKQV8yyUHUq+wHataGVQ04zYywg+Fi7uGT+29delTS2m9Ad/M/s/ol2ezwQzZ5NfVAamrxGSimbLX44HU/BSm+p8rLZDZxMYNx6eHbH7VkC3tvkzUVcCW27cmCcSnagon4+U7Gj7q1U3n6Wc8ufge9P6wsxwGHkyp3SHFYyLBnYtAvVQ3kZpuAnbO3wYBjbovTbvHCUbYl/ 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: 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..9dd0c18451aa --- /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.