Skip to contentSkip to conversation

mips: add arch_trigger_all_cpu_backtrace() function

PATCH Eunbong Song 3 participants 3 messages Oct 22, 2014 MIPS

lore
Share & tools
lore
#0 lore raw
Quoted 10 lines

Hi Eubong,

one small question inline ...

Quoted 2 lines

+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.

Quoted 1 line

John

�淸�{.n�+돴윯돪�+%듚�깁負쪐w��{.n�+돴쪐{깸G쳺��{ay����,j�f"톒쉹��묎�z_溫(�쉸듶줷"얎�m����G쳺�◀?솳鈺�&x�~뤳턨O뺞촾퇉v�^�m��� �띠�◀?뻀�

#1 lore raw
Quoted 42 lines · Eunbong Song
Quoted 10 lines

Hi Eubong,

one small question inline ...

Quoted 2 lines

+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;
}
Quoted 5 lines

#endif

Thanks.

Quoted 1 line

John

i don't see how this is required for conditional compiles. the code define a->a which is bogus i think.

John

#2 lore raw

Hi John,

Quoted 40 lines · John Crispin
Quoted 39 lines · Eunbong Song
Quoted 5 lines
Quoted 2 lines

+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

Quoted 6 lines
Quoted 3 lines

Thanks.

Quoted 1 line

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