[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141022222936.GE12296@jhogan-linux.le.imgtec.org>
Date: Wed, 22 Oct 2014 23:29:36 +0100
From: James Hogan <james.hogan@...tec.com>
To: John Crispin <blogic@...nwrt.org>
CC: <eunb.song@...sung.com>,
"ralf@...ux-mips.org" <ralf@...ux-mips.org>,
"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mips: add arch_trigger_all_cpu_backtrace() function
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists