arm_mpam: Fix T241-MPAM-4 workaround
Subsystems (2)
PATCH 1/1 arm_mpam: Fix T241-MPAM-4 workaround
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.
--- drivers/platform/arm64/mpam/mpam_devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/arm64/mpam/mpam_devices.c +1 -1
@@ -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); }
Signature · 1 line
2.25.1
Quoted 9 lines · On Mon, 19 Aug 2024 17:08:18 -0500 Shanker Donthineni <[email protected]>…
The workaround for T241-MPAM-4 was applied incorrectly, leading to
MBW_MINbeing programmed with a zero value when the user specifiesMBW_MAXis less than 5%.This patch ensures that
MBW_MINis 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 <[email protected]>
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
Quoted 17 lines
--- drivers/platform/arm64/mpam/mpam_devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/platform/arm64/mpam/mpam_devices.c +1
-1@@ -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); }
Quoted 10 lines · Jonathan Cameron
Quoted 7 lines · On Mon, 19 Aug 2024 17:08:18 -0500 Shanker Donthineni <[email protected]>…
The workaround for T241-MPAM-4 was applied incorrectly, leading to
MBW_MINbeing programmed with a zero value when the user specifiesMBW_MAXis less than 5%.This patch ensures that
MBW_MINis programmed with a non-zero value, set to 1 to fix the T241-MPAM-4 as expected.
Quoted 8 lines
Quoted 2 lines
Fixes 13ff1b527e40 ("arm_mpam: Add workaround for T241-MPAM-4")Signed-off-by Shanker Donthineni <[email protected]>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
Quoted 18 lines
Quoted 17 lines
--- drivers/platform/arm64/mpam/mpam_devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/platform/arm64/mpam/mpam_devices.c +1
-1@@ -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); }