diff options
author | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | 2017-11-08 05:23:51 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-11-12 01:03:09 +0300 |
commit | ece4e51291485bb4a71ff554964948b02ab89823 (patch) | |
tree | f722ec64af37c7c40a3a565869a565975e23b5c2 /arch/powerpc/platforms/powernv/vas.c | |
parent | d4ef61b5e8955fb913e2e1a6c1533414859a839d (diff) | |
download | linux-ece4e51291485bb4a71ff554964948b02ab89823.tar.xz |
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>
Diffstat (limited to 'arch/powerpc/platforms/powernv/vas.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/vas.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/vas.c b/arch/powerpc/platforms/powernv/vas.c index cd9a733d05e2..c488621dbec3 100644 --- a/arch/powerpc/platforms/powernv/vas.c +++ b/arch/powerpc/platforms/powernv/vas.c @@ -22,7 +22,7 @@ #include "vas.h" -static DEFINE_MUTEX(vas_mutex); +DEFINE_MUTEX(vas_mutex); static LIST_HEAD(vas_instances); static DEFINE_PER_CPU(int, cpu_vas_id); @@ -86,6 +86,8 @@ static int init_vas_instance(struct platform_device *pdev) list_add(&vinst->node, &vas_instances); mutex_unlock(&vas_mutex); + vas_instance_init_dbgdir(vinst); + dev_set_drvdata(&pdev->dev, vinst); return 0; @@ -157,6 +159,8 @@ static int __init vas_init(void) int found = 0; struct device_node *dn; + vas_init_dbgdir(); + platform_driver_register(&vas_driver); for_each_compatible_node(dn, NULL, "ibm,vas") { |