From patchwork Mon Jul 22 04:01:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zeng Heng X-Patchwork-Id: 13738255 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 739ABC3DA5D for ; Mon, 22 Jul 2024 04:08:17 +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-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=brU47bW0+7nNUJ0E/xqNnW8xrqFS7bTUYdQSxvuDvkQ=; b=wH4fqEeuDd0DPYPHq+uUWU56S+ jGhDTLiL7d3rjtQkrLGHEGhByICwf1zHNeizW53sq/luLcKCYN0VYuI02OygQZllgy0PDSutzeflX 1gB4NjVFNuXseQ1cJim7ey+TVPcyoS5CxcY0pas/P3N87eXK8xSN4SdL+Jh9ZNIY98AOBJ22+I2bV NwfyW0uJqxiuuqI0WzOAip7rSqpkNucoe5ewdVwvFu3c1BUQN7/M6Yq2CD40e/8Q/XayDBx+FRVbV Umy/RkHeNGgzEbf7ryGi/dJq4I0iBWiBjqmBpRKGh5SX4IzwjD8+jaaBS7mv23FBPOHlicPWdImOJ iMsnR+jA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVkLH-00000008HYw-38uZ; Mon, 22 Jul 2024 04:08:07 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVkJ8-00000008Gp3-1rRL for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2024 04:05:56 +0000 Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WS65K4ncKzxThN; Mon, 22 Jul 2024 12:00:53 +0800 (CST) Received: from kwepemf100008.china.huawei.com (unknown [7.202.181.222]) by mail.maildlp.com (Postfix) with ESMTPS id 6ABAB1402CA; Mon, 22 Jul 2024 12:05:48 +0800 (CST) Received: from huawei.com (10.175.103.91) by kwepemf100008.china.huawei.com (7.202.181.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 22 Jul 2024 12:05:47 +0800 From: Zeng Heng To: , , , CC: , , , Subject: [PATCH mpam/v6.10-rc1 RFC 1/4] arm_mpam: Correct MBA granularity calculation Date: Mon, 22 Jul 2024 12:01:37 +0800 Message-ID: <20240722040140.515173-2-zengheng4@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722040140.515173-1-zengheng4@huawei.com> References: <20240722040140.515173-1-zengheng4@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemf100008.china.huawei.com (7.202.181.222) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240721_210554_679309_1986C7F3 X-CRM114-Status: GOOD ( 11.55 ) 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 Correct MBA granularity calculation function. As said in the comments, "bwa_wd is the number of bits implemented in the 0.xxx fixed point fraction". Fixes: 867471fefd5c ("SPLIT untested: arm_mpam: resctrl: Add support for MB resource") Signed-off-by: Zeng Heng --- drivers/platform/arm64/mpam/mpam_resctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/arm64/mpam/mpam_resctrl.c b/drivers/platform/arm64/mpam/mpam_resctrl.c index 2fa732a42d4f..a217f2e1f350 100644 --- a/drivers/platform/arm64/mpam/mpam_resctrl.c +++ b/drivers/platform/arm64/mpam/mpam_resctrl.c @@ -523,7 +523,7 @@ static u32 get_mba_granularity(struct mpam_props *cprops) * bwa_wd is the number of bits implemented in the 0.xxx * fixed point fraction. 1 bit is 50%, 2 is 25% etc. */ - return MAX_MBA_BW / (cprops->bwa_wd + 1); + return MAX_MBA_BW / (1 << cprops->bwa_wd); } return 0; From patchwork Mon Jul 22 04:01:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zeng Heng X-Patchwork-Id: 13738254 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 9A607C3DA5D for ; Mon, 22 Jul 2024 04:07:59 +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-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lkjtJCyKIlSrpPSWGRfMVE8S65/5TmJQlE6/0aPi9RE=; b=Ky8Le7DG4FhBJpVFid4xKTyXcb No43pSwzkFGWxpdqrpv+JC6kbL7ye45beGFbnzIEL1cANLP59wNWIQt2RaAws62Olh4vPTdu926G3 xvfrMRy66E/v6Xx4sJwiP1qSE0DYjzcfgFHwOr93HP28z7iu3GaHzLiRwc/F2iGUqbQbtHrLgBFBX F16A0JxljlDPb3Tym+3jgh375jQNrVLI7MtP1NB+ayMpxm5YCc7szV6wHR1iLEgl+HHWsphLJG3cA nnbfzkZJPT2B8drNyZS6HAIB3jp0687r8xc1uVNDaAvRmNg94TW9LENBojtQrENWf/K6/oqEPixAY T02mwmNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVkKy-00000008HUg-2h1a; Mon, 22 Jul 2024 04:07:48 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVkJ8-00000008Gp2-1q8M for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2024 04:05:55 +0000 Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WS65K4skWzxThf; Mon, 22 Jul 2024 12:00:53 +0800 (CST) Received: from kwepemf100008.china.huawei.com (unknown [7.202.181.222]) by mail.maildlp.com (Postfix) with ESMTPS id 23FF2180064; Mon, 22 Jul 2024 12:05:49 +0800 (CST) Received: from huawei.com (10.175.103.91) by kwepemf100008.china.huawei.com (7.202.181.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 22 Jul 2024 12:05:48 +0800 From: Zeng Heng To: , , , CC: , , , Subject: [PATCH mpam/v6.10-rc1 RFC 2/4] arm_mpam: Fix the range calculation of the implemented bits Date: Mon, 22 Jul 2024 12:01:38 +0800 Message-ID: <20240722040140.515173-3-zengheng4@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722040140.515173-1-zengheng4@huawei.com> References: <20240722040140.515173-1-zengheng4@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemf100008.china.huawei.com (7.202.181.222) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240721_210554_660363_F8706F41 X-CRM114-Status: GOOD ( 11.69 ) 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 The implemented bits of the MAX field in the MPAMCFG_{MBW_MAX, CMAX} register are always to the left of the field, so the validated range should be like [15, 15 - width + 1]. Fixes: 867471fefd5c ("SPLIT untested: arm_mpam: resctrl: Add support for MB resource") Signed-off-by: Zeng Heng --- drivers/platform/arm64/mpam/mpam_resctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/arm64/mpam/mpam_resctrl.c b/drivers/platform/arm64/mpam/mpam_resctrl.c index a217f2e1f350..e87fca6fc5fd 100644 --- a/drivers/platform/arm64/mpam/mpam_resctrl.c +++ b/drivers/platform/arm64/mpam/mpam_resctrl.c @@ -585,7 +585,7 @@ static u16 percent_to_mbw_max(u8 pc, struct mpam_props *cprops) break; } - value &= GENMASK(15, 15 - cprops->bwa_wd); + value &= GENMASK(15, 15 - cprops->bwa_wd + 1); return value; } From patchwork Mon Jul 22 04:01:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zeng Heng X-Patchwork-Id: 13738256 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 426F8C3DA5D for ; Mon, 22 Jul 2024 04:08:38 +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-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uX7gFOb8Wusnp2L5nBRr5gMWGtIS6MuUY4LVRDZq1G8=; b=pre51mD2hkLjjvp4bIe8h4FJnK vC9zYAV3GRQ4zOYF5wYZy3JnfErZHBVSWNSRaCVxrJAOnK4+gAMHGezahRwOzENFJfPet75XTkHbQ TSfiJpf/rViLFYfLcI+LO3O8y/lxo8jPy+1omYAuPPqFskzTuLVc8DxRuJKERsc4c0NVEDN5FvJ2Y 6inqE9Wx1A4HeMSoX5T5H1vow+AWIOoIfvlAUsxGVsnnKyY+UwsIRf9+no3xWc9MggYdeE1m6Abzx dCFcXJx3wvby3bnwFVjqOeax0GWirqZ9YqG5mkNnyPNK3lJWyAWNvbbxYi7ykqnojLE0qP6jGFeXD 4/YFQaEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVkLb-00000008Hdy-3UEO; Mon, 22 Jul 2024 04:08:27 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVkJJ-00000008Gsr-0Zvs for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2024 04:06:06 +0000 Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4WS66F487Tz20ks1; Mon, 22 Jul 2024 12:01:41 +0800 (CST) Received: from kwepemf100008.china.huawei.com (unknown [7.202.181.222]) by mail.maildlp.com (Postfix) with ESMTPS id D0ABD14035E; Mon, 22 Jul 2024 12:05:49 +0800 (CST) Received: from huawei.com (10.175.103.91) by kwepemf100008.china.huawei.com (7.202.181.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 22 Jul 2024 12:05:49 +0800 From: Zeng Heng To: , , , CC: , , , Subject: [PATCH mpam/v6.10-rc1 RFC 3/4] arm_mpam: Correct the judgment condition of the CMAX feature Date: Mon, 22 Jul 2024 12:01:39 +0800 Message-ID: <20240722040140.515173-4-zengheng4@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722040140.515173-1-zengheng4@huawei.com> References: <20240722040140.515173-1-zengheng4@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemf100008.china.huawei.com (7.202.181.222) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240721_210605_348604_EBC2455A X-CRM114-Status: GOOD ( 11.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 According to Arm Architecture MPAM Reference Manual (version DDI 0598D.b), to check whether hardware supports the CMAX feature or not, not only needs to check the CMAX_WD field of the MPAMF_CCAP_IDR register, but also needs to check the NO_CMAX field. Fixes: a275036b6767 ("arm_mpam: Probe and reset the rest of the features") Signed-off-by: Zeng Heng --- drivers/platform/arm64/mpam/mpam_devices.c | 6 ++++-- drivers/platform/arm64/mpam/mpam_internal.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/platform/arm64/mpam/mpam_devices.c b/drivers/platform/arm64/mpam/mpam_devices.c index acb91352c524..9acac8a22573 100644 --- a/drivers/platform/arm64/mpam/mpam_devices.c +++ b/drivers/platform/arm64/mpam/mpam_devices.c @@ -779,8 +779,10 @@ static void mpam_ris_hw_probe(struct mpam_msc_ris *ris) u32 ccap_features = mpam_read_partsel_reg(msc, CCAP_IDR); props->cmax_wd = FIELD_GET(MPAMF_CCAP_IDR_CMAX_WD, ccap_features); - if (props->cmax_wd) - mpam_set_feature(mpam_feat_ccap_part, props); + if (props->cmax_wd) { + if (!FIELD_GET(MPAMF_CCAP_IDR_NO_CMAX, ccap_features)) + mpam_set_feature(mpam_feat_ccap_part, props); + } } /* Cache Portion partitioning */ diff --git a/drivers/platform/arm64/mpam/mpam_internal.h b/drivers/platform/arm64/mpam/mpam_internal.h index 61aea729aa73..0e714ce7fa96 100644 --- a/drivers/platform/arm64/mpam/mpam_internal.h +++ b/drivers/platform/arm64/mpam/mpam_internal.h @@ -450,6 +450,7 @@ void mpam_resctrl_exit(void); /* MPAMF_CCAP_IDR - MPAM features cache capacity partitioning ID register */ #define MPAMF_CCAP_IDR_CMAX_WD GENMASK(5, 0) +#define MPAMF_CCAP_IDR_NO_CMAX BIT(30) /* MPAMF_MBW_IDR - MPAM features memory bandwidth partitioning ID register */ #define MPAMF_MBW_IDR_BWA_WD GENMASK(5, 0) From patchwork Mon Jul 22 04:01:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zeng Heng X-Patchwork-Id: 13738257 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 56F08C3DA5D for ; Mon, 22 Jul 2024 04:08:58 +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-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SlYYbV2xPEAuFd8QD1Hi2pG4p3EIpg7zIJn3NAl9PsU=; b=csGUOAhr5/jYZuk60a8QZVJ14u jRHzxg+yLm+t3gxAkbN3DD6gM/h97nRqVBkJUiPGz9AZQ08BVb4GkPMHW/Wr/z3iSlq11RDlQvKHY kHfVnsTAQbInfABFEPbtaHxIrQ5qkr16qIvOSX1wAXvQw8KJLw5D+7DwACRd0VcpX9KVQ1z6ey0kz KKPo53bJstTYUy4CcrNkExQx5+eE0MV/URQY/PmgK2vkPocYTsI0XEjv2VwFUqnPQctIr+5MvENKx 3OCcDkqKLXi77mWRvyPFubKbe7nxC26xU/ASKwDjaqoxsb7eRHW3wceryYHdaKi/11uERsyaQcRv9 AM+CFYcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVkLv-00000008His-0Xpa; Mon, 22 Jul 2024 04:08:47 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVkJQ-00000008GuQ-1yJ7 for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2024 04:06:14 +0000 Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4WS65z2p9tz1X4k0; Mon, 22 Jul 2024 12:01:27 +0800 (CST) Received: from kwepemf100008.china.huawei.com (unknown [7.202.181.222]) by mail.maildlp.com (Postfix) with ESMTPS id 8D0BE1A0188; Mon, 22 Jul 2024 12:05:50 +0800 (CST) Received: from huawei.com (10.175.103.91) by kwepemf100008.china.huawei.com (7.202.181.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 22 Jul 2024 12:05:49 +0800 From: Zeng Heng To: , , , CC: , , , Subject: [PATCH mpam/v6.10-rc1 RFC 4/4] arm_mpam: Fix typo about mbw_min controls Date: Mon, 22 Jul 2024 12:01:40 +0800 Message-ID: <20240722040140.515173-5-zengheng4@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722040140.515173-1-zengheng4@huawei.com> References: <20240722040140.515173-1-zengheng4@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemf100008.china.huawei.com (7.202.181.222) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240721_210612_704044_332E1F98 X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. 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 Correct the judgment condition about mbw_min default value. Fixes: 099f47353bc5 ("arm_mpam: Generate a configuration for min controls") Signed-off-by: Zeng Heng --- 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 9acac8a22573..64a1f1767a68 100644 --- a/drivers/platform/arm64/mpam/mpam_devices.c +++ b/drivers/platform/arm64/mpam/mpam_devices.c @@ -1483,7 +1483,7 @@ static void mpam_reprogram_ris_partid(struct mpam_msc_ris *ris, u16 partid, } if (mpam_has_feature(mpam_feat_mbw_min, rprops)) { - if (mpam_has_feature(mpam_feat_mbw_max, cfg)) + if (mpam_has_feature(mpam_feat_mbw_min, cfg)) mpam_write_partsel_reg(msc, MBW_MIN, cfg->mbw_min); else mpam_write_partsel_reg(msc, MBW_MIN, 0);