[Xen-devel,2/3] xen/arm: Introduce INVALID_VCPU_ID

Message ID 20170308180602.24430-3-julien.grall@arm.com
State New
Headers show
Series
  • xen/arm: p2m: Perform local invalidation on vCPU migration
Related show

Commit Message

Julien Grall March 8, 2017, 6:06 p.m.
Define INVALID_VCPU_ID as MAX_VIRT_CPUS to avoid casting problem later
on. At the moment it can always fit in uint8_t.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/include/asm-arm/config.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stefano Stabellini March 8, 2017, 6:31 p.m. | #1
On Wed, 8 Mar 2017, Julien Grall wrote:
> Define INVALID_VCPU_ID as MAX_VIRT_CPUS to avoid casting problem later
> on. At the moment it can always fit in uint8_t.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  xen/include/asm-arm/config.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
> index ba61f65a39..6a92f53f72 100644
> --- a/xen/include/asm-arm/config.h
> +++ b/xen/include/asm-arm/config.h
> @@ -46,6 +46,8 @@
>  #define MAX_VIRT_CPUS 8
>  #endif
>  
> +#define INVALID_VCPU_ID MAX_VIRT_CPUS
> +
>  #define asmlinkage /* Nothing needed */
>  
>  #define __LINUX_ARM_ARCH__ 7
> -- 
> 2.11.0
>

Patch hide | download patch | download mbox

diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
index ba61f65a39..6a92f53f72 100644
--- a/xen/include/asm-arm/config.h
+++ b/xen/include/asm-arm/config.h
@@ -46,6 +46,8 @@ 
 #define MAX_VIRT_CPUS 8
 #endif
 
+#define INVALID_VCPU_ID MAX_VIRT_CPUS
+
 #define asmlinkage /* Nothing needed */
 
 #define __LINUX_ARM_ARCH__ 7