[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Patch v2 1/2] xen/compiler: Replace opencoded __attribute__((noreturn))

On 25/11/13 14:17, Jan Beulich wrote:
>>>> On 25.11.13 at 15:02, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>> Changes in v2:
>>  * Remove redundant uses from publically declared functions
> Which you got wrong in at least one case:
>> --- a/xen/arch/x86/crash.c
>> +++ b/xen/arch/x86/crash.c
>> @@ -36,7 +36,7 @@ static unsigned int crashing_cpu;
>>  static DEFINE_PER_CPU_READ_MOSTLY(bool_t, crash_save_done);
>>  /* This becomes the NMI handler for non-crashing CPUs, when Xen is 
>> crashing. 
>> */
>> -void __attribute__((noreturn)) do_nmi_crash(struct cpu_user_regs *regs)
>> +void do_nmi_crash(struct cpu_user_regs *regs)
> This function isn't being declared anywhere. The correct thing would
> be to add a declaration, the second best thing to keep the (shortened)
> annotation here.
> Jan

It is.  It is declared using


in include/asm-x86/processor.h which cant easily have a noreturn
shoehorned in.

The only caller is from entry.S, with no callers from C code.

Thinking about it, the DECLARE_TRAP_HANDLER() is overkill, and can be
removed in preference of a simple

void do_crash_nmi(void) noreturn;


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.