From patchwork Fri Sep 15 17:28:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 13387317 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59F58EED61E for ; Fri, 15 Sep 2023 17:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236099AbjIOR3l (ORCPT ); Fri, 15 Sep 2023 13:29:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235952AbjIOR3L (ORCPT ); Fri, 15 Sep 2023 13:29:11 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFAC42105; Fri, 15 Sep 2023 10:29:06 -0700 (PDT) Received: from lhrpeml500006.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RnLkc52pkz6K6LZ; Sat, 16 Sep 2023 01:28:24 +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; Fri, 15 Sep 2023 18:29:04 +0100 From: To: , , CC: , , , , , , , , , , , , , , , , , , , , , Subject: [RFC PATCH 3/9] Documentation/scrub-configure.rst: Add documentation for scrub driver Date: Sat, 16 Sep 2023 01:28:12 +0800 Message-ID: <20230915172818.761-4-shiju.jose@huawei.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20230915172818.761-1-shiju.jose@huawei.com> References: <20230915172818.761-1-shiju.jose@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.122.247.234] X-ClientProxiedBy: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500006.china.huawei.com (7.191.161.198) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Shiju Jose Add documentation for scrub driver, supports configure scrub parameters, in Documentation/scrub-configure.rst Signed-off-by: Shiju Jose --- Documentation/scrub-configure.rst | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/scrub-configure.rst diff --git a/Documentation/scrub-configure.rst b/Documentation/scrub-configure.rst new file mode 100644 index 000000000000..9f8581b88788 --- /dev/null +++ b/Documentation/scrub-configure.rst @@ -0,0 +1,55 @@ +========================== +Scrub subsystem driver +========================== + +Copyright (c) 2023 HiSilicon Limited. + +:Author: Shiju Jose +:License: The GNU Free Documentation License, Version 1.2 + (dual licensed under the GPL v2) +:Original Reviewers: + +- Written for: 6.7 +- Updated for: + +Introduction +------------ +The scrub subsystem driver provides the interface for configure the +parameters of memory scrubbers in the system. The scrub device drivers +in the system register with the scrub configure subsystem. + +The scrub configure driver exposes the scrub controls to the user +via sysfs. + +The File System +--------------- + +The configuration parameters of the registered scrubbers could be +accessed via the /sys/class/scrub/scrubX/regionN/ + +sysfs +----- + +Sysfs files are documented in +`Documentation/ABI/testing/sysfs-class-scrub-configure`. + +Example +------- + + The usage takes the form shown in this example:: + + # echo 0x300000 > /sys/class/scrub/scrub0/region0/addr_base + # echo 0x100000 > /sys/class/scrub/scrub0/region0/addr_size + # cat /sys/class/scrub/scrub0/region0/speed_available + # 1-60 + # echo 25 > /sys/class/scrub/scrub0/region0/speed + # echo 1 > /sys/class/scrub/scrub0/region0/enable + + # cat /sys/class/scrub/scrub0/region0/speed + # 0x19 + # cat /sys/class/scrub/scrub0/region0/addr_base + # 0x100000 + # cat /sys/class/scrub/scrub0/region0/addr_size + # 0x200000 + + # echo 0 > /sys/class/scrub/scrub0/region0/enable