From: Ben Skeggs Date: Tue, 31 Oct 2017 17:56:19 +0000 (+1000) Subject: drm/nouveau/imem: switch to kvmalloc/kvfree for suspend/resume backup X-Git-Tag: v5.15~9607^2^2~127 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54c70e3ac6d5634982edd586418710eb7fbb7c76;p=platform%2Fkernel%2Flinux-starfive.git drm/nouveau/imem: switch to kvmalloc/kvfree for suspend/resume backup Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c index 8ad31b4..36b34241 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;