Skip to content
Commit 102ca9cd authored by Dave Martin's avatar Dave Martin
Browse files

arm_mpam: Skip inapplicable cases when reprogramming a resctrl domain



The implementation of resctrl_arch_update_domains() currently
iterates over all types of staged configuration changes passed from
resctrl, irrespective of whether a given type (CDP_CODE, CDP_DATA
or CDP_NONE) makes sense for the affected MPAM resource.  Since
resctrl will not stage any updates of inappropriate type for the
resource, this is mostly harmless.

When doing a forced update as a result of a call via
resctrl_arch_init_domains() however, there is a need to update the
cpartid (intPARTID) even if no staged configuration changes are
supplied.  This can result in intPARTID being repeatedly
reprogrammed with different values.  As well as being inefficient,
the final value may not be the correct one.

To program just once with the correct intPARTID, only apply the
update types that actually make sense for the resource.

Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
parent 515a16df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment