mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
@ 2014-10-23  0:29 Eunbong Song
  0 siblings, 0 replies; 2+ messages in thread
From: Eunbong Song @ 2014-10-23  0:29 UTC (permalink / raw)
  To: James Hogan; +Cc: ralf, linux-mips, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 965 bytes --]



>> This patch adds arch_trigger_all_cpu_backtrace() for mips architecture.

> Don't forget your Signed-off-by

I'm sorry fot this. 

>> +static void arch_dump_stack(void *info)
>> +{
>> + struct pt_regs *regs;  
>> + 
>> + regs = get_irq_regs();
>> +
>> + if(regs)
>> + show_regs(regs);
>> +
>> + dump_stack();
>> +}
>> +
>> +void arch_trigger_all_cpu_backtrace(bool include_self)
>> +{
>> + smp_call_function(arch_dump_stack, NULL, 1);

> should this call arch_dump_stack directly too if include_self?
Currently, in case of mips there is no case include_self is true, so this is not a problem. 
arch_trigger_all_cpu_backtrace can only be called from trigger_allbutself_cpu_backtrace() in kernel/watchdog.c.
But as you said, if the case will be added, we should consider that.

Thanks.

> Cheers
> Jamesÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
@ 2014-10-22  6:54 Eunbong Song
  0 siblings, 0 replies; 2+ messages in thread
From: Eunbong Song @ 2014-10-22  6:54 UTC (permalink / raw)
  To: John Crispin, ralf; +Cc: linux-mips, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1236 bytes --]


> Hi Eubong,

> one small question inline ...

>> +void arch_trigger_all_cpu_backtrace(bool); +#define
>> arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace

> What is the purpose of this define ? is this maybe a leftover from
> some regex/cleanups ?

Hi John.
Actually, I just follow the same function of sparc architecture.
You can find this in arch/sparc/include/asm/irq_64.h as below

void arch_trigger_all_cpu_backtrace(bool);
#define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace

I guess this is used for conditional compile. 
See below.
include/linux/nmi.h
#ifdef arch_trigger_all_cpu_backtrace
static inline bool trigger_all_cpu_backtrace(void)
{
        arch_trigger_all_cpu_backtrace(true);

        return true;
}
static inline bool trigger_allbutself_cpu_backtrace(void)
{
        arch_trigger_all_cpu_backtrace(false);
        return true;
}
#else
static inline bool trigger_all_cpu_backtrace(void)
{
        return false;
}
static inline bool trigger_allbutself_cpu_backtrace(void)
{
        return false;
}
#endif

Thanks. 
> John

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-23  0:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-23  0:29 Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function Eunbong Song
  -- strict thread matches above, loose matches on Subject: below --
2014-10-22  6:54 Eunbong Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®