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

Re: [Xen-devel] [PATCH RFC for-4.13 07/10] xen/arm: Allow insn.h to be called from assembly


  • To: Julien Grall <julien.grall@xxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Fri, 27 Sep 2019 11:52:31 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=05Iu/RECcueJe7aAKqssiGqHRRkwkD2raUEd70FNwC4=; b=U8t5W9a26Cn4uOl4GA4B1DKFBW02J91IAap+TjA49+Zik0K/eGo2uvCtWrw2IbZ4XzIcjaUunQMy0QYqjIfH+D8UuAx3eNvXpgkoZTmX4azPjdUszpLNJ2txGc860tWzbI4t9mnUdVUbDks5TJzOXMxi9j6/jFgMd2vGySEN+wxupdKXZJE05L6MID8FtA5eugWM7Rayb/Td9UFvgrqVFVqnGZQmZnSxfADGaedHPJi7RuM0pXfdUFsjQW6WuzOZrgkys1vNwXoW8uERh4b8L6uQprIeBj6ZCiNkuXGVN45rdt6MiCFf9ysN5TAlZGduDJ+exHpKjrmbfJem6s9Rgw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dqIDVgCcoc2uEhweRAzhfIuS+oPm1Lktr4U5CGbKUDEzZSiCdAjFzAFyisiguK2W6ExHaSy4UhI+ws4ARCSSCdU6ofl7DKv2POzhXwvfugUX7bRY/ONRzr6jTbjTOYndKJ2Z/bejYYf2rw7B8dxS6ITjFzcqPmjpTFKwr71ra6zrsAESoveyTwEV6u3ileBkQs3MRzNlhPFb80qj+A7ifKFvz1M7WeYrbiOtr+htNmCo4JAszcnoWJ0oSw6eZZE4cEToMyXrjmXHI7oAALTDTo6e4VrMn8++wzGicEk1sm3gss1UGKchfb/YIMF2acGMCJyHyP74/MAEim37QuCMxQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@xxxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "andrii.anisov@xxxxxxxxx" <andrii.anisov@xxxxxxxxx>
  • Delivery-date: Fri, 27 Sep 2019 11:52:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVdJmUb6JbeQtE50WfKaLczja0p6c/auEA
  • Thread-topic: [PATCH RFC for-4.13 07/10] xen/arm: Allow insn.h to be called from assembly

Julien Grall writes:

> A follow-up patch will require to include insn.h from assembly code. So
> wee need to protect any C-specific definition to avoid compilation
> error when used in assembly code.
>
> Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>

> ---
>  xen/include/asm-arm/insn.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/xen/include/asm-arm/insn.h b/xen/include/asm-arm/insn.h
> index 19277212e1..00391f83f9 100644
> --- a/xen/include/asm-arm/insn.h
> +++ b/xen/include/asm-arm/insn.h
> @@ -1,8 +1,14 @@
>  #ifndef __ARCH_ARM_INSN
>  #define __ARCH_ARM_INSN
>  
> +#ifndef __ASSEMBLY__
> +
>  #include <xen/types.h>
>  
> +/*
> + * At the moment, arch-specific headers contain only definition for C
> + * code.
> + */
>  #if defined(CONFIG_ARM_64)
>  # include <asm/arm64/insn.h>
>  #elif defined(CONFIG_ARM_32)
> @@ -11,6 +17,8 @@
>  # error "unknown ARM variant"
>  #endif
>  
> +#endif /* __ASSEMBLY__ */
> +
>  /* On ARM32,64 instructions are always 4 bytes long. */
>  #define ARCH_PATCH_INSN_SIZE 4


-- 
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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