]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/bzimage: change the types from char * to void *
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 21 Feb 2017 15:41:43 +0000 (15:41 +0000)
committerRoger Pau Monne <roger.pau@citrix.com>
Wed, 22 Feb 2017 12:41:48 +0000 (12:41 +0000)
This allows to also change the types of image_base and image_start in the Dom0
builder from char * to void *.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
Changes since v6:
 - New in this version.

xen/arch/x86/bzimage.c
xen/arch/x86/domain_build.c
xen/include/asm-x86/bzimage.h

index 50ebb84b931649ecacf702b05edeeb9efc2dec5e..ac4fd428be0ec618b45af72c3ab658034b822de4 100644 (file)
@@ -9,9 +9,9 @@
 #include <xen/libelf.h>
 #include <asm/bzimage.h>
 
-static __init unsigned long output_length(char *image, unsigned long image_len)
+static __init unsigned long output_length(void *image, unsigned long image_len)
 {
-    return *(uint32_t *)&image[image_len - 4];
+    return *(uint32_t *)(image + image_len - 4);
 }
 
 struct __packed setup_header {
@@ -71,7 +71,7 @@ static __init int bzimage_check(struct setup_header *hdr, unsigned long len)
 
 static unsigned long __initdata orig_image_len;
 
-unsigned long __init bzimage_headroom(char *image_start,
+unsigned long __init bzimage_headroom(void *image_start,
                                       unsigned long image_length)
 {
     struct setup_header *hdr = (struct setup_header *)image_start;
@@ -104,7 +104,8 @@ unsigned long __init bzimage_headroom(char *image_start,
     return headroom;
 }
 
-int __init bzimage_parse(char *image_base, char **image_start, unsigned long *image_len)
+int __init bzimage_parse(void *image_base, void **image_start,
+                         unsigned long *image_len)
 {
     struct setup_header *hdr = (struct setup_header *)(*image_start);
     int err = bzimage_check(hdr, *image_len);
index adc4c00813a17b71d7d927af74fe3310fe86ccbd..aa1625ac29fc29c75d93c9960f4595f55bb71514 100644 (file)
@@ -1029,9 +1029,9 @@ static int __init construct_dom0_pv(
     start_info_t *si;
     struct vcpu *v = d->vcpu[0];
     unsigned long long value;
-    char *image_base = bootstrap_map(image);
+    void *image_base = bootstrap_map(image);
     unsigned long image_len = image->mod_end;
-    char *image_start = image_base + image_headroom;
+    void *image_start = image_base + image_headroom;
     unsigned long initrd_len = initrd ? initrd->mod_end : 0;
     l4_pgentry_t *l4tab = NULL, *l4start = NULL;
     l3_pgentry_t *l3tab = NULL, *l3start = NULL;
index 0bf5bca67a0c223f08f75dcd72d0eac3da9fa46b..7ed69d39103de7eba5bbf8fc79c83ffda1bd4d89 100644 (file)
@@ -3,9 +3,9 @@
 
 #include <xen/init.h>
 
-unsigned long bzimage_headroom(char *image_start, unsigned long image_length);
+unsigned long bzimage_headroom(void *image_start, unsigned long image_length);
 
-int bzimage_parse(char *image_base, char **image_start,
+int bzimage_parse(void *image_base, void **image_start,
                   unsigned long *image_len);
 
 #endif /* __X86_BZIMAGE_H__ */