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 AE5E7C52D6F for ; Wed, 21 Aug 2024 11:43:49 +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:MIME-Version:References:In-Reply-To:Message-ID:Subject:CC:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LEh/uQ+7arXVmk3GJbafgdXRBwOKkhdwgBeEnT3S9C0=; b=B98NxOsUO+76oJ47Yt4HdduJpp u+LZ4CEy2ESKZI1XJxTryS0oqxM6cWtlA2RH1p2ufZCrm6juUOG7ueksRwLb90CpHefJG7Vs2oq8U PlNgY1D/bb/6F7IZONYQe/5qZGG3dwmpR2m/6HPjZ9xINZTXDulkOr5L7R6Cm0ujKpX4n60rLbFFB lqzaq9RkXF2EOepXYp1hffjTXq4G8P+mH+9mhGST44vEQxqLxOSSpduBWD6d2abA4so8P5ndPqnHr +r4bd7TheKIp9EZ4YokSYnZX9wCcoQ4t+pbVuCnYSB0vz3buH1FIHyDpz7DveNzOdnnYU3sFHR8NO hSkPe7Qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgjkZ-00000008kaW-3OEV; Wed, 21 Aug 2024 11:43:39 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgjjr-00000008kOh-2Vgs for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 11:42:57 +0000 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4WpkrG05xqz6FHYm; Wed, 21 Aug 2024 19:39:10 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id ED51B1400DB; Wed, 21 Aug 2024 19:42:48 +0800 (CST) Received: from localhost (10.203.177.66) 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.39; Wed, 21 Aug 2024 12:42:48 +0100 Date: Wed, 21 Aug 2024 12:42:47 +0100 From: Jonathan Cameron To: Shanker Donthineni CC: James Morse , Catalin Marinas , Rohit Mathew , , , , Vikram Sethi Subject: Re: [PATCH] arm_mpam: Fix T241-MPAM-4 workaround Message-ID: <20240821124247.000067fc@Huawei.com> In-Reply-To: <20240819220818.201870-1-sdonthineni@nvidia.com> References: <20240819220818.201870-1-sdonthineni@nvidia.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_044255_813303_09C6C3F8 X-CRM114-Status: GOOD ( 18.74 ) 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 On Mon, 19 Aug 2024 17:08:18 -0500 Shanker Donthineni wrote: > The workaround for T241-MPAM-4 was applied incorrectly, leading to > MBW_MIN being programmed with a zero value when the user specifies > MBW_MAX is less than 5%. > > This patch ensures that MBW_MIN is programmed with a non-zero value, > set to 1 to fix the T241-MPAM-4 as expected. > > Fixes: 13ff1b527e40 ("arm_mpam: Add workaround for T241-MPAM-4") > Signed-off-by: Shanker Donthineni Hi Shanker, I can guess which branch this fix is for, but good to mention it in the patch given it's not mainline. Jonathan > --- > drivers/platform/arm64/mpam/mpam_devices.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/arm64/mpam/mpam_devices.c b/drivers/platform/arm64/mpam/mpam_devices.c > index a802ca1c9f05..e49a27c02c66 100644 > --- a/drivers/platform/arm64/mpam/mpam_devices.c > +++ b/drivers/platform/arm64/mpam/mpam_devices.c > @@ -2990,7 +2990,7 @@ static void mpam_extend_config(struct mpam_class *class, struct mpam_config *cfg > } > > if (mpam_has_quirk(T241_FORCE_MBW_MIN_TO_ONE, class) && > - cfg->mbw_min == 0) { > + cfg->mbw_min <= min_hw_granule) { > cfg->mbw_min = min_hw_granule + 1; > mpam_set_feature(mpam_feat_mbw_min, cfg); > }