lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230901141731.00006f46@Huawei.com>
Date:   Fri, 1 Sep 2023 14:17:31 +0100
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     Amit Singh Tomar <amitsinght@...vell.com>
CC:     <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <fenghua.yu@...el.com>,
        <reinette.chatre@...el.com>, <james.morse@....com>,
        <gcherian@...vell.com>, <robh@...nel.org>, <peternewman@...gle.com>
Subject: Re: [RFC 12/12] arm_mpam: Program Downstream priority value

On Tue, 15 Aug 2023 20:57:12 +0530
Amit Singh Tomar <amitsinght@...vell.com> 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 <amitsinght@...vell.com>
> ---
> 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);
>  	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ