diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2016-07-29 05:06:48 -0400 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2016-08-24 13:17:27 -0400 |
commit | 55467dea2967259f21f4f854fc99d39cc5fea60e (patch) | |
tree | 0747b575c667aecfc3baf90d91764d659bc4565b | |
parent | 9a035a40f7f3f6708b79224b86c5777a3334f7ea (diff) |
xen: change the type of xen_vcpu_id to uint32_t
We pass xen_vcpu_id mapping information to hypercalls which require
uint32_t type so it would be cleaner to have it as uint32_t. The
initializer to -1 can be dropped as we always do the mapping before using
it and we never check the 'not set' value anyway.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r-- | arch/arm/xen/enlighten.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 | ||||
-rw-r--r-- | include/xen/xen-ops.h | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index b0b82f5ea338..3d2cef6488ea 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c | |||
@@ -50,7 +50,7 @@ DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); | |||
50 | static struct vcpu_info __percpu *xen_vcpu_info; | 50 | static struct vcpu_info __percpu *xen_vcpu_info; |
51 | 51 | ||
52 | /* Linux <-> Xen vCPU id mapping */ | 52 | /* Linux <-> Xen vCPU id mapping */ |
53 | DEFINE_PER_CPU(int, xen_vcpu_id) = -1; | 53 | DEFINE_PER_CPU(uint32_t, xen_vcpu_id); |
54 | EXPORT_PER_CPU_SYMBOL(xen_vcpu_id); | 54 | EXPORT_PER_CPU_SYMBOL(xen_vcpu_id); |
55 | 55 | ||
56 | /* These are unused until we support booting "pre-ballooned" */ | 56 | /* These are unused until we support booting "pre-ballooned" */ |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 8ffb089b19a5..b86ebb1a9a7f 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -118,7 +118,7 @@ DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); | |||
118 | DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info); | 118 | DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info); |
119 | 119 | ||
120 | /* Linux <-> Xen vCPU id mapping */ | 120 | /* Linux <-> Xen vCPU id mapping */ |
121 | DEFINE_PER_CPU(int, xen_vcpu_id) = -1; | 121 | DEFINE_PER_CPU(uint32_t, xen_vcpu_id); |
122 | EXPORT_PER_CPU_SYMBOL(xen_vcpu_id); | 122 | EXPORT_PER_CPU_SYMBOL(xen_vcpu_id); |
123 | 123 | ||
124 | enum xen_domain_type xen_domain_type = XEN_NATIVE; | 124 | enum xen_domain_type xen_domain_type = XEN_NATIVE; |
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index 9a37c541822f..b5486e648607 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h | |||
@@ -9,8 +9,8 @@ | |||
9 | 9 | ||
10 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); | 10 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); |
11 | 11 | ||
12 | DECLARE_PER_CPU(int, xen_vcpu_id); | 12 | DECLARE_PER_CPU(uint32_t, xen_vcpu_id); |
13 | static inline int xen_vcpu_nr(int cpu) | 13 | static inline uint32_t xen_vcpu_nr(int cpu) |
14 | { | 14 | { |
15 | return per_cpu(xen_vcpu_id, cpu); | 15 | return per_cpu(xen_vcpu_id, cpu); |
16 | } | 16 | } |