Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1966545lqz; Tue, 2 Apr 2024 03:18:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXaVNE0JQU/zjqAxrqHY9QdiZSgY2eAh8b4jQf6jpYXTK3r9rVTepDc3DEgiZ3+c2ZcRbmKQLWg6GJUu9mYj8ZjYVlH8mSnI0D2q1p6VQ== X-Google-Smtp-Source: AGHT+IEZCU8Wfz0/kQlLMi4tmwWzpzZOeHFE7jxssgD7k79/RvWxNZMn0YfnyU5nuEOXbVHtoBr7 X-Received: by 2002:a05:622a:58c:b0:431:4e72:9a3f with SMTP id c12-20020a05622a058c00b004314e729a3fmr15937011qtb.1.1712053119362; Tue, 02 Apr 2024 03:18:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712053119; cv=pass; d=google.com; s=arc-20160816; b=aJFc2GCJC6aCTzoJx3WhDrwGfhBfRmVKU20QxwEn8/vZEi2Ow/irhy8B5+bK3zWmf/ dwAl6CMR9LwMHFtF7RT9UkTt46h6ExDrSwvrF3QIn6vJv/keQIxSxIp4BCxwVZTN1r3E Crq7j92fWWX0WU9E/KvTz9EC5HnkH4lfQvVcAOw6lkkMNyeV+6u7HNZfTydIJfmJP0ab GDIg3kNTxVv49PQJLhknNhp7gaiilaEQncknfGAg/0lsYJdJPbUnUh3UzBL0RhsFYUqF 6PG+PuJ6xta+fW0GhIryrD1Fzrj8O6mzbfVFB1JfAvVc2mQGYvqoK3JXRy5Gqu17Jlvd VErg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=ot2kOanyMxnz2vIwU34IXv5ETrtji830ofVhMMDL1wI=; fh=hXxTICLgSJua8PH1fW+vC0+WOPdN8kV0XY1tJdKOaY0=; b=vGefMBxezn8Te85jDKoV8v2aBclKFTnoCfHdbxwINmzFJG35xNJnoh5UBYhFZLGbOx SaK0TS7HfJAJHdj8lFYFA3GsLxVMcxaHOD1OYV1nobPCyh0JDzjOrZviiz41uMxyKxdK z4pWChEyHyRKkHdcANKQJIFsZFxC1+lN2Rv2LtDnXUeQmoxkys+p73nTSv47SluSrGSO L4AXyGAS5EEmAuwRgFujA5gORAQzkKmXPSrEqupx/FGOfG4aYYODhXdvFrJ/JVG/5Rui No5J7ijZucGOR1q1jfS+ScSNDAmic9/i9q69KK0HD8WG7uhrDMyUXh3XDDaXZe7Ljq07 0tqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-127715-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127715-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f13-20020a05622a1a0d00b004313e1efec2si12024548qtb.700.2024.04.02.03.18.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 03:18:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127715-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-127715-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127715-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C22161C229A7 for ; Tue, 2 Apr 2024 10:18:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75A5269944; Tue, 2 Apr 2024 10:17:17 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD1B75A7AE; Tue, 2 Apr 2024 10:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712053036; cv=none; b=CGo8pjwD2v6GxZuf4JumjHBLKU3LChnZNgZTh8hwQW6UorqXFu9Py7pas1+oa8iaYN/vlbWUMo+vHAT5wMNLnybb5zwt5EOXYk7nbQjf+oLlIgp8Sj83iNNr+t7qNkxrdlU+ZD2LSltQdLBKxcHsgiAJFIKvUgcm+d5+WAS29Ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712053036; c=relaxed/simple; bh=7w+zfYL5/EU3k21GldfEZOmIoR0yGMwEVvQsUYIGfEg=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WreR7uhbnnMuroSuJfM4KO1/urGSCd211C8rUz3gPSqMk+ttgk3/mzt0mNkOv1Deycpx5FRi4CIEfPcieAXhJsqH5YigbsXkb5+0FmxkJYHRJaYQVqctUNL4hI54DcXc4C4LlZ/v4rZ3Ks34hy/5056zoMfnY7uaQAID7RDFm7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4V83bQ4VC0z6K98F; Tue, 2 Apr 2024 18:12:34 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id AFD60140A87; Tue, 2 Apr 2024 18:17:10 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 2 Apr 2024 11:17:09 +0100 Date: Tue, 2 Apr 2024 11:17:09 +0100 From: Jonathan Cameron To: Yazen Ghannam CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [RFC PATCH v7 12/12] memory: RAS2: Add memory RAS2 driver Message-ID: <20240402111709.0000653a@Huawei.com> In-Reply-To: <71d41ec9-17ed-442f-8d68-a6cb9bcbb4b0@amd.com> References: <20240223143723.1574-1-shiju.jose@huawei.com> <20240223143723.1574-13-shiju.jose@huawei.com> <71d41ec9-17ed-442f-8d68-a6cb9bcbb4b0@amd.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: lhrpeml500005.china.huawei.com (7.191.163.240) To lhrpeml500005.china.huawei.com (7.191.163.240) On Thu, 28 Mar 2024 11:23:38 -0400 Yazen Ghannam wrote: > On 2/23/2024 9:37 AM, shiju.jose@huawei.com wrote: > > From: Shiju Jose > >=20 > > Memory RAS2 driver binds to the platform device add by the ACPI RAS2 > > driver. > > Driver registers the PCC channel for communicating with the ACPI compli= ant > > platform that contains RAS2 command support in the hardware. > >=20 > > Add interface functions to support configuring the parameters of HW pat= rol > > scrubs in the system, which exposed to the kernel via the RAS2 and PCC, > > using the RAS2 commands. > >=20 > > Add support for RAS2 platform devices to register with scrub subsystem > > driver. This enables user to configure the parameters of HW patrol scru= bs, > > which exposed to the kernel via the RAS2 table, through the scrub sysfs > > attributes. > >=20 > > Open Question: > > Sysfs scrub control attribute "enable_background_scrub" is added for RA= S2, > > based on the feedback from Bill Schwartz > on v4 to enable/disable the background_scrubbing in the platform as def= ined in the > > =E2=80=9CConfigure Scrub Parameters [INPUT]=E2=80=9C field in RAS2 Tab= le 5.87: Parameter Block > > Structure for PATROL_SCRUB. > > Is it a right approach to support "enable_background_scrub" in the sysfs > > scrub control? > >=20 > > Signed-off-by: Shiju Jose > > --- > > drivers/memory/Kconfig | 14 ++ > > drivers/memory/Makefile | 2 + > > drivers/memory/ras2.c | 364 +++++++++++++++++++++++++++++++++++ > > drivers/memory/ras2_common.c | 282 +++++++++++++++++++++++++++ > > include/memory/ras2.h | 88 +++++++++ > > 5 files changed, 750 insertions(+) > > create mode 100644 drivers/memory/ras2.c > > create mode 100644 drivers/memory/ras2_common.c > > create mode 100755 include/memory/ras2.h > > =20 >=20 > Sorry if this was already covered, but why not put the common scrub and r= as2 > changes under /drivers/ras/? Hi Yazen Location / naming etc is definitely an open question. Given the OCP RAS API has repeatedly come up in discussions (and that has a much wider scope), a RAS focused location may well make sense + some renaming to avoid being memory scrub specific. Jonathan >=20 > Thanks, > Yazen