powerpc/vas: Export HVWC to debugfs
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Wed, 8 Nov 2017 02:23:51 +0000 (18:23 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 11 Nov 2017 22:03:09 +0000 (09:03 +1100)
commitece4e51291485bb4a71ff554964948b02ab89823
treef722ec64af37c7c40a3a565869a565975e23b5c2
parentd4ef61b5e8955fb913e2e1a6c1533414859a839d
powerpc/vas: Export HVWC to debugfs

Export the VAS Window context information to debugfs.

We need to hold a mutex when closing the window to prevent a race
with the debugfs read(). Rather than introduce a per-instance mutex,
we use the global vas_mutex for now, since it is not heavily contended.

The window->cop field is only relevant to a receive window so we were
not setting it for a send window (which is is paired to a receive window
anyway). But to simplify reporting in debugfs, set the 'cop' field for the
send window also.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/vas-debug.c [new file with mode: 0644]
arch/powerpc/platforms/powernv/vas-window.c
arch/powerpc/platforms/powernv/vas.c
arch/powerpc/platforms/powernv/vas.h