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 BB034CA0FE6 for ; Fri, 1 Sep 2023 13:18:21 +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=xslhcLsSY4tSCJfIlISraCXsyRXBvwVAG0ciBWMafNc=; b=UtGEeGYjK4RO3k qzzQ/CNOafvGPPwnTYkmrVpYPcvYmcH3dyVqtPy7II4rX27JB1CFqnHbSsGUEj1i/GMCeCG9nQG82 +WOECNB7RycGOBqeRgs0BDDjlJLFhdwChrB6hv745sLZ1SOE+z0z4F9lQMDc9EGEuvjvfx8Nc87fk 76Nbu9o7Ozky4dTO5szPAi/ftxaKv7zSsJGoGTabjl8dBQnsFIX5AENphqMLdQmj62hJgiGw/NwXO xlvdpRDjjHCpFMe782xrTEGXIcqyswAdpINIT/AFs9JaZBsEfKP2+ruJTg/lP48Kbizqjj17aZ1fQ XYwDpWqMBgCyr8Sxs4zA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qc420-00HYiH-36; Fri, 01 Sep 2023 13:17: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 1qc41w-00HYhF-2j for linux-arm-kernel@lists.infradead.org; Fri, 01 Sep 2023 13:17:46 +0000 Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Rcdjy2yvdz6K627; Fri, 1 Sep 2023 21:12:38 +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:17:32 +0100 Date: Fri, 1 Sep 2023 14:17:31 +0100 From: Jonathan Cameron To: Amit Singh Tomar CC: , , , , , , , Subject: Re: [RFC 12/12] arm_mpam: Program Downstream priority value Message-ID: <20230901141731.00006f46@Huawei.com> In-Reply-To: <20230815152712.1760046-13-amitsinght@marvell.com> References: <20230815152712.1760046-1-amitsinght@marvell.com> <20230815152712.1760046-13-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: lhrpeml100002.china.huawei.com (7.191.160.241) 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_061745_023659_EDFB48C2 X-CRM114-Status: GOOD ( 13.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: , 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:12 +0530 Amit Singh Tomar wrote: > Now that Downstream priorities values can be passed from resource control > schemata file, let's program it into memory mapped Priority Partition > Configuration Register. > > Signed-off-by: Amit Singh Tomar > --- > TODO: > * Invert Priority value based on DSPRI_0_IS_LOW, suggested > by James. Ah. In testing I just hit this as well as I was expecting the default to change depending on 0_IS_LOW. > --- > drivers/platform/mpam/mpam_devices.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/mpam/mpam_devices.c b/drivers/platform/mpam/mpam_devices.c > index 59022e42920c..8af6424bb27b 100644 > --- a/drivers/platform/mpam/mpam_devices.c > +++ b/drivers/platform/mpam/mpam_devices.c > @@ -1153,8 +1153,12 @@ static void mpam_reprogram_ris_partid(struct mpam_msc_ris *ris, u16 partid, > > if (mpam_has_feature(mpam_feat_intpri_part, rprops)) > pri_val |= FIELD_PREP(MPAMCFG_PRI_INTPRI, intpri); > - if (mpam_has_feature(mpam_feat_dspri_part, rprops)) > - pri_val |= FIELD_PREP(MPAMCFG_PRI_DSPRI, dspri); > + if (mpam_has_feature(mpam_feat_dspri_part, rprops)) { > + if (mpam_has_feature(mpam_feat_dspri_part, cfg)) { > + pri_val |= FIELD_PREP(MPAMCFG_PRI_DSPRI, cfg->dspri & dspri); Note that it's not as simple as inverting the value for DSPRI_0_IS_LOW setting being the opposite as in that case dspri is st to 0 a few lines up... So this always ends up 0. > + } else > + pri_val |= FIELD_PREP(MPAMCFG_PRI_DSPRI, dspri); > + } > > mpam_write_partsel_reg(msc, PRI, pri_val); > } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel