summaryrefslogtreecommitdiff
path: root/drivers/resctrl
diff options
context:
space:
mode:
authorBen Horgan <ben.horgan@arm.com>2026-09-17 15:56:16 +0100
committerJames Morse <james.morse@arm.com>2026-10-02 17:39:33 +0100
commit046384f02b57da84a697d32aff7d7d46e881ae84 (patch)
tree5e3821267b4965391e907da605b4a0d065ef0188 /drivers/resctrl
parent1e105782a1ce59ad066492a574ee57ff2f4374d1 (diff)
arm_mpam: Switch to kvzmalloc_objs() for allocation of component cfg
Each component cfg is sized by the size of a per-PARTID multiplied by the number of PARTIDs. On a platform sized to push the limits of the specification, the allocation using kzalloc_objs() will consistently fail. Change to use kvzmalloc_objs() so that large allocations fall back to vmalloc() based allocations. Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
Diffstat (limited to 'drivers/resctrl')
-rw-r--r--drivers/resctrl/mpam_devices.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c
index 67545df984fa..527867ab5f1b 100644
--- a/drivers/resctrl/mpam_devices.c
+++ b/drivers/resctrl/mpam_devices.c
@@ -157,7 +157,7 @@ static void mpam_free_garbage(void)
if (iter->pdev)
devm_kfree(&iter->pdev->dev, iter->to_free);
else
- kfree(iter->to_free);
+ kvfree(iter->to_free);
}
}
@@ -2698,7 +2698,7 @@ static int __allocate_component_cfg(struct mpam_component *comp)
if (comp->cfg)
return 0;
- comp->cfg = kzalloc_objs(*comp->cfg, mpam_partid_max + 1);
+ comp->cfg = kvzalloc_objs(*comp->cfg, mpam_partid_max + 1);
if (!comp->cfg)
return -ENOMEM;