ia64/xen-unstable

changeset 12950:877361bfe3ae

[TOOLS][POWERPC] Fix build breakage in powerpc64/xc_linux_build.c
The patch "[SOLARIS] Don't build ptrace code on Solaris." from
xen-unstable now causes siginfo.h to be included which
#defines "si_addr" to "_sifields._sigfault.si_addr".
and breaks the build of powerpc64/xc_linux_build.c.
This patch renames
si_addr -> start_info_addr
si -> start_info (for consistency)
and
start_info -> si (in load_devtree beuse of the renaming above)
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Wed Oct 18 06:24:57 2006 -0400 (2006-10-18)
parents 4eefe4d31afa
children f2aaf35c7759
files tools/libxc/powerpc64/xc_linux_build.c
line diff
     1.1 --- a/tools/libxc/powerpc64/xc_linux_build.c	Thu Oct 12 18:22:26 2006 -0500
     1.2 +++ b/tools/libxc/powerpc64/xc_linux_build.c	Wed Oct 18 06:24:57 2006 -0400
     1.3 @@ -167,10 +167,10 @@ static int load_devtree(
     1.4      unsigned long devtree_addr,
     1.5      uint64_t initrd_base,
     1.6      unsigned long initrd_len,
     1.7 -    start_info_t *si,
     1.8 -    unsigned long si_addr)
     1.9 +    start_info_t *start_info __attribute__((unused)),
    1.10 +    unsigned long start_info_addr)
    1.11  {
    1.12 -    uint32_t start_info[4] = {0, si_addr, 0, 0x1000};
    1.13 +    uint32_t start_info[4] = {0, start_info_addr, 0, 0x1000};
    1.14      struct boot_param_header *header;
    1.15      void *chosen;
    1.16      void *xen;
    1.17 @@ -209,8 +209,7 @@ static int load_devtree(
    1.18      }
    1.19  
    1.20      /* start-info (XXX being removed soon) */
    1.21 -    rc = ft_set_prop(&devtree, xen, "start-info",
    1.22 -            start_info, sizeof(start_info));
    1.23 +    rc = ft_set_prop(&devtree, xen, "start-info", start_info, sizeof(start_info));
    1.24      if (rc < 0) {
    1.25          DPRINTF("couldn't set /xen/start-info\n");
    1.26          return rc;
    1.27 @@ -334,24 +333,24 @@ out:
    1.28      return rc;
    1.29  }
    1.30  
    1.31 -static unsigned long create_start_info(start_info_t *si,
    1.32 +static unsigned long create_start_info(start_info_t *start_info,
    1.33          unsigned int console_evtchn, unsigned int store_evtchn,
    1.34          unsigned long nr_pages)
    1.35  {
    1.36 -    unsigned long si_addr;
    1.37 -
    1.38 -    memset(si, 0, sizeof(*si));
    1.39 -    snprintf(si->magic, sizeof(si->magic), "xen-%d.%d-powerpc64HV", 3, 0);
    1.40 +    unsigned long start_info_addr;
    1.41  
    1.42 -    si->nr_pages = nr_pages;
    1.43 -    si->shared_info = (nr_pages - 1) << PAGE_SHIFT;
    1.44 -    si->store_mfn = si->nr_pages - 2;
    1.45 -    si->store_evtchn = store_evtchn;
    1.46 -    si->console.domU.mfn = si->nr_pages - 3;
    1.47 -    si->console.domU.evtchn = console_evtchn;
    1.48 -    si_addr = (si->nr_pages - 4) << PAGE_SHIFT;
    1.49 +    memset(start_info, 0, sizeof(*start_info));
    1.50 +    snprintf(start_info->magic, sizeof(start_info->magic), "xen-%d.%d-powerpc64HV", 3, 0);
    1.51  
    1.52 -    return si_addr;
    1.53 +    start_info->nr_pages = nr_pages;
    1.54 +    start_info->shared_info = (nr_pages - 1) << PAGE_SHIFT;
    1.55 +    start_info->store_mfn = start_info->nr_pages - 2;
    1.56 +    start_info->store_evtchn = store_evtchn;
    1.57 +    start_info->console.domU.mfn = start_info->nr_pages - 3;
    1.58 +    start_info->console.domU.evtchn = console_evtchn;
    1.59 +    start_info_addr = (start_info->nr_pages - 4) << PAGE_SHIFT;
    1.60 +
    1.61 +    return start_info_addr;
    1.62  }
    1.63  
    1.64  static int get_page_array(int xc_handle, int domid, xen_pfn_t **page_array,
    1.65 @@ -399,7 +398,7 @@ int xc_linux_build(int xc_handle,
    1.66                     unsigned long *console_mfn,
    1.67                     void *devtree)
    1.68  {
    1.69 -    start_info_t si;
    1.70 +    start_info_t start_info;
    1.71      struct domain_setup_info dsi;
    1.72      xen_pfn_t *page_array = NULL;
    1.73      unsigned long nr_pages;
    1.74 @@ -407,7 +406,7 @@ int xc_linux_build(int xc_handle,
    1.75      unsigned long kern_addr;
    1.76      unsigned long initrd_base = 0;
    1.77      unsigned long initrd_len = 0;
    1.78 -    unsigned long si_addr;
    1.79 +    unsigned long start_info_addr;
    1.80      int rc = 0;
    1.81  
    1.82      DPRINTF("%s\n", __func__);
    1.83 @@ -434,11 +433,12 @@ int xc_linux_build(int xc_handle,
    1.84      }
    1.85  
    1.86      /* start_info stuff: about to be removed  */
    1.87 -    si_addr = create_start_info(&si, console_evtchn, store_evtchn, nr_pages);
    1.88 -    *console_mfn = page_array[si.console.domU.mfn];
    1.89 -    *store_mfn = page_array[si.store_mfn];
    1.90 -    if (install_image(xc_handle, domid, page_array, &si, si_addr,
    1.91 -                sizeof(start_info_t))) {
    1.92 +    start_info_addr = create_start_info(&start_info, console_evtchn,
    1.93 +                                        store_evtchn, nr_pages);
    1.94 +    *console_mfn = page_array[start_info.console.domU.mfn];
    1.95 +    *store_mfn = page_array[start_info.store_mfn];
    1.96 +    if (install_image(xc_handle, domid, page_array, &start_info,
    1.97 +                      start_info_addr, sizeof(start_info_t))) {
    1.98          rc = -1;
    1.99          goto out;
   1.100      }
   1.101 @@ -447,7 +447,8 @@ int xc_linux_build(int xc_handle,
   1.102          DPRINTF("loading flattened device tree\n");
   1.103          devtree_addr = DEVTREE_ADDR;
   1.104          if (load_devtree(xc_handle, domid, page_array, devtree, devtree_addr,
   1.105 -                     initrd_base, initrd_len, &si, si_addr)) {
   1.106 +                         initrd_base, initrd_len, &start_info,
   1.107 +                         start_info_addr)) {
   1.108              DPRINTF("couldn't load flattened device tree.\n");
   1.109              rc = -1;
   1.110              goto out;