From: Haren Myneni <haren@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org,
mpe@ellerman.id.au, npiggin@gmail.com, mikey@neuling.org,
herbert@gondor.apana.org.au
Cc: sukadev@linux.vnet.ibm.com
Subject: [PATCH 10/14] powerpc/vas: Print CRB and FIFO values
Date: Tue, 26 Nov 2019 17:12:21 -0800 [thread overview]
Message-ID: <1574817141.13250.18.camel@hbabu-laptop> (raw)
Dump FIFO values if could not find send window and print CRB for
debugging.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Haren Myneni <haren@us.ibm.com>
---
arch/powerpc/platforms/powernv/vas-fault.c | 40 ++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/vas-fault.c b/arch/powerpc/platforms/powernv/vas-fault.c
index dd27649..ad594c8 100644
--- a/arch/powerpc/platforms/powernv/vas-fault.c
+++ b/arch/powerpc/platforms/powernv/vas-fault.c
@@ -36,6 +36,27 @@ void vas_wakeup_fault_handler(int virq, void *arg)
wake_up(&vinst->fault_wq);
}
+static void dump_crb(struct coprocessor_request_block *crb)
+{
+ struct data_descriptor_entry *dde;
+ struct nx_fault_stamp *nx;
+
+ dde = &crb->source;
+ pr_devel("SrcDDE: addr 0x%llx, len %d, count %d, idx %d, flags %d\n",
+ be64_to_cpu(dde->address), be32_to_cpu(dde->length),
+ dde->count, dde->index, dde->flags);
+
+ dde = &crb->target;
+ pr_devel("TgtDDE: addr 0x%llx, len %d, count %d, idx %d, flags %d\n",
+ be64_to_cpu(dde->address), be32_to_cpu(dde->length),
+ dde->count, dde->index, dde->flags);
+
+ nx = &crb->stamp.nx;
+ pr_devel("NX Stamp: PSWID 0x%x, FSA 0x%llx, flags 0x%x, FS 0x%x\n",
+ be32_to_cpu(nx->pswid), crb_nx_fault_addr(crb),
+ nx->flags, be32_to_cpu(nx->fault_status));
+}
+
static void notify_process(pid_t pid, u64 fault_addr)
{
int rc;
@@ -154,6 +175,23 @@ static void update_csb(struct vas_window *window,
}
}
+static void dump_fifo(struct vas_instance *vinst)
+{
+ int i;
+ unsigned long *fifo = vinst->fault_fifo;
+
+ pr_err("Fault fifo size %d, max crbs %d, crb size %lu\n",
+ vinst->fault_fifo_size,
+ vinst->fault_fifo_size / CRB_SIZE,
+ sizeof(struct coprocessor_request_block));
+
+ pr_err("Fault FIFO Dump:\n");
+ for (i = 0; i < 64; i += 4, fifo += 4) {
+ pr_err("[%.3d, %p]: 0x%.16lx 0x%.16lx 0x%.16lx 0x%.16lx\n",
+ i, fifo, *fifo, *(fifo+1), *(fifo+2), *(fifo+3));
+ }
+}
+
/*
* Process CRBs that we receive on the fault window.
*/
@@ -211,6 +249,7 @@ static void process_fault_crbs(struct vas_instance *vinst)
vinst->fault_crbs,
atomic_read(&vinst->pending_fault));
+ dump_crb(crb);
window = vas_pswid_to_window(vinst, crb_nx_pswid(crb));
if (IS_ERR(window)) {
@@ -220,6 +259,7 @@ static void process_fault_crbs(struct vas_instance *vinst)
* even clean it up (return credit).
* But we should not get here.
*/
+ dump_fifo(vinst);
pr_err("VAS[%d] fault_fifo %p, fifo %p, pswid 0x%x, fault_crbs %d, pending %d bad CRB?\n",
vinst->vas_id, vinst->fault_fifo, fifo,
crb_nx_pswid(crb), vinst->fault_crbs,
--
1.8.3.1
reply other threads:[~2019-11-27 1:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1574817141.13250.18.camel@hbabu-laptop \
--to=haren@linux.vnet.ibm.com \
--cc=devicetree@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=sukadev@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox