All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Keir Fraser <keir@xen.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>
Subject: Re: [Patch v2 1/2] xen/compiler: Replace opencoded __attribute__((noreturn))
Date: Mon, 25 Nov 2013 15:29:10 +0000	[thread overview]
Message-ID: <52936CC6.2090407@citrix.com> (raw)
In-Reply-To: <52936A250200007800106B26@nat28.tlf.novell.com>

On 25/11/13 14:17, Jan Beulich wrote:
>>>> On 25.11.13 at 15:02, Andrew Cooper <andrew.cooper3@citrix.com> 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

DECLARE_TRAP_HANDLER(nmi_crash);

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;

~Andrew

  reply	other threads:[~2013-11-25 15:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 14:02 [PATCH v2 0/2] Improvements with noreturn Andrew Cooper
2013-11-25 14:02 ` [Patch v2 1/2] xen/compiler: Replace opencoded __attribute__((noreturn)) Andrew Cooper
2013-11-25 14:17   ` Jan Beulich
2013-11-25 15:29     ` Andrew Cooper [this message]
2013-11-26 12:00   ` George Dunlap
2013-11-25 14:02 ` [Patch v2 2/2] xen: Identify panic and reboot/halt functions as noreturn Andrew Cooper
2013-11-25 14:26   ` Jan Beulich
2013-11-25 15:36     ` Andrew Cooper
2013-11-25 19:46 ` [PATCH v2 0/2] Improvements with noreturn Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52936CC6.2090407@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.