ia64/xen-unstable

changeset 15607:c9720159b983

[POWERPC][XEN] Use top-level CFLAGS.
- Append to CFLAGS instead of replacing it.
- Fix newly-exposed mixed statement/declaration warnings.
author Hollis Blanchard <hollisb@us.ibm.com>
date Mon Jul 16 14:20:16 2007 -0500 (2007-07-16)
parents 3867217d3155
children 9559ba7c80f9
files xen/arch/powerpc/Rules.mk xen/arch/powerpc/mpic_init.c xen/arch/powerpc/of-devtree.c xen/arch/powerpc/of-devwalk.c xen/arch/powerpc/of_handler/ofh.c xen/arch/powerpc/ofd_fixup.c xen/include/asm-powerpc/xenoprof.h
line diff
     1.1 --- a/xen/arch/powerpc/Rules.mk	Fri Jul 13 17:28:15 2007 -0500
     1.2 +++ b/xen/arch/powerpc/Rules.mk	Mon Jul 16 14:20:16 2007 -0500
     1.3 @@ -9,8 +9,8 @@ C_WARNINGS := -Wredundant-decls
     1.4  # _no_ common code can have packed data structures or we are in touble.
     1.5  C_WARNINGS += -Wpacked
     1.6  
     1.7 -CFLAGS := -m64 -ffreestanding -fno-builtin -fno-common
     1.8 -CFLAGS += -iwithprefix include -Wall -Werror -pipe
     1.9 +CFLAGS += -m64 -ffreestanding -fno-builtin -fno-common
    1.10 +CFLAGS += -iwithprefix include -Werror -pipe
    1.11  CFLAGS += -I$(BASEDIR)/include
    1.12  CFLAGS += -I$(BASEDIR)/include/asm-powerpc/mach-generic
    1.13  CFLAGS += -I$(BASEDIR)/include/asm-powerpc/mach-default
     2.1 --- a/xen/arch/powerpc/mpic_init.c	Fri Jul 13 17:28:15 2007 -0500
     2.2 +++ b/xen/arch/powerpc/mpic_init.c	Mon Jul 16 14:20:16 2007 -0500
     2.3 @@ -153,13 +153,15 @@ static unsigned long find_ranges_addr_fr
     2.4      u32 addr_c = 2;
     2.5      u32 ranges[64];
     2.6      int p_len;
     2.7 +    int i;
     2.8  
     2.9      parent = ofd_node_parent(oft_p, c);
    2.10      parent = ofd_node_parent(oft_p, parent);
    2.11  
    2.12      p_len = ofd_getprop(oft_p, parent, "ranges", &ranges, sizeof(ranges));
    2.13      DBG("%s: ranges\n", __func__);
    2.14 -    int i; for (i=0; i<p_len; i++) {DBG("%08x ", ranges[i]);}
    2.15 +    for (i=0; i<p_len; i++)
    2.16 +        DBG("%08x ", ranges[i]);
    2.17      DBG("\n");
    2.18  
    2.19      p_len = ofd_getprop(oft_p, parent, "#address-cells",
     3.1 --- a/xen/arch/powerpc/of-devtree.c	Fri Jul 13 17:28:15 2007 -0500
     3.2 +++ b/xen/arch/powerpc/of-devtree.c	Mon Jul 16 14:20:16 2007 -0500
     3.3 @@ -939,12 +939,12 @@ ofdn_t ofd_node_find_by_prop(
     3.4      size_t sz)
     3.5  {
     3.6      struct ofd_mem *m = (struct ofd_mem *)mem;
     3.7 +    ofdn_t prev = -1;
     3.8  
     3.9      if ( n <= 0 ) {
    3.10          n = OFD_ROOT;
    3.11      }
    3.12  
    3.13 -    ofdn_t prev = -1;
    3.14      return ofd_find_by_prop(m, -1, &prev, n, name, val, sz);
    3.15  }
    3.16  
     4.1 --- a/xen/arch/powerpc/of-devwalk.c	Fri Jul 13 17:28:15 2007 -0500
     4.2 +++ b/xen/arch/powerpc/of-devwalk.c	Mon Jul 16 14:20:16 2007 -0500
     4.3 @@ -32,13 +32,13 @@ void ofd_prop_print(
     4.4      const char *prop,
     4.5      size_t sz)
     4.6  {
     4.7 +#define DEBUG_PROP
     4.8 +#ifndef DEBUG_PROP
     4.9      if ( path[0] == '/' && path[1] == '\0' ) {
    4.10          path = "";
    4.11      }
    4.12      printk("%s: %s/%s: 0x%lx\n", head, path,  name, sz);
    4.13 -
    4.14 -#define DEBUG_PROP
    4.15 -#ifdef DEBUG_PROP
    4.16 +#else
    4.17      int i;
    4.18      int isstr = sz;
    4.19      const char *b = prop;
    4.20 @@ -75,8 +75,6 @@ void ofd_prop_print(
    4.21          }
    4.22          printk("\n");
    4.23      }
    4.24 -#else
    4.25 -    (void)prop;
    4.26  #endif
    4.27  }
    4.28  
     5.1 --- a/xen/arch/powerpc/of_handler/ofh.c	Fri Jul 13 17:28:15 2007 -0500
     5.2 +++ b/xen/arch/powerpc/of_handler/ofh.c	Mon Jul 16 14:20:16 2007 -0500
     5.3 @@ -50,30 +50,14 @@ s32 debug(const char *fmt, ...)
     5.4  void
     5.5  assprint(const char *expr, const char *file, int line, const char *fmt, ...)
     5.6  {
     5.7 -    char a[15];
     5.8 -
     5.9 -    a[0]  = '\n';
    5.10 -    a[1]  = '\n';
    5.11 -    a[2]  = 'O';
    5.12 -    a[3]  = 'F';
    5.13 -    a[4]  = 'H';
    5.14 -    a[5]  = ':';
    5.15 -    a[6]  = 'A';
    5.16 -    a[7]  = 'S';
    5.17 -    a[8]  = 'S';
    5.18 -    a[9]  = 'E';
    5.19 -    a[10] = 'R';
    5.20 -    a[11] = 'T';
    5.21 -    a[12] = '!';
    5.22 -    a[13] = '\n';
    5.23 -    a[14] = '\n';
    5.24 -
    5.25 +    char a[15] = {
    5.26 +       '\n', '\n', 'O', 'F', 'H', ':', 'A', 'S', 'S', 'E', 'R', 'T', '!',
    5.27 +       '\n', '\n',
    5.28 +    };
    5.29      s32 actual;
    5.30      u32 t = 1;
    5.31      volatile u32 *tp = &t;
    5.32  
    5.33 -    (void)expr; (void)file; (void)line; (void)fmt;
    5.34 -
    5.35      ofh_cons_write(a, sizeof (a), &actual);
    5.36  
    5.37      /* maybe I can break out of this loop manually (like with a
     6.1 --- a/xen/arch/powerpc/ofd_fixup.c	Fri Jul 13 17:28:15 2007 -0500
     6.2 +++ b/xen/arch/powerpc/ofd_fixup.c	Mon Jul 16 14:20:16 2007 -0500
     6.3 @@ -363,9 +363,12 @@ static ofdn_t ofd_xen_props(void *m, str
     6.4  ulong ofd_dom0_fixup(struct domain *d, ulong mem, const char *cmdline,
     6.5                       ulong shared_info)
     6.6  {
     6.7 +    const char compat[] = "Hypervisor,Maple";
     6.8 +    const char d0[] = "dom0";
     6.9      void *m;
    6.10      const ofdn_t n = OFD_ROOT;
    6.11      ofdn_t r;
    6.12 +    u32 did;
    6.13  
    6.14      m = (void *)mem;
    6.15  
    6.16 @@ -404,16 +407,16 @@ ulong ofd_dom0_fixup(struct domain *d, u
    6.17      rtas_proxy_init(m);
    6.18  
    6.19  #ifdef FIX_COMPAT 
    6.20 -    const char compat[] = "Hypervisor,Maple";
    6.21      r = ofd_prop_add(m, n, "compatible", compat, sizeof (compat));
    6.22      ASSERT( r > 0 );
    6.23 +#else
    6.24 +    (void)compat;
    6.25  #endif
    6.26  
    6.27 -    u32 did = d->domain_id;
    6.28 +    did = d->domain_id;
    6.29      r = ofd_prop_add(m, n, "ibm,partition-no", &did, sizeof(did));
    6.30      ASSERT( r > 0 );
    6.31  
    6.32 -    const char d0[] = "dom0";
    6.33      r = ofd_prop_add(m, n, "ibm,partition-name", d0, sizeof (d0));
    6.34      ASSERT( r > 0 );
    6.35  
     7.1 --- a/xen/include/asm-powerpc/xenoprof.h	Fri Jul 13 17:28:15 2007 -0500
     7.2 +++ b/xen/include/asm-powerpc/xenoprof.h	Mon Jul 16 14:20:16 2007 -0500
     7.3 @@ -83,7 +83,7 @@ static inline void ctr_write(unsigned in
     7.4      }
     7.5  }
     7.6  
     7.7 -static inline void print_perf_status()
     7.8 +static inline void print_perf_status(void)
     7.9  {
    7.10      ulong mmcr0 = mfmmcr0();
    7.11      ulong mmcr1 = mfmmcr1();