ia64/xen-unstable

changeset 9169:8a551ec13d93

[IA64] Remove the last compile warnings

This patch intends to remove the last warnings when compile

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
author awilliam@xenbuild.aw
date Tue Mar 14 12:27:57 2006 -0700 (2006-03-14)
parents 142a3eec56bd
children 0f905da1451d
files xen/arch/ia64/linux-xen/efi.c xen/arch/ia64/vmx/mmio.c xen/arch/ia64/vmx/pal_emul.c xen/arch/ia64/vmx/vlsapic.c xen/arch/ia64/vmx/vmx_hypercall.c xen/arch/ia64/vmx/vmx_init.c xen/arch/ia64/vmx/vmx_interrupt.c xen/arch/ia64/vmx/vmx_process.c xen/arch/ia64/vmx/vmx_virt.c xen/arch/ia64/xen/vcpu.c xen/include/asm-ia64/linux/asm/hw_irq.h xen/include/asm-ia64/vlsapic.h xen/include/asm-ia64/vmmu.h xen/include/xen/irq.h
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/efi.c	Fri Mar 10 10:00:31 2006 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/efi.c	Tue Mar 14 12:27:57 2006 -0700
     1.3 @@ -37,6 +37,7 @@
     1.4  #define EFI_DEBUG	0
     1.5  
     1.6  extern efi_status_t efi_call_phys (void *, ...);
     1.7 +extern unsigned long long memparse (char *ptr, char **retptr);
     1.8  
     1.9  struct efi efi;
    1.10  EXPORT_SYMBOL(efi);
     2.1 --- a/xen/arch/ia64/vmx/mmio.c	Fri Mar 10 10:00:31 2006 -0700
     2.2 +++ b/xen/arch/ia64/vmx/mmio.c	Tue Mar 14 12:27:57 2006 -0700
     2.3 @@ -33,6 +33,7 @@
     2.4  #include <asm/mm.h>
     2.5  #include <asm/vmx.h>
     2.6  #include <public/event_channel.h>
     2.7 +#include <linux/event.h>
     2.8  
     2.9  /*
    2.10  struct mmio_list *lookup_mmio(u64 gpa, struct mmio_list *mio_base)
     3.1 --- a/xen/arch/ia64/vmx/pal_emul.c	Fri Mar 10 10:00:31 2006 -0700
     3.2 +++ b/xen/arch/ia64/vmx/pal_emul.c	Tue Mar 14 12:27:57 2006 -0700
     3.3 @@ -69,7 +69,6 @@ pal_cache_flush (VCPU *vcpu) {
     3.4  
     3.5  static struct ia64_pal_retval
     3.6  pal_vm_tr_read (VCPU *vcpu ) {
     3.7 -#warning pal_vm_tr_read: to be implemented
     3.8  	struct ia64_pal_retval result;
     3.9  
    3.10  	result.status= -1; //unimplemented
    3.11 @@ -102,7 +101,6 @@ pal_platform_addr(VCPU *vcpu) {
    3.12  
    3.13  static struct ia64_pal_retval
    3.14  pal_halt (VCPU *vcpu) {
    3.15 -#warning pal_halt: to be implemented
    3.16  	//bugbug: to be implement. 
    3.17  	struct ia64_pal_retval result;
    3.18  
    3.19 @@ -141,12 +139,18 @@ pal_cache_write (VCPU *vcpu) {
    3.20  
    3.21  static struct ia64_pal_retval
    3.22  pal_bus_get_features(VCPU *vcpu){
    3.23 -	
    3.24 +	struct ia64_pal_retval result;
    3.25 +
    3.26 +	result.status= -1; //unimplemented
    3.27 +	return result;
    3.28  }
    3.29  
    3.30  static struct ia64_pal_retval
    3.31  pal_cache_summary(VCPU *vcpu){
    3.32 -	
    3.33 +	struct ia64_pal_retval result;
    3.34 +
    3.35 +	result.status= -1; //unimplemented
    3.36 +	return result;
    3.37  }
    3.38  
    3.39  static struct ia64_pal_retval
    3.40 @@ -158,22 +162,34 @@ pal_cache_init(VCPU *vcpu){
    3.41  
    3.42  static struct ia64_pal_retval
    3.43  pal_cache_info(VCPU *vcpu){
    3.44 +	struct ia64_pal_retval result;
    3.45 +
    3.46 +	result.status= -1; //unimplemented
    3.47 +	return result;
    3.48  }
    3.49  
    3.50  static struct ia64_pal_retval
    3.51  pal_cache_prot_info(VCPU *vcpu){
    3.52 -}
    3.53 +	struct ia64_pal_retval result;
    3.54  
    3.55 -static struct ia64_pal_retval
    3.56 -pal_cache_shared_info(VCPU *vcpu){
    3.57 +	result.status= -1; //unimplemented
    3.58 +	return result;
    3.59  }
    3.60  
    3.61  static struct ia64_pal_retval
    3.62  pal_mem_attrib(VCPU *vcpu){
    3.63 +	struct ia64_pal_retval result;
    3.64 +
    3.65 +	result.status= -1; //unimplemented
    3.66 +	return result;
    3.67  }
    3.68  
    3.69  static struct ia64_pal_retval
    3.70  pal_debug_info(VCPU *vcpu){
    3.71 +	struct ia64_pal_retval result;
    3.72 +
    3.73 +	result.status= -1; //unimplemented
    3.74 +	return result;
    3.75  }
    3.76  
    3.77  static struct ia64_pal_retval
    3.78 @@ -206,46 +222,89 @@ pal_freq_ratios(VCPU *vcpu){
    3.79  
    3.80  static struct ia64_pal_retval
    3.81  pal_halt_info(VCPU *vcpu){
    3.82 +	struct ia64_pal_retval result;
    3.83 +
    3.84 +	result.status= -1; //unimplemented
    3.85 +	return result;
    3.86  }
    3.87  
    3.88  static struct ia64_pal_retval
    3.89  pal_logical_to_physica(VCPU *vcpu){
    3.90 +	struct ia64_pal_retval result;
    3.91 +
    3.92 +	result.status= -1; //unimplemented
    3.93 +	return result;
    3.94  }
    3.95  
    3.96  static struct ia64_pal_retval
    3.97  pal_perf_mon_info(VCPU *vcpu){
    3.98 +	struct ia64_pal_retval result;
    3.99 +
   3.100 +	result.status= -1; //unimplemented
   3.101 +	return result;
   3.102  }
   3.103  
   3.104  static struct ia64_pal_retval
   3.105  pal_proc_get_features(VCPU *vcpu){
   3.106 +	struct ia64_pal_retval result;
   3.107 +
   3.108 +	result.status= -1; //unimplemented
   3.109 +	return result;
   3.110  }
   3.111  
   3.112  static struct ia64_pal_retval
   3.113  pal_ptce_info(VCPU *vcpu){
   3.114 +	struct ia64_pal_retval result;
   3.115 +
   3.116 +	result.status= -1; //unimplemented
   3.117 +	return result;
   3.118  }
   3.119  
   3.120  static struct ia64_pal_retval
   3.121  pal_register_info(VCPU *vcpu){
   3.122 +	struct ia64_pal_retval result;
   3.123 +
   3.124 +	result.status= -1; //unimplemented
   3.125 +	return result;
   3.126  }
   3.127  
   3.128  static struct ia64_pal_retval
   3.129  pal_rse_info(VCPU *vcpu){
   3.130 +	struct ia64_pal_retval result;
   3.131 +
   3.132 +	result.status= -1; //unimplemented
   3.133 +	return result;
   3.134  }
   3.135 -
   3.136  static struct ia64_pal_retval
   3.137  pal_test_info(VCPU *vcpu){
   3.138 +	struct ia64_pal_retval result;
   3.139 +
   3.140 +	result.status= -1; //unimplemented
   3.141 +	return result;
   3.142  }
   3.143  
   3.144  static struct ia64_pal_retval
   3.145  pal_vm_summary(VCPU *vcpu){
   3.146 +	struct ia64_pal_retval result;
   3.147 +
   3.148 +	result.status= -1; //unimplemented
   3.149 +	return result;
   3.150  }
   3.151  
   3.152  static struct ia64_pal_retval
   3.153  pal_vm_info(VCPU *vcpu){
   3.154 +	struct ia64_pal_retval result;
   3.155 +
   3.156 +	result.status= -1; //unimplemented
   3.157 +	return result;
   3.158  }
   3.159  
   3.160  static struct ia64_pal_retval
   3.161  pal_vm_page_size(VCPU *vcpu){
   3.162 +	struct ia64_pal_retval result;
   3.163 +
   3.164 +	result.status= -1; //unimplemented
   3.165 +	return result;
   3.166  }
   3.167  void
   3.168  pal_emul( VCPU *vcpu) {
   3.169 @@ -296,6 +355,82 @@ pal_emul( VCPU *vcpu) {
   3.170  			result = pal_freq_base (vcpu);
   3.171  			break;
   3.172  
   3.173 +		case PAL_BUS_GET_FEATURES :
   3.174 +			result = pal_bus_get_features (vcpu);
   3.175 +			break;
   3.176 +
   3.177 +		case PAL_CACHE_SUMMARY :
   3.178 +			result = pal_cache_summary (vcpu);
   3.179 +			break;
   3.180 +
   3.181 +		case PAL_CACHE_INIT :
   3.182 +			result = pal_cache_init(vcpu);
   3.183 +			break;
   3.184 +
   3.185 +		case PAL_CACHE_INFO :
   3.186 +			result = pal_cache_info(vcpu);
   3.187 +			break;
   3.188 +
   3.189 +		case PAL_CACHE_PROT_INFO :
   3.190 +			result = pal_cache_prot_info(vcpu);
   3.191 +			break;
   3.192 +
   3.193 +		case PAL_MEM_ATTRIB :
   3.194 +			result = pal_mem_attrib(vcpu);
   3.195 +			break;
   3.196 +
   3.197 +		case PAL_DEBUG_INFO :
   3.198 +			result = pal_debug_info(vcpu);
   3.199 +			break;
   3.200 +
   3.201 +		case PAL_FIXED_ADDR :
   3.202 +			result = pal_fixed_addr(vcpu);
   3.203 +			break;
   3.204 +
   3.205 +		case PAL_HALT_INFO :
   3.206 +			result = pal_halt_info(vcpu);
   3.207 +			break;
   3.208 +
   3.209 +		case PAL_LOGICAL_TO_PHYSICAL :
   3.210 +			result = pal_logical_to_physica(vcpu);
   3.211 +			break;
   3.212 +
   3.213 +		case PAL_PERF_MON_INFO :
   3.214 +			result = pal_perf_mon_info(vcpu);
   3.215 +			break;
   3.216 +
   3.217 +		case  PAL_PROC_GET_FEATURES:
   3.218 +			result = pal_proc_get_features(vcpu);
   3.219 +			break;
   3.220 +
   3.221 +		case PAL_PTCE_INFO :
   3.222 +			result = pal_ptce_info(vcpu);
   3.223 +			break;
   3.224 +
   3.225 +		case PAL_REGISTER_INFO :
   3.226 +			result = pal_register_info(vcpu);
   3.227 +			break;
   3.228 +
   3.229 +		case PAL_RSE_INFO :
   3.230 +			result = pal_rse_info(vcpu);
   3.231 +			break;
   3.232 +
   3.233 +		case PAL_TEST_PROC :
   3.234 +			result = pal_test_info(vcpu);
   3.235 +			break;
   3.236 +
   3.237 +		case PAL_VM_SUMMARY :
   3.238 +			result = pal_vm_summary(vcpu);
   3.239 +			break;
   3.240 +
   3.241 +		case PAL_VM_INFO :
   3.242 +			result = pal_vm_info(vcpu);
   3.243 +			break;
   3.244 +
   3.245 +		case PAL_VM_PAGE_SIZE :
   3.246 +			result = pal_vm_page_size(vcpu);
   3.247 +			break;
   3.248 +
   3.249  		default:
   3.250  			panic("pal_emul(): guest call unsupported pal" );
   3.251    }
     4.1 --- a/xen/arch/ia64/vmx/vlsapic.c	Fri Mar 10 10:00:31 2006 -0700
     4.2 +++ b/xen/arch/ia64/vmx/vlsapic.c	Tue Mar 14 12:27:57 2006 -0700
     4.3 @@ -130,7 +130,7 @@ void vtm_init(VCPU *vcpu)
     4.4   */
     4.5  uint64_t vtm_get_itc(VCPU *vcpu)
     4.6  {
     4.7 -    uint64_t    guest_itc, spsr;
     4.8 +    uint64_t    guest_itc;
     4.9      vtime_t    *vtm;
    4.10  
    4.11      vtm=&(vcpu->arch.arch_vmx.vtm);
    4.12 @@ -437,11 +437,12 @@ static int is_higher_class(int pending, 
    4.13  {
    4.14      return ( (pending >> 4) > mic );
    4.15  }
    4.16 -
    4.17 +#if 0
    4.18  static int is_invalid_irq(int vec)
    4.19  {
    4.20      return (vec == 1 || ((vec <= 14 && vec >= 3)));
    4.21  }
    4.22 +#endif //shadow it due to no use currently
    4.23  
    4.24  #define   IRQ_NO_MASKED         0
    4.25  #define   IRQ_MASKED_BY_VTPR    1
     5.1 --- a/xen/arch/ia64/vmx/vmx_hypercall.c	Fri Mar 10 10:00:31 2006 -0700
     5.2 +++ b/xen/arch/ia64/vmx/vmx_hypercall.c	Tue Mar 14 12:27:57 2006 -0700
     5.3 @@ -122,7 +122,7 @@ void hyper_xen_version(void)
     5.4      u64 r32,r33,ret;
     5.5      vcpu_get_gr_nat(vcpu,16,&r32);
     5.6      vcpu_get_gr_nat(vcpu,17,&r33);
     5.7 -    ret=do_xen_version((int )r32,r33);
     5.8 +    ret=do_xen_version((int )r32,(void *)r33);
     5.9      vcpu_set_gr(vcpu, 8, ret, 0);
    5.10      vmx_vcpu_increment_iip(vcpu);
    5.11  }
     6.1 --- a/xen/arch/ia64/vmx/vmx_init.c	Fri Mar 10 10:00:31 2006 -0700
     6.2 +++ b/xen/arch/ia64/vmx/vmx_init.c	Tue Mar 14 12:27:57 2006 -0700
     6.3 @@ -50,6 +50,8 @@
     6.4  #include <public/arch-ia64.h>
     6.5  #include <asm/hvm/vioapic.h>
     6.6  #include <public/event_channel.h>
     6.7 +#include <xen/event.h>
     6.8 +#include <asm/vlsapic.h>
     6.9  
    6.10  /* Global flag to identify whether Intel vmx feature is on */
    6.11  u32 vmx_enabled = 0;
    6.12 @@ -161,7 +163,7 @@ static vpd_t *alloc_vpd(void)
    6.13  		return NULL;
    6.14  	}
    6.15  
    6.16 -	printk("vpd base: 0x%lp, vpd size:%ld\n", vpd, sizeof(vpd_t));
    6.17 +	printk("vpd base: 0x%p, vpd size:%ld\n", vpd, sizeof(vpd_t));
    6.18  	memset(vpd, 0, VPD_SIZE);
    6.19  	/* CPUID init */
    6.20  	for (i = 0; i < 5; i++)
    6.21 @@ -234,7 +236,7 @@ vmx_load_state(struct vcpu *v)
    6.22  {
    6.23  	u64 status;
    6.24  
    6.25 -	status = ia64_pal_vp_restore((u64)v->arch.privregs, 0);
    6.26 +	status = ia64_pal_vp_restore((u64 *)v->arch.privregs, 0);
    6.27  	if (status != PAL_STATUS_SUCCESS)
    6.28  		panic("Restore vp status failed\n");
    6.29  
     7.1 --- a/xen/arch/ia64/vmx/vmx_interrupt.c	Fri Mar 10 10:00:31 2006 -0700
     7.2 +++ b/xen/arch/ia64/vmx/vmx_interrupt.c	Tue Mar 14 12:27:57 2006 -0700
     7.3 @@ -334,12 +334,13 @@ static void
     7.4   *  @ Nat Consumption Vector
     7.5   * Refer to SDM Vol2 Table 5-6 & 8-1
     7.6   */
     7.7 -
     7.8 +#if 0
     7.9  static void
    7.10  ir_nat_page_consumption (VCPU *vcpu, u64 vadr)
    7.11  {
    7.12      _nat_consumption_fault(vcpu, vadr, DATA);
    7.13  }
    7.14 +#endif //shadow it due to no use currently 
    7.15  
    7.16  /*
    7.17   * Instruction Nat Page Consumption Fault
     8.1 --- a/xen/arch/ia64/vmx/vmx_process.c	Fri Mar 10 10:00:31 2006 -0700
     8.2 +++ b/xen/arch/ia64/vmx/vmx_process.c	Tue Mar 14 12:27:57 2006 -0700
     8.3 @@ -58,6 +58,11 @@
     8.4  
     8.5  extern void die_if_kernel(char *str, struct pt_regs *regs, long err);
     8.6  extern void rnat_consumption (VCPU *vcpu);
     8.7 +extern unsigned long translate_domain_mpaddr(unsigned long mpaddr);
     8.8 +extern void alt_itlb (VCPU *vcpu, u64 vadr);
     8.9 +extern void itlb_fault (VCPU *vcpu, u64 vadr);
    8.10 +extern void ivhpt_fault (VCPU *vcpu, u64 vadr);
    8.11 +
    8.12  #define DOMN_PAL_REQUEST    0x110000
    8.13  
    8.14  static UINT64 vec2off[68] = {0x0,0x400,0x800,0xc00,0x1000, 0x1400,0x1800,
     9.1 --- a/xen/arch/ia64/vmx/vmx_virt.c	Fri Mar 10 10:00:31 2006 -0700
     9.2 +++ b/xen/arch/ia64/vmx/vmx_virt.c	Tue Mar 14 12:27:57 2006 -0700
     9.3 @@ -34,6 +34,7 @@
     9.4  #include <asm/virt_event.h>
     9.5  #include <asm/vmx_phy_mode.h>
     9.6  extern UINT64 privop_trace;
     9.7 +extern void vhpi_detection(VCPU *vcpu);//temporarily place here,need a header file.
     9.8  
     9.9  void
    9.10  ia64_priv_decoder(IA64_SLOT_TYPE slot_type, INST64 inst, UINT64  * cause)
    10.1 --- a/xen/arch/ia64/xen/vcpu.c	Fri Mar 10 10:00:31 2006 -0700
    10.2 +++ b/xen/arch/ia64/xen/vcpu.c	Tue Mar 14 12:27:57 2006 -0700
    10.3 @@ -650,7 +650,7 @@ void vcpu_pend_interrupt(VCPU *vcpu, UIN
    10.4   * and this must be checked independently; see vcpu_deliverable interrupts() */
    10.5  UINT64 vcpu_check_pending_interrupts(VCPU *vcpu)
    10.6  {
    10.7 -	UINT64 *p, *q, *r, bits, bitnum, mask, i, vector;
    10.8 +	UINT64 *p, *r, bits, bitnum, mask, i, vector;
    10.9  
   10.10  	/* Always check pending event, since guest may just ack the
   10.11  	 * event injection without handle. Later guest may throw out
   10.12 @@ -664,8 +664,8 @@ check_start:
   10.13  
   10.14  	p = &PSCBX(vcpu,irr[3]);
   10.15  	r = &PSCBX(vcpu,insvc[3]);
   10.16 -	for (i = 3; ; p--, q--, r--, i--) {
   10.17 -		bits = *p /* & *q */;
   10.18 +	for (i = 3; ; p--, r--, i--) {
   10.19 +		bits = *p ;
   10.20  		if (bits) break; // got a potential interrupt
   10.21  		if (*r) {
   10.22  			// nothing in this word which is pending+inservice
    11.1 --- a/xen/include/asm-ia64/linux/asm/hw_irq.h	Fri Mar 10 10:00:31 2006 -0700
    11.2 +++ b/xen/include/asm-ia64/linux/asm/hw_irq.h	Tue Mar 14 12:27:57 2006 -0700
    11.3 @@ -85,6 +85,7 @@ extern int assign_irq_vector (int irq);	
    11.4  extern void free_irq_vector (int vector);
    11.5  extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect);
    11.6  extern void register_percpu_irq (ia64_vector vec, struct irqaction *action);
    11.7 +extern int xen_do_IRQ(ia64_vector vector);
    11.8  
    11.9  static inline void
   11.10  hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector)
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/xen/include/asm-ia64/vlsapic.h	Tue Mar 14 12:27:57 2006 -0700
    12.3 @@ -0,0 +1,35 @@
    12.4 +
    12.5 +
    12.6 +/* -*-  Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
    12.7 +/*
    12.8 + * Copyright (c) 2004, Intel Corporation.
    12.9 + *
   12.10 + * This program is free software; you can redistribute it and/or modify it
   12.11 + * under the terms and conditions of the GNU General Public License,
   12.12 + * version 2, as published by the Free Software Foundation.
   12.13 + *
   12.14 + * This program is distributed in the hope it will be useful, but WITHOUT
   12.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   12.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   12.17 + * more details.
   12.18 + *
   12.19 + * You should have received a copy of the GNU General Public License along with
   12.20 + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
   12.21 + * Place - Suite 330, Boston, MA 02111-1307 USA.
   12.22 + *
   12.23 + * 
   12.24 + */
   12.25 +
   12.26 +#ifndef _LSAPIC_H
   12.27 +#define _LSAPIC_H
   12.28 +#include <xen/sched.h>
   12.29 +
   12.30 +extern void vmx_virq_line_init(struct domain *d);
   12.31 +extern void vtm_init(struct vcpu *vcpu);
   12.32 +extern void vtm_set_itc(struct  vcpu *vcpu, uint64_t new_itc);
   12.33 +extern void vtm_set_itm(struct vcpu *vcpu, uint64_t val);
   12.34 +extern void vtm_set_itv(struct vcpu *vcpu, uint64_t val);
   12.35 +extern void vmx_vexirq(struct vcpu  *vcpu);
   12.36 +extern void vhpi_detection(struct vcpu *vcpu);
   12.37 +
   12.38 +#endif
    13.1 --- a/xen/include/asm-ia64/vmmu.h	Fri Mar 10 10:00:31 2006 -0700
    13.2 +++ b/xen/include/asm-ia64/vmmu.h	Tue Mar 14 12:27:57 2006 -0700
    13.3 @@ -376,6 +376,9 @@ extern thash_cb_t *init_domain_tlb(struc
    13.4  extern thash_data_t * vsa_thash(PTA vpta, u64 va, u64 vrr, u64 *tag);
    13.5  extern thash_data_t * vhpt_lookup(u64 va);
    13.6  extern void machine_tlb_purge(u64 va, u64 ps);
    13.7 +extern int fetch_code(struct vcpu *vcpu, u64 gip, u64 *code1, u64 *code2);
    13.8 +extern void emulate_io_inst(struct vcpu *vcpu, u64 padr, u64 ma);
    13.9 +extern int vhpt_enabled(struct vcpu *vcpu, uint64_t vadr, vhpt_ref_t ref);
   13.10  
   13.11  static inline void vmx_vcpu_set_tr (thash_data_t *trp, u64 pte, u64 itir, u64 va, u64 rid)
   13.12  {
    14.1 --- a/xen/include/xen/irq.h	Fri Mar 10 10:00:31 2006 -0700
    14.2 +++ b/xen/include/xen/irq.h	Tue Mar 14 12:27:57 2006 -0700
    14.3 @@ -71,5 +71,6 @@ struct vcpu;
    14.4  extern int pirq_guest_unmask(struct domain *p);
    14.5  extern int pirq_guest_bind(struct vcpu *p, int irq, int will_share);
    14.6  extern int pirq_guest_unbind(struct domain *p, int irq);
    14.7 +extern  fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
    14.8  
    14.9  #endif /* __XEN_IRQ_H__ */