mirror of
https://github.com/torvalds/linux.git
synced 2024-12-31 23:31:29 +00:00
drm/nouveau/imem: switch to kvmalloc/kvfree for suspend/resume backup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
d52ddc953e
commit
54c70e3ac6
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user