linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RESEND PATCH 4.0-rc5 v19 6/6] ARM: Add support for on-demand backtrace of other CPUs
Date: Wed, 08 Apr 2015 11:48:32 +0100	[thread overview]
Message-ID: <55250780.6090408@linaro.org> (raw)
In-Reply-To: <089201d071d6$f4eb8480$dec28d80$@alibaba-inc.com>

On 08/04/15 09:35, Hillf Danton wrote:
>>
>> +void ipi_cpu_backtrace(struct pt_regs *regs)
>> +{
>> +	int cpu = smp_processor_id();
>> +
>> +	if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {
>> +		printk_nmi_backtrace_this_cpu_begin();
>> +		pr_warn("FIQ backtrace for cpu %d\n", cpu);
>> +		if (regs != NULL)
>> +			show_regs(regs);
>> +		else
>> +			dump_stack();
>
> Help more if we could print both register and stack info.

I think this code already prints as much as it can in all cases.

The arch/arm implementation of show_regs() calls dump_stack() internally 
so the first case does show register and stack info.

In the second case, where regs is NULL because we have been called 
directly from task context, there aren't any saved regs for us to show.


Daniel.

  reply	other threads:[~2015-04-08 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <089101d071d6$4ebe2a90$ec3a7fb0$@alibaba-inc.com>
2015-04-08  8:35 ` [RESEND PATCH 4.0-rc5 v19 6/6] ARM: Add support for on-demand backtrace of other CPUs Hillf Danton
2015-04-08 10:48   ` Daniel Thompson [this message]
2015-03-24 16:53 [PATCH 4.0-rc5 v19 0/6] irq/arm: Implement arch_trigger_all_cpu_backtrace Daniel Thompson
2015-04-07 15:37 ` [RESEND PATCH " Daniel Thompson
2015-04-07 15:38   ` [RESEND PATCH 4.0-rc5 v19 6/6] ARM: Add support for on-demand backtrace of other CPUs Daniel Thompson

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=55250780.6090408@linaro.org \
    --to=daniel.thompson@linaro.org \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).