* [PATCH] arm_mpam: Fix T241-MPAM-4 workaround
@ 2024-08-19 22:08 Shanker Donthineni
2024-08-21 11:42 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Shanker Donthineni @ 2024-08-19 22:08 UTC (permalink / raw)
To: James Morse
Cc: Catalin Marinas, Shanker Donthineni, Rohit Mathew,
linux-arm-kernel, linux-doc, linux-kernel, Vikram Sethi
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 <sdonthineni@nvidia.com>
---
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);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm_mpam: Fix T241-MPAM-4 workaround
2024-08-19 22:08 [PATCH] arm_mpam: Fix T241-MPAM-4 workaround Shanker Donthineni
@ 2024-08-21 11:42 ` Jonathan Cameron
2024-09-17 16:12 ` Koba Ko
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2024-08-21 11:42 UTC (permalink / raw)
To: Shanker Donthineni
Cc: James Morse, Catalin Marinas, Rohit Mathew, linux-arm-kernel,
linux-doc, linux-kernel, Vikram Sethi
On Mon, 19 Aug 2024 17:08:18 -0500
Shanker Donthineni <sdonthineni@nvidia.com> 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 <sdonthineni@nvidia.com>
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);
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm_mpam: Fix T241-MPAM-4 workaround
2024-08-21 11:42 ` Jonathan Cameron
@ 2024-09-17 16:12 ` Koba Ko
0 siblings, 0 replies; 3+ messages in thread
From: Koba Ko @ 2024-09-17 16:12 UTC (permalink / raw)
To: Jonathan Cameron, Shanker Donthineni
Cc: James Morse, Catalin Marinas, Rohit Mathew, linux-arm-kernel,
linux-doc, linux-kernel, Vikram Sethi
On 8/21/24 19:42, Jonathan Cameron wrote:
> On Mon, 19 Aug 2024 17:08:18 -0500
> Shanker Donthineni <sdonthineni@nvidia.com> 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 <sdonthineni@nvidia.com>
> 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
Hi Jonathan,
could you please share the cgit of branch?
Thanks
>> ---
>> 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);
>> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-17 16:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 22:08 [PATCH] arm_mpam: Fix T241-MPAM-4 workaround Shanker Donthineni
2024-08-21 11:42 ` Jonathan Cameron
2024-09-17 16:12 ` Koba Ko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).