]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/imem/gk20a: Turn instmem lock into mutex
authorThierry Reding <treding@nvidia.com>
Mon, 30 Jan 2017 20:03:07 +0000 (21:03 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 6 Apr 2017 04:39:03 +0000 (14:39 +1000)
commit029511f9f9b5c8802b7f12cfc7321b14d11ae5ee
tree859f4ebba33ce624533bcaa1b2b59aefe14b602b
parentb23c04a134db24921dd073228ba4431af6f1d08a
drm/nouveau/imem/gk20a: Turn instmem lock into mutex

The gk20a implementation of instance memory uses vmap()/vunmap() to map
memory regions into the kernel's virtual address space. These functions
may sleep, so protecting them by a spin lock is not safe. This triggers
a warning if the DEBUG_ATOMIC_SLEEP Kconfig option is enabled. Fix this
by using a mutex instead.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c