* Re: Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
@ 2014-10-22 6:54 ` Eunbong Song
0 siblings, 0 replies; 7+ messages in thread
From: Eunbong Song @ 2014-10-22 6:54 UTC (permalink / raw)
To: John Crispin, ralf; +Cc: linux-mips, linux-kernel
> 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
^ permalink raw reply [flat|nested] 7+ 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; 7+ 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] 7+ messages in thread
* Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
2014-10-22 6:54 ` Eunbong Song
(?)
@ 2014-10-22 7:11 ` John Crispin
2014-10-22 22:29 ` James Hogan
-1 siblings, 1 reply; 7+ messages in thread
From: John Crispin @ 2014-10-22 7:11 UTC (permalink / raw)
To: eunb.song, ralf; +Cc: linux-mips, linux-kernel
On 22/10/2014 08:54, Eunbong Song wrote:
>
>> 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
>
i don't see how this is required for conditional compiles. the code
define a->a which is bogus i think.
John
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
@ 2014-10-22 22:29 ` James Hogan
0 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2014-10-22 22:29 UTC (permalink / raw)
To: John Crispin; +Cc: eunb.song, ralf, linux-mips, linux-kernel
Hi John,
On Wed, Oct 22, 2014 at 09:11:39AM +0200, John Crispin wrote:
> On 22/10/2014 08:54, Eunbong Song wrote:
> >>> +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
> >
>
> i don't see how this is required for conditional compiles. the code
> define a->a which is bogus i think.
It's a pretty common pattern in the asm headers, in order to allow
generic code to use the preprocessor to see whether it was defined or
not.
Cheers
James
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
@ 2014-10-22 22:29 ` James Hogan
0 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2014-10-22 22:29 UTC (permalink / raw)
To: John Crispin; +Cc: eunb.song, ralf, linux-mips, linux-kernel
Hi John,
On Wed, Oct 22, 2014 at 09:11:39AM +0200, John Crispin wrote:
> On 22/10/2014 08:54, Eunbong Song wrote:
> >>> +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
> >
>
> i don't see how this is required for conditional compiles. the code
> define a->a which is bogus i think.
It's a pretty common pattern in the asm headers, in order to allow
generic code to use the preprocessor to see whether it was defined or
not.
Cheers
James
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
@ 2014-10-23 0:29 ` Eunbong Song
0 siblings, 0 replies; 7+ 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] 7+ messages in thread
* Re: Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
@ 2014-10-23 0:29 ` Eunbong Song
0 siblings, 0 replies; 7+ messages in thread
From: Eunbong Song @ 2014-10-23 0:29 UTC (permalink / raw)
To: James Hogan; +Cc: ralf, linux-mips, linux-kernel
>> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-10-23 0:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-22 6:54 Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function Eunbong Song
2014-10-22 6:54 ` Eunbong Song
2014-10-22 7:11 ` John Crispin
2014-10-22 22:29 ` James Hogan
2014-10-22 22:29 ` James Hogan
2014-10-23 0:29 Eunbong Song
2014-10-23 0:29 ` Eunbong Song
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.