diff options
| author | Zeng Heng <zengheng4@huawei.com> | 2026-04-13 17:00:41 +0800 |
|---|---|---|
| committer | James Morse <james.morse@arm.com> | 2026-04-17 17:43:57 +0100 |
| commit | f758340da529ccb12531c3f83d5992e912f6c8d5 (patch) | |
| tree | e6b89939777c1058bac306ca09dd3dec229d5512 /include/linux/tc_act/git@git.tavy.me:linux-stable.git | |
| parent | 4ce0a2ccc0358f3f746fa50815a599f861fd5d68 (diff) | |
arm_mpam: resctrl: Fix MBA CDP alloc_capable handling on unmount
The code to set MBA's alloc_capable to true appears to be trying to
restore alloc_capable on unmount. This can never work because
resctrl_arch_set_cdp_enabled() is never invoked with RDT_RESOURCE_MBA
as the rid parameter. Consequently,
mpam_resctrl_controls[RDT_RESOURCE_MBA].cdp_enabled always remains false.
The alloc_capable setting in resctrl_arch_set_cdp_enabled() is to
re-enable MBA if the caller opts in to separate control values using
CDP for this resource. This doesn't happen today.
Add a comment to describe this.
However a bug remains where MBA allocation is permanently disabled after
the mount with CDP option. Remounting without CDP cannot restore the MBA
partition capability.
Add a check to re-enable MBA when CDP is disabled, which happens on
unmount.
Fixes: 6789fb99282c ("arm_mpam: resctrl: Add CDP emulation")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
[ morse: Added comment for existing code, added hunk to fix this bug from
Ben H ]
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Diffstat (limited to 'include/linux/tc_act/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
