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

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2017-11-01 03:56:19 +10:00
parent d52ddc953e
commit 54c70e3ac6

View File

@ -37,7 +37,7 @@ nvkm_instobj_load(struct nvkm_instobj *iobj)
for (i = 0; i < size; i += 4)
nvkm_wo32(memory, i, iobj->suspend[i / 4]);
vfree(iobj->suspend);
kvfree(iobj->suspend);
iobj->suspend = NULL;
}
@ -48,7 +48,7 @@ nvkm_instobj_save(struct nvkm_instobj *iobj)
const u64 size = nvkm_memory_size(memory);
int i;
iobj->suspend = vmalloc(size);
iobj->suspend = kvmalloc(size, GFP_KERNEL);
if (!iobj->suspend)
return -ENOMEM;