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 1A641CA0FE6 for ; Fri, 1 Sep 2023 13:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=nkiTrqOHbYlyTEEuCwSbPJj1TRcPc5e/F9OIHbZICLU=; b=j0bGJOWzOInIYS 0VmOhO/hZriTYC5eSKug6azg/48+1rwasPrJiI+EJayA+c/1watTvoApsAJ1++m/7LfCpjd2ixkNr zpV460Tc+XI25/zpHLEr6tZu+jaoITu+yPU34Q6STfleJuKE9UWyNpKlVg7ffnPBiSp7jEB+m9aqA DwK6xMYniegLLeo4LK5wNGWg96KnoDCHa0qLICDd1NlOHlKYuNXsPjskP/jmZYM6iDvrZGvgAlAU5 ey8cdTQcs84DmQ6tEXTNnFSxBqLyv6PzX5W2FwLTTZVjR65ZsI6zqus2mxjumaJ5QYWskimooIL8i lNf5Fw0M+c7X84z+k/wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qc4GW-00HZa0-2X; Fri, 01 Sep 2023 13:32:48 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qc4GT-00HZZJ-1S for linux-arm-kernel@lists.infradead.org; Fri, 01 Sep 2023 13:32:47 +0000 Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Rcf3v6z4Mz6J7tR; Fri, 1 Sep 2023 21:28:11 +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_128_GCM_SHA256) id 15.1.2507.31; Fri, 1 Sep 2023 14:32:34 +0100 Date: Fri, 1 Sep 2023 14:32:33 +0100 From: Jonathan Cameron To: Amit Singh Tomar CC: , , , , , , , Subject: Re: [RFC 11/12] arm_mpam: Fix Downstream priority mask Message-ID: <20230901143233.0000480e@Huawei.com> In-Reply-To: <20230815152712.1760046-12-amitsinght@marvell.com> References: <20230815152712.1760046-1-amitsinght@marvell.com> <20230815152712.1760046-12-amitsinght@marvell.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 X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100003.china.huawei.com (7.191.160.210) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230901_063245_631634_CD9B3C02 X-CRM114-Status: GOOD ( 16.23 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 15 Aug 2023 20:57:11 +0530 Amit Singh Tomar wrote: > MPAMF_PRI_IDR_NS[DSPRI_WD] determines the number of implemented bits in > the downstream priority field (MPAMCFG_PRI_NS). For instance, if the value > of DSPRI_WD is 4, then the maximum value for dspri is 0xf, and mask should > be GENMASK(3,0). > > But with current implementation, it turned out to be GENMASK(4,0) .i.e. > 0x1f instead of 0xf. > > u16 dspri = GENMASK(rprops->dspri_wd, 0); > > Let's fix it, by subtracting 1 from DSPRI_WD value. > > Signed-off-by: Amit Singh Tomar > --- > drivers/platform/mpam/mpam_devices.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/mpam/mpam_devices.c b/drivers/platform/mpam/mpam_devices.c > index c0c83c04c77c..59022e42920c 100644 > --- a/drivers/platform/mpam/mpam_devices.c > +++ b/drivers/platform/mpam/mpam_devices.c > @@ -1099,7 +1099,7 @@ static void mpam_reprogram_ris_partid(struct mpam_msc_ris *ris, u16 partid, > struct mpam_msc *msc = ris->msc; > u16 bwa_fract = MPAMCFG_MBW_MAX_MAX; > struct mpam_props *rprops = &ris->props; > - u16 dspri = GENMASK(rprops->dspri_wd, 0); > + u16 dspri = GENMASK((rprops->dspri_wd-1), 0); Spaces around the - > u16 intpri = GENMASK(rprops->intpri_wd, 0); Please fix intpri as well. Argument is the same. I'm assuming / hoping James will squash this into relevant patch in his tree. > > lockdep_assert_held(&msc->lock); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel