[PATCH v2 2/3] cxl: Fix driver use count

Michael Ellerman mpe at ellerman.id.au
Wed Aug 30 23:18:19 AEST 2017


Frederic Barrat <fbarrat at linux.vnet.ibm.com> writes:

> cxl keeps a driver use count, which is used with the hash memory model
> on p8 to know when to upgrade local TLBIs to global and to trigger
> callbacks to manage the MMU for PSL8.
>
> If a process opens a context and closes without attaching or fails the
> attachment, the driver use count is never decremented. As a
> consequence, TLB invalidations remain global, even if there are no
> active cxl contexts.
>
> We should increment the driver use count when the process is attaching
> to the cxl adapter, and not on open. It's not needed before the
> adapter starts using the context and the use count is decremented on
> the detach path, so it makes more sense.
>
> It affects only the user api. The kernel api is already doing The
> Right Thing.
>
> Signed-off-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
> Cc: stable at vger.kernel.org # v4.2+
> Fixes: 7bb5d91a4dda ("cxl: Rework context lifetimes")
> Acked-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

I'll pick this up straight away, because it's a fix.

So you can drop this from the series.

cheers


More information about the Linuxppc-dev mailing list