All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Wei Liu <wl@xen.org>, Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH 1/4] x86: replace __ASM_{CL,ST}AC
Date: Mon, 27 Jul 2020 16:55:26 +0200	[thread overview]
Message-ID: <20200727145526.GR7191@Air-de-Roger> (raw)
In-Reply-To: <fc8e042e-fef8-ac38-34d8-16b13e4b0135@suse.com>

On Wed, Jul 15, 2020 at 12:48:14PM +0200, Jan Beulich wrote:
> Introduce proper assembler macros instead, enabled only when the
> assembler itself doesn't support the insns. To avoid duplicating the
> macros for assembly and C files, have them processed into asm-macros.h.
> This in turn requires adding a multiple inclusion guard when generating
> that header.
> 
> No change to generated code.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -235,7 +235,10 @@ $(BASEDIR)/include/asm-x86/asm-macros.h:
>  	echo '#if 0' >$@.new
>  	echo '.if 0' >>$@.new
>  	echo '#endif' >>$@.new
> +	echo '#ifndef __ASM_MACROS_H__' >>$@.new
> +	echo '#define __ASM_MACROS_H__' >>$@.new
>  	echo 'asm ( ".include \"$@\"" );' >>$@.new
> +	echo '#endif /* __ASM_MACROS_H__ */' >>$@.new
>  	echo '#if 0' >>$@.new
>  	echo '.endif' >>$@.new
>  	cat $< >>$@.new
> --- a/xen/arch/x86/arch.mk
> +++ b/xen/arch/x86/arch.mk
> @@ -20,6 +20,7 @@ $(call as-option-add,CFLAGS,CC,"rdrand %
>  $(call as-option-add,CFLAGS,CC,"rdfsbase %rax",-DHAVE_AS_FSGSBASE)
>  $(call as-option-add,CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT)
>  $(call as-option-add,CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED)
> +$(call as-option-add,CFLAGS,CC,"clac",-DHAVE_AS_CLAC_STAC)
>  $(call as-option-add,CFLAGS,CC,"clwb (%rax)",-DHAVE_AS_CLWB)
>  $(call as-option-add,CFLAGS,CC,".equ \"x\"$$(comma)1",-DHAVE_AS_QUOTED_SYM)
>  $(call as-option-add,CFLAGS,CC,"invpcid (%rax)$$(comma)%rax",-DHAVE_AS_INVPCID)
> --- a/xen/arch/x86/asm-macros.c
> +++ b/xen/arch/x86/asm-macros.c
> @@ -1 +1,2 @@
> +#include <asm/asm-defns.h>
>  #include <asm/alternative-asm.h>
> --- /dev/null
> +++ b/xen/include/asm-x86/asm-defns.h

Maybe this could be asm-insn.h or a different name? I find it
confusing to have asm-defns.h and an asm_defs.h.

Thanks, Roger.


  reply	other threads:[~2020-07-27 14:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 10:47 [PATCH 0/4] x86: some assembler macro rework Jan Beulich
2020-07-15 10:48 ` [PATCH 1/4] x86: replace __ASM_{CL,ST}AC Jan Beulich
2020-07-27 14:55   ` Roger Pau Monné [this message]
2020-07-27 19:47     ` Jan Beulich
2020-07-28  9:06       ` Roger Pau Monné
2020-07-31  8:05         ` Jan Beulich
2020-07-31  8:12           ` Roger Pau Monné
2020-07-28 13:59       ` Andrew Cooper
2020-07-28 19:24         ` Jan Beulich
2020-07-28 13:55   ` Andrew Cooper
2020-07-28 19:18     ` Jan Beulich
2020-07-31  8:00     ` Jan Beulich
2020-07-15 10:48 ` [PATCH 2/4] x86: reduce CET-SS related #ifdef-ary Jan Beulich
2020-07-27 15:00   ` Roger Pau Monné
2020-07-27 19:50     ` Jan Beulich
2020-07-28  8:36       ` Roger Pau Monné
2020-07-28 14:29   ` Andrew Cooper
2020-07-28 19:33     ` Jan Beulich
2020-07-15 10:49 ` [PATCH 3/4] x86: drop ASM_{CL,ST}AC Jan Beulich
2020-07-27 15:10   ` Roger Pau Monné
2020-07-28 14:51   ` Andrew Cooper
2020-07-28 19:41     ` Jan Beulich
2020-07-15 10:49 ` [PATCH 4/4] x86: fold indirect_thunk_asm.h into asm-defns.h Jan Beulich
2020-07-27 15:16   ` Roger Pau Monné

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=20200727145526.GR7191@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=wl@xen.org \
    --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.