From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753343AbbDHKsi (ORCPT ); Wed, 8 Apr 2015 06:48:38 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:33601 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753228AbbDHKse (ORCPT ); Wed, 8 Apr 2015 06:48:34 -0400 Message-ID: <55250780.6090408@linaro.org> Date: Wed, 08 Apr 2015 11:48:32 +0100 From: Daniel Thompson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Hillf Danton CC: linux-kernel , Russell King , Steven Rostedt Subject: Re: [RESEND PATCH 4.0-rc5 v19 6/6] ARM: Add support for on-demand backtrace of other CPUs References: <089101d071d6$4ebe2a90$ec3a7fb0$@alibaba-inc.com> <089201d071d6$f4eb8480$dec28d80$@alibaba-inc.com> In-Reply-To: <089201d071d6$f4eb8480$dec28d80$@alibaba-inc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.