Commit 54c70e3a authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/imem: switch to kvmalloc/kvfree for suspend/resume backup

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent d52ddc95
...@@ -37,7 +37,7 @@ nvkm_instobj_load(struct nvkm_instobj *iobj) ...@@ -37,7 +37,7 @@ nvkm_instobj_load(struct nvkm_instobj *iobj)
for (i = 0; i < size; i += 4) for (i = 0; i < size; i += 4)
nvkm_wo32(memory, i, iobj->suspend[i / 4]); nvkm_wo32(memory, i, iobj->suspend[i / 4]);
vfree(iobj->suspend); kvfree(iobj->suspend);
iobj->suspend = NULL; iobj->suspend = NULL;
} }
...@@ -48,7 +48,7 @@ nvkm_instobj_save(struct nvkm_instobj *iobj) ...@@ -48,7 +48,7 @@ nvkm_instobj_save(struct nvkm_instobj *iobj)
const u64 size = nvkm_memory_size(memory); const u64 size = nvkm_memory_size(memory);
int i; int i;
iobj->suspend = vmalloc(size); iobj->suspend = kvmalloc(size, GFP_KERNEL);
if (!iobj->suspend) if (!iobj->suspend)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment