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-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=54c70e3ac6d5634982edd586418710eb7fbb7c76;p=openwrt%2Fstaging%2Fblogic.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 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;