]> git.baikalelectronics.ru Git - kernel.git/commit
cxl: Fix refcounting in kernel API
authorMichael Neuling <mikey@neuling.org>
Tue, 7 Jul 2015 01:01:17 +0000 (11:01 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Jul 2015 09:38:37 +0000 (19:38 +1000)
commit1e4303eafbc5611859ec8af197a208b93b417d5c
treec8b03ff06197cace0cf0457987083300b6d22c45
parent58c701ba391d9c8f35ae2896fad026144ffc87e8
cxl: Fix refcounting in kernel API

Currently the kernel API AFU dev refcounting is done on context start and stop.
This patch moves this refcounting to context init and release, bringing it
inline with how the userspace API does it.

Without this we've seen the refcounting on the AFU get out of whack between the
user and kernel API usage.  This causes the AFU structures to be freed when
they are actually still in use.

This fixes some kref warnings we've been seeing and spurious ErrIVTE IRQs.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/api.c