All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Keir Fraser <keir@xen.org>, Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2/3] xen/x86: Use real assert frames for ASSERT_INTERRUPTS_{EN, DIS}ABLED
Date: Tue, 14 Apr 2015 09:38:27 +0100	[thread overview]
Message-ID: <552CEE230200007800071BF3@mail.emea.novell.com> (raw)
In-Reply-To: <1428609983-26998-3-git-send-email-andrew.cooper3@citrix.com>

>>> On 09.04.15 at 22:06, <andrew.cooper3@citrix.com> wrote:
> @@ -26,18 +27,24 @@
>  #endif
>  
>  #ifndef NDEBUG
> -#define ASSERT_INTERRUPT_STATUS(x)              \
> -        pushf;                                  \
> -        testb $X86_EFLAGS_IF>>8,1(%rsp);        \
> -        j##x  1f;                               \
> -        ud2a;                                   \
> -1:      addq  $8,%rsp;
> +#define ASSERT_INTERRUPTS_ENABLED               \
> +    pushf;                                      \
> +    testb $X86_EFLAGS_IF>>8,1(%rsp);            \
> +    jnz   1f;                                   \
> +    ASSERT_FAILED("INTERRUPTS ENABLED");        \
> +1:  addq  $8,%rsp;
> +
> +#define ASSERT_INTERRUPTS_DISABLED              \
> +    pushf;                                      \
> +    testb $X86_EFLAGS_IF>>8,1(%rsp);            \
> +    jz    1f;                                   \
> +    ASSERT_FAILED("INTERRUPTS DISABLED");       \
> +1:  addq  $8,%rsp;
>  #else
> -#define ASSERT_INTERRUPT_STATUS(x)
> +#define ASSERT_INTERRUPTS_ENABLED
> +#define ASSERT_INTERRUPTS_DISABLED
>  #endif
>  
> -#define ASSERT_INTERRUPTS_ENABLED  ASSERT_INTERRUPT_STATUS(nz)
> -#define ASSERT_INTERRUPTS_DISABLED ASSERT_INTERRUPT_STATUS(z)

So what's the point of deleting these and duplicating most of the
macro definition text above?

Jan

  reply	other threads:[~2015-04-14  8:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 20:06 [PATCH 0/3] xen/x86: Improvements to asm assertions Andrew Cooper
2015-04-09 20:06 ` [PATCH 1/3] xen/x86: Infrastructure to create BUG_FRAMES in asm code Andrew Cooper
2015-04-14  8:37   ` Jan Beulich
2015-04-09 20:06 ` [PATCH 2/3] xen/x86: Use real assert frames for ASSERT_INTERRUPTS_{EN, DIS}ABLED Andrew Cooper
2015-04-14  8:38   ` Jan Beulich [this message]
2015-04-09 20:06 ` [PATCH 3/3] DO NOT APPLY - test code for this series Andrew Cooper

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=552CEE230200007800071BF3@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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.