Blob Blame History Raw
From: Ben Skeggs <bskeggs@redhat.com>
Date: Wed, 1 Nov 2017 03:56:19 +1000
Subject: drm/nouveau/imem: switch to kvmalloc/kvfree for suspend/resume backup
Git-commit: 54c70e3ac6d5634982edd586418710eb7fbb7c76
Patch-mainline: v4.15-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 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 *i
 
 	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 *i
 	const u64 size = nvkm_memory_size(memory);
 	int i;
 
-	iobj->suspend = vmalloc(size);
+	iobj->suspend = kvmalloc(size, GFP_KERNEL);
 	if (!iobj->suspend)
 		return -ENOMEM;