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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA489CA0FED for ; Wed, 10 Sep 2025 19:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lD+WTsCFUBNyrATNqPoRDrK5lsUa8hYbP0NnLOpCJb0=; b=CtAtAR+zm6IilOAwNpDxKJH+Mk LjJmAPcExo//6gA1nnnd4rUzZp6j9SbA7H7joL/Fi6X0l/4lCDMvGDsA0NH2E7k60t//I7BrN9j2X BN/gS9jFexi55ex02zp5Dbcbw3970Z7lyLUXSTeW6f//cFJF6Owd/IxrtBIqwG4tt5ZKIBDEATdro MZ+d/t62800fy04iP3XyHE6gHQ+gPqI1rED8GJ5hLiwgGS0FKTirx6z5Wse9KOKwGQWADmEAZYVvy xhJZrDF/K8TcCRaDj3HY4yoYbsua1fPz5ObyQcH0kUpG7sptMKPh5d4k9fki1XxIzK0r8vylMYRzU zwGzI8ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uwQWM-0000000GI0E-06lJ; Wed, 10 Sep 2025 19:30:22 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uwQWJ-0000000GHxt-1AO7 for linux-arm-kernel@lists.infradead.org; Wed, 10 Sep 2025 19:30:20 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 38D2C328D; Wed, 10 Sep 2025 12:30:10 -0700 (PDT) Received: from [10.1.197.69] (eglon.cambridge.arm.com [10.1.197.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 554513F694; Wed, 10 Sep 2025 12:30:07 -0700 (PDT) Message-ID: <1ac89055-12ab-4aa0-a34f-1523ac579b8e@arm.com> Date: Wed, 10 Sep 2025 20:30:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 25/33] arm_mpam: Probe and reset the rest of the features To: Ben Horgan , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org Cc: shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie , Dave Martin , Koba Ko , Shanker Donthineni , fenghuay@nvidia.com, baisheng.gao@unisoc.com, Jonathan Cameron , Rob Herring , Rohit Mathew , Rafael Wysocki , Len Brown , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Greg Kroah-Hartman , Danilo Krummrich , Zeng Heng References: <20250822153048.2287-1-james.morse@arm.com> <20250822153048.2287-26-james.morse@arm.com> <13767875-3744-47f3-98ec-a808c0c22f21@arm.com> Content-Language: en-GB From: James Morse In-Reply-To: <13767875-3744-47f3-98ec-a808c0c22f21@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250910_123019_462741_B8525AA3 X-CRM114-Status: GOOD ( 14.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Ben, On 28/08/2025 11:11, Ben Horgan wrote: > On 8/22/25 16:30, James Morse wrote: >> MPAM supports more features than are going to be exposed to resctrl. >> For partid other than 0, the reset values of these controls isn't >> known. >> >> Discover the rest of the features so they can be reset to avoid any >> side effects when resctrl is in use. >> >> PARTID narrowing allows MSC/RIS to support less configuration space than >> is usable. If this feature is found on a class of device we are likely >> to use, then reduce the partid_max to make it usable. This allows us >> to map a PARTID to itself. >> diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c >> index 8f6df2406c22..aedd743d6827 100644 >> --- a/drivers/resctrl/mpam_devices.c >> +++ b/drivers/resctrl/mpam_devices.c >> @@ -964,6 +1054,29 @@ static void mpam_reprogram_ris_partid(struct mpam_msc_ris *ris, u16 partid, >> >> if (mpam_has_feature(mpam_feat_mbw_prop, rprops)) >> mpam_write_partsel_reg(msc, MBW_PROP, bwa_fract); >> + >> + if (mpam_has_feature(mpam_feat_cmax_cmax, rprops)) >> + mpam_write_partsel_reg(msc, CMAX, cmax); >> + >> + if (mpam_has_feature(mpam_feat_cmax_cmin, rprops)) >> + mpam_write_partsel_reg(msc, CMIN, 0); > Missing reset for cmax_cassoc. I wonder if it makes sense to have > separate enums for partitioning features, which require reset, and the rest. Fixed. They all need resetting because the architecture doesn't guarantee the state of controls out of reset for PARTID other than zero. (or - when the MSC are reset). I think those two lists would just be those that are reset to zero, as opposed to some other value. Given the register names have to be listed here, I don't think its any worse to have the hand-picked reset value. Thanks, James