summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-10-31 18:56:19 +0100
committerBen Skeggs <bskeggs@redhat.com>2017-11-02 04:32:20 +0100
commit54c70e3ac6d5634982edd586418710eb7fbb7c76 (patch)
treec9fedd8e267ef003f0f1d20d4256dd8a28986401 /drivers/gpu/drm/nouveau/nvkm
parentdrm/nouveau/imem: separate suspend/resume backup handling into their own func... (diff)
downloadlinux-54c70e3ac6d5634982edd586418710eb7fbb7c76.tar.xz
linux-54c70e3ac6d5634982edd586418710eb7fbb7c76.zip
drm/nouveau/imem: switch to kvmalloc/kvfree for suspend/resume backup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c
index 8ad31b436fa0..36b3424149b3 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c
+++ b/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;