]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen: change the type of xen_vcpu_id to uint32_t
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 29 Jul 2016 09:06:48 +0000 (11:06 +0200)
committerBob Liu <bob.liu@oracle.com>
Thu, 20 Oct 2016 08:04:48 +0000 (04:04 -0400)
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>
(cherry picked from commit 55467dea2967259f21f4f854fc99d39cc5fea60e)
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Orabug: 24820937

arch/arm/xen/enlighten.c
arch/x86/xen/enlighten.c
include/xen/xen-ops.h

index 1f26b623b59bf35a257e7effda5cfa49a3322507..ed24788a96eb42c14ef92b96a9ac941f1d02f62d 100644 (file)
@@ -42,7 +42,7 @@ DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
 static struct vcpu_info __percpu *xen_vcpu_info;
 
 /* Linux <-> Xen vCPU id mapping */
-DEFINE_PER_CPU(int, xen_vcpu_id) = -1;
+DEFINE_PER_CPU(uint32_t, xen_vcpu_id);
 EXPORT_PER_CPU_SYMBOL(xen_vcpu_id);
 
 /* These are unused until we support booting "pre-ballooned" */
index 1aa26c1c48d99f304fdf4da8c356ab723885620c..115d0b581097333fc2892b56d66702b2e1576da1 100644 (file)
@@ -120,7 +120,7 @@ DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
 DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info);
 
 /* Linux <-> Xen vCPU id mapping */
-DEFINE_PER_CPU(int, xen_vcpu_id) = -1;
+DEFINE_PER_CPU(uint32_t, xen_vcpu_id);
 EXPORT_PER_CPU_SYMBOL(xen_vcpu_id);
 
 enum xen_domain_type xen_domain_type = XEN_NATIVE;
index 9a37c541822f6093aa86188484e5a6463e214e96..b5486e64860759aed11763ac983b3b4aa12988b3 100644 (file)
@@ -9,8 +9,8 @@
 
 DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu);
 
-DECLARE_PER_CPU(int, xen_vcpu_id);
-static inline int xen_vcpu_nr(int cpu)
+DECLARE_PER_CPU(uint32_t, xen_vcpu_id);
+static inline uint32_t xen_vcpu_nr(int cpu)
 {
        return per_cpu(xen_vcpu_id, cpu);
 }