Browse Source

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

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs 8 years ago
parent
commit
54c70e3ac6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c

+ 2 - 2
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c

@@ -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;