From: Vinod Koul <vinod.koul@intel.com>
To: Michal Suchanek <hramrach@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] dmaengine: pl330: event debug messages.
Date: Wed, 19 Aug 2015 22:11:15 +0530 [thread overview]
Message-ID: <20150819164115.GG13546@localhost> (raw)
In-Reply-To: <c73013adee799f93a2cd4f5329901479251a1594.1438078857.git.hramrach@gmail.com>
On Tue, Jul 28, 2015 at 10:49:33AM +0000, Michal Suchanek wrote:
> In pl330.c is a define which enables very verbose decoding of genereted
> programs.
>
> Also add decoding of thread abort states and signalled events.
>
> Signed-off-by: Michal Suchanek <hramrach@gmail.com>
> ---
> drivers/dma/pl330.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 53 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 257e0d9..9b02936 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -1318,6 +1318,10 @@ static int _setup_req(unsigned dry_run, struct pl330_thread *thrd,
> u8 *buf = req->mc_cpu;
> int off = 0;
>
> + if (!dry_run)
> + dev_dbg(thrd->dmac->ddma.dev,
> + "setting up request on thread %i", thrd->id);
> +
> PL330_DBGMC_START(req->mc_bus);
>
> /* DMAMOV CCR, ccr */
> @@ -1545,6 +1549,20 @@ static int pl330_update(struct pl330_dmac *pl330)
> pl330->dmac_tbd.reset_mngr = true;
> else
> pl330->dmac_tbd.reset_mngr = false;
> +#ifdef PL330_DEBUG_MCGEN
do we need this here?
> + if (val) {
> + val = readl(regs + FTM);
> + dev_info(pl330->ddma.dev,
> + "Manager thread fault %s%s%s%s%s%s",
> + (val & (1 << 30)) ? "dbg iface" : "sys mem",
> + (val & (1 << 16)) ? " fetch error" : "",
> + (val & (1 << 5)) ? " event sec error" : "",
> + (val & (1 << 4)) ? " channel sec error" : "",
> + (val & (1 << 1)) ? " invalid operand" : "",
> + (val & (1 << 0)) ? " invalid instruction" : ""
> + );
> + }
> +#endif
>
> val = readl(regs + FSC) & ((1 << pl330->pcfg.num_chan) - 1);
> pl330->dmac_tbd.reset_chan |= val;
> @@ -1552,10 +1570,41 @@ static int pl330_update(struct pl330_dmac *pl330)
> int i = 0;
> while (i < pl330->pcfg.num_chan) {
> if (val & (1 << i)) {
> + u32 fault = readl(regs + FTC(i));
> +#ifdef PL330_DEBUG_MCGEN
> + dev_info(pl330->ddma.dev,
> + "DMA thread fault"
> + "%s%s%s%s%s%s%s%s%s%s%s%s",
This break grep! also looks very ugly and should be a dev_debug rather
> + (fault & (1 << 31)) ?
> + " lockup" : "",
> + (fault & (1 << 30)) ?
> + " dbg iface" : " sys mem",
> + (fault & (1 << 18)) ?
> + " read error" : "",
> + (fault & (1 << 17)) ?
> + " write error" : "",
> + (fault & (1 << 16)) ?
> + " instr fetch error" : "",
> + (fault & (1 << 12)) ?
> + " mfifo over/underflow" : "",
> + (fault & (1 << 7)) ?
> + " data sec error" : "",
> + (fault & (1 << 6)) ?
> + " periph sec error" : "",
> + (fault & (1 << 5)) ?
> + " event sec error" : "",
> + (fault & (1 << 4)) ?
> + " channel sec error" : "",
> + (fault & (1 << 1)) ?
> + " invalid operand" : "",
> + (fault & (1 << 0)) ?
> + " invalid instruction" : ""
> + );
> +#endif
> dev_info(pl330->ddma.dev,
> "Reset Channel-%d\t CS-%x FTC-%x\n",
> i, readl(regs + CS(i)),
> - readl(regs + FTC(i)));
> + fault);
> _stop(&pl330->channels[i]);
> }
> i++;
> @@ -1587,6 +1636,9 @@ static int pl330_update(struct pl330_dmac *pl330)
>
> id = pl330->events[ev];
>
> + dev_dbg(pl330->ddma.dev,
> + "event signalled on thread id %i", id);
> +
> thrd = &pl330->channels[id];
>
> active = thrd->req_running;
> --
> 2.1.4
>
--
~Vinod
next parent reply other threads:[~2015-08-19 16:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1438078857.git.hramrach@gmail.com>
[not found] ` <c73013adee799f93a2cd4f5329901479251a1594.1438078857.git.hramrach@gmail.com>
2015-08-19 16:41 ` Vinod Koul [this message]
2015-08-19 18:19 ` [PATCH 2/2] dmaengine: pl330: event debug messages Michal Suchanek
[not found] ` <a86692e4ffd0c56dfce5f6f6b353effedd9e5457.1438078857.git.hramrach@gmail.com>
2015-08-19 16:42 ` [PATCH 1/2] dmaengine: pl330: do not emit loop for 1 byte transfer Vinod Koul
2015-08-19 23:58 ` Krzysztof Kozłowski
2015-08-20 0:57 ` Vinod Koul
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=20150819164115.GG13546@localhost \
--to=vinod.koul@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=hramrach@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.