ia64/xen-unstable

changeset 9004:bd9cb8dc97b6

[IA64] cleanup warning in xen/ia64 (arch/ia64/linux-xen)

These patches fix many issue (ex. panic dom0, oops domU/dom0...).
we will fix compile warnnings one step at a time.

Signed-off-by: Tsunehisa Doi <doi.tsunehisa@jp.fujitsu.com>
Signed-off-by: Kouya SHIMURA <kouya@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Tue Feb 28 10:26:43 2006 -0700 (2006-02-28)
parents 5e751dddf4d0
children 0b0be946cf9c
files xen/arch/ia64/linux-xen/minstate.h xen/arch/ia64/linux-xen/setup.c xen/arch/ia64/linux-xen/unaligned.c xen/arch/ia64/linux-xen/unwind.c
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/minstate.h	Tue Feb 28 10:24:03 2006 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/minstate.h	Tue Feb 28 10:26:43 2006 -0700
     1.3 @@ -175,7 +175,7 @@
     1.4  	;;											\
     1.5  .mem.offset 0,0; st8.spill [r16]=r13,16;							\
     1.6  .mem.offset 8,0; st8.spill [r17]=r21,16;	/* save ar.fpsr */				\
     1.7 -	/* XEN mov r13=IA64_KR(CURRENT);	/* establish `current' */				\
     1.8 +	/* XEN mov r13=IA64_KR(CURRENT);*/	/* establish `current' */				\
     1.9  	MINSTATE_GET_CURRENT(r13);		/* XEN establish `current' */				\
    1.10  	;;											\
    1.11  .mem.offset 0,0; st8.spill [r16]=r15,16;							\
     2.1 --- a/xen/arch/ia64/linux-xen/setup.c	Tue Feb 28 10:24:03 2006 -0700
     2.2 +++ b/xen/arch/ia64/linux-xen/setup.c	Tue Feb 28 10:26:43 2006 -0700
     2.3 @@ -94,6 +94,10 @@ struct io_space io_space[MAX_IO_SPACES];
     2.4  EXPORT_SYMBOL(io_space);
     2.5  unsigned int num_io_spaces;
     2.6  
     2.7 +#ifdef XEN
     2.8 +extern void early_cmdline_parse(char **);
     2.9 +#endif
    2.10 +
    2.11  /*
    2.12   * "flush_icache_range()" needs to know what processor dependent stride size to use
    2.13   * when it makes i-cache(s) coherent with d-caches.
    2.14 @@ -500,6 +504,7 @@ late_setup_arch (char **cmdline_p)
    2.15  	paging_init();
    2.16  }
    2.17  
    2.18 +#ifndef XEN
    2.19  /*
    2.20   * Display cpu info for all cpu's.
    2.21   */
    2.22 @@ -611,14 +616,13 @@ c_stop (struct seq_file *m, void *v)
    2.23  {
    2.24  }
    2.25  
    2.26 -#ifndef XEN
    2.27  struct seq_operations cpuinfo_op = {
    2.28  	.start =	c_start,
    2.29  	.next =		c_next,
    2.30  	.stop =		c_stop,
    2.31  	.show =		show_cpuinfo
    2.32  };
    2.33 -#endif
    2.34 +#endif /* XEN */
    2.35  
    2.36  void
    2.37  identify_cpu (struct cpuinfo_ia64 *c)
     3.1 --- a/xen/arch/ia64/linux-xen/unaligned.c	Tue Feb 28 10:24:03 2006 -0700
     3.2 +++ b/xen/arch/ia64/linux-xen/unaligned.c	Tue Feb 28 10:26:43 2006 -0700
     3.3 @@ -216,6 +216,7 @@ static u16 gr_info[32]={
     3.4  	RPT(r28), RPT(r29), RPT(r30), RPT(r31)
     3.5  };
     3.6  
     3.7 +#ifndef XEN
     3.8  static u16 fr_info[32]={
     3.9  	0,			/* constant : WE SHOULD NEVER GET THIS */
    3.10  	0,			/* constant : WE SHOULD NEVER GET THIS */
    3.11 @@ -285,6 +286,7 @@ invala_fr (int regno)
    3.12  	}
    3.13  #	undef F
    3.14  }
    3.15 +#endif /* XEN */
    3.16  
    3.17  static inline unsigned long
    3.18  rotate_reg (unsigned long sor, unsigned long rrb, unsigned long reg)
    3.19 @@ -299,12 +301,11 @@ rotate_reg (unsigned long sor, unsigned 
    3.20  void
    3.21  set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, unsigned long nat)
    3.22  {
    3.23 -	struct switch_stack *sw = (struct switch_stack *) regs - 1;
    3.24 -	unsigned long *bsp, *bspstore, *addr, *rnat_addr, *ubs_end;
    3.25 +	unsigned long *bsp, *bspstore, *addr, *rnat_addr;
    3.26  	unsigned long *kbs = (void *) current + IA64_RBS_OFFSET;
    3.27 -	unsigned long rnats, nat_mask;
    3.28 +	unsigned long nat_mask;
    3.29      unsigned long old_rsc,new_rsc;
    3.30 -	unsigned long on_kbs,rnat;
    3.31 +	unsigned long rnat;
    3.32  	long sof = (regs->cr_ifs) & 0x7f;
    3.33  	long sor = 8 * ((regs->cr_ifs >> 14) & 0xf);
    3.34  	long rrb_gr = (regs->cr_ifs >> 18) & 0x7f;
    3.35 @@ -323,7 +324,7 @@ set_rse_reg (struct pt_regs *regs, unsig
    3.36      new_rsc=old_rsc&(~0x3);
    3.37      ia64_set_rsc(new_rsc);
    3.38  
    3.39 -    bspstore = ia64_get_bspstore();
    3.40 +    bspstore = (unsigned long*)ia64_get_bspstore();
    3.41      bsp =kbs + (regs->loadrs >> 19);//16+3
    3.42  
    3.43  	addr = ia64_rse_skip_regs(bsp, -sof + ridx);
    3.44 @@ -335,7 +336,7 @@ set_rse_reg (struct pt_regs *regs, unsig
    3.45          ia64_flushrs ();
    3.46          ia64_mf ();
    3.47  		*addr = val;
    3.48 -        bspstore = ia64_get_bspstore();
    3.49 +        bspstore = (unsigned long*)ia64_get_bspstore();
    3.50      	rnat = ia64_get_rnat ();
    3.51          if(bspstore < rnat_addr){
    3.52              rnat=rnat&(~nat_mask);
    3.53 @@ -362,13 +363,11 @@ set_rse_reg (struct pt_regs *regs, unsig
    3.54  
    3.55  
    3.56  static void
    3.57 -get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, unsigned long *nat)
    3.58 +get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, int*nat)
    3.59  {
    3.60 -    struct switch_stack *sw = (struct switch_stack *) regs - 1;
    3.61 -    unsigned long *bsp, *addr, *rnat_addr, *ubs_end, *bspstore;
    3.62 +    unsigned long *bsp, *addr, *rnat_addr, *bspstore;
    3.63      unsigned long *kbs = (void *) current + IA64_RBS_OFFSET;
    3.64 -    unsigned long rnats, nat_mask;
    3.65 -    unsigned long on_kbs;
    3.66 +    unsigned long nat_mask;
    3.67      unsigned long old_rsc, new_rsc;
    3.68      long sof = (regs->cr_ifs) & 0x7f;
    3.69      long sor = 8 * ((regs->cr_ifs >> 14) & 0xf);
    3.70 @@ -388,7 +387,7 @@ get_rse_reg (struct pt_regs *regs, unsig
    3.71      new_rsc=old_rsc&(~(0x3));
    3.72      ia64_set_rsc(new_rsc);
    3.73  
    3.74 -    bspstore = ia64_get_bspstore();
    3.75 +    bspstore = (unsigned long*)ia64_get_bspstore();
    3.76      bsp =kbs + (regs->loadrs >> 19); //16+3;
    3.77  
    3.78      addr = ia64_rse_skip_regs(bsp, -sof + ridx);
    3.79 @@ -399,14 +398,14 @@ get_rse_reg (struct pt_regs *regs, unsig
    3.80  
    3.81          ia64_flushrs ();
    3.82          ia64_mf ();
    3.83 -        bspstore = ia64_get_bspstore();
    3.84 +        bspstore = (unsigned long*)ia64_get_bspstore();
    3.85      }
    3.86      *val=*addr;
    3.87      if(nat){
    3.88          if(bspstore < rnat_addr){
    3.89 -            *nat=!!(ia64_get_rnat()&nat_mask);
    3.90 +            *nat=(int)!!(ia64_get_rnat()&nat_mask);
    3.91          }else{
    3.92 -            *nat = !!((*rnat_addr)&nat_mask);
    3.93 +            *nat = (int)!!((*rnat_addr)&nat_mask);
    3.94          }
    3.95          ia64_set_rsc(old_rsc);
    3.96      }
    3.97 @@ -634,6 +633,7 @@ fph_index (struct pt_regs *regs, long re
    3.98  	return rotate_reg(96, rrb_fr, (regnum - IA64_FIRST_ROTATING_FR));
    3.99  }
   3.100  
   3.101 +#ifndef XEN
   3.102  static void
   3.103  setfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
   3.104  {
   3.105 @@ -682,6 +682,7 @@ setfpreg (unsigned long regnum, struct i
   3.106  		regs->cr_ipsr |= IA64_PSR_MFL;
   3.107  	}
   3.108  }
   3.109 +#endif /* XEN */
   3.110  
   3.111  /*
   3.112   * Those 2 inline functions generate the spilled versions of the constant floating point
   3.113 @@ -699,6 +700,7 @@ float_spill_f1 (struct ia64_fpreg *final
   3.114  	ia64_stf_spill(final, 1);
   3.115  }
   3.116  
   3.117 +#ifndef XEN
   3.118  static void
   3.119  getfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
   3.120  {
   3.121 @@ -748,6 +750,7 @@ getfpreg (unsigned long regnum, struct i
   3.122  		}
   3.123  	}
   3.124  }
   3.125 +#endif /* XEN */
   3.126  
   3.127  
   3.128  #ifdef XEN
   3.129 @@ -803,6 +806,7 @@ getreg (unsigned long regnum, unsigned l
   3.130  		*nat  = (*unat >> (addr >> 3 & 0x3f)) & 0x1UL;
   3.131  }
   3.132  
   3.133 +#ifndef XEN
   3.134  static void
   3.135  emulate_load_updates (update_t type, load_store_t ld, struct pt_regs *regs, unsigned long ifa)
   3.136  {
   3.137 @@ -1078,6 +1082,7 @@ emulate_store_int (unsigned long ifa, lo
   3.138  
   3.139  	return 0;
   3.140  }
   3.141 +#endif /* XEN */
   3.142  
   3.143  /*
   3.144   * floating point operations sizes in bytes
   3.145 @@ -1153,6 +1158,7 @@ float2mem_double (struct ia64_fpreg *ini
   3.146  	ia64_stfd(final, 6);
   3.147  }
   3.148  
   3.149 +#ifndef XEN
   3.150  static int
   3.151  emulate_load_floatpair (unsigned long ifa, load_store_t ld, struct pt_regs *regs)
   3.152  {
   3.153 @@ -1437,6 +1443,7 @@ within_logging_rate_limit (void)
   3.154  	return 0;
   3.155  
   3.156  }
   3.157 +#endif /* XEN */
   3.158  
   3.159  void
   3.160  ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
     4.1 --- a/xen/arch/ia64/linux-xen/unwind.c	Tue Feb 28 10:24:03 2006 -0700
     4.2 +++ b/xen/arch/ia64/linux-xen/unwind.c	Tue Feb 28 10:26:43 2006 -0700
     4.3 @@ -484,7 +484,8 @@ unw_access_fr (struct unw_frame_info *in
     4.4  	} else if (regnum <= 15) {
     4.5  		if (regnum <= 11) {
     4.6  			pt = get_scratch_regs(info);
     4.7 -			addr = &pt->f6  + (regnum - 6);
     4.8 +			//XXX struct ia64_fpreg and struct pt_fpreg are same.
     4.9 +			addr = (struct ia64_fpreg*)(&pt->f6  + (regnum - 6));
    4.10  		}
    4.11  		else
    4.12  			addr = &info->sw->f12 + (regnum - 12);