mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
drivers: pva: change kmalloc for kvmalloc for elf
when loading lf, a local buffer is allocated to process the elf. switch to using kvmalloc from kmalloc to be able to handle memory pressure situations better. Bug 4562933 Change-Id: Ie78d2d2a56f13e09e98bf6888ccc76ffb0ecfb12 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3114106 Reviewed-by: Omar Nemri <onemri@nvidia.com> Tested-by: Omar Nemri <onemri@nvidia.com> Reviewed-by: Jonas Toelke <jtoelke@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
fc8c410eb6
commit
318fd1fe91
@@ -618,7 +618,7 @@ static int pva_register_vpu_exec(struct pva_private *priv, void *arg)
|
||||
int err = 0;
|
||||
|
||||
data_size = reg_in->exe_data.size;
|
||||
exec_data = kmalloc(data_size, GFP_KERNEL);
|
||||
exec_data = kvmalloc(data_size, GFP_KERNEL);
|
||||
if (exec_data == NULL) {
|
||||
nvpva_err(&priv->pva->pdev->dev,
|
||||
"failed to allocate memory for elf");
|
||||
@@ -671,7 +671,7 @@ static int pva_register_vpu_exec(struct pva_private *priv, void *arg)
|
||||
free_mem:
|
||||
|
||||
if (exec_data != NULL)
|
||||
kfree(exec_data);
|
||||
kvfree(exec_data);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user