ia64/xen-unstable

changeset 9083:c668c6abb5f0

[IA64] Warnings removal and small cleanups.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Mon Mar 06 09:06:55 2006 -0700 (2006-03-06)
parents c870c7f66abc
children ede16886f979
files xen/arch/ia64/linux-xen/smpboot.c xen/arch/ia64/xen/dom_fw.c xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/vcpu.c xen/arch/ia64/xen/xentime.c xen/include/asm-ia64/dom_fw.h xen/include/asm-ia64/flushtlb.h xen/include/asm-ia64/linux-xen/asm/system.h xen/include/asm-ia64/mm.h
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/smpboot.c	Mon Mar 06 09:01:43 2006 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/smpboot.c	Mon Mar 06 09:06:55 2006 -0700
     1.3 @@ -482,16 +482,14 @@ do_boot_cpu (int sapicid, int cpu)
     1.4  do_rest:
     1.5  	task_for_booting_cpu = c_idle.idle;
     1.6  #else
     1.7 -	struct domain *idle;
     1.8  	struct vcpu *v;
     1.9 -	void *stack;
    1.10  
    1.11  	v = idle_vcpu[cpu] = alloc_vcpu(idle_vcpu[0]->domain, cpu, cpu);
    1.12  	BUG_ON(v == NULL);
    1.13  
    1.14 -	printf ("do_boot_cpu: cpu=%d, domain=%p, vcpu=%p\n", cpu, idle, v);
    1.15 +	//printf ("do_boot_cpu: cpu=%d, domain=%p, vcpu=%p\n", cpu, idle, v);
    1.16  
    1.17 -	task_for_booting_cpu = v;
    1.18 +	task_for_booting_cpu = (task_t *)v;
    1.19  
    1.20  	/* Set cpu number.  */
    1.21  	get_thread_info(v)->cpu = cpu;
    1.22 @@ -522,6 +520,7 @@ do_rest:
    1.23  	return 0;
    1.24  }
    1.25  
    1.26 +#ifndef XEN
    1.27  static int __init
    1.28  decay (char *str)
    1.29  {
    1.30 @@ -531,6 +530,7 @@ decay (char *str)
    1.31  }
    1.32  
    1.33  __setup("decay=", decay);
    1.34 +#endif
    1.35  
    1.36  /*
    1.37   * Initialize the logical CPU number to SAPICID mapping
     2.1 --- a/xen/arch/ia64/xen/dom_fw.c	Mon Mar 06 09:01:43 2006 -0700
     2.2 +++ b/xen/arch/ia64/xen/dom_fw.c	Mon Mar 06 09:06:55 2006 -0700
     2.3 @@ -210,8 +210,8 @@ sal_emulator (long index, unsigned long 
     2.4  	      unsigned long in3, unsigned long in4, unsigned long in5,
     2.5  	      unsigned long in6, unsigned long in7)
     2.6  {
     2.7 -	long r9  = 0;
     2.8 -	long r10 = 0;
     2.9 +	unsigned long r9  = 0;
    2.10 +	unsigned long r10 = 0;
    2.11  	long r11 = 0;
    2.12  	long status;
    2.13  
    2.14 @@ -285,12 +285,11 @@ sal_emulator (long index, unsigned long 
    2.15  }
    2.16  
    2.17  struct ia64_pal_retval
    2.18 -xen_pal_emulator(unsigned long index, unsigned long in1,
    2.19 -	unsigned long in2, unsigned long in3)
    2.20 +xen_pal_emulator(unsigned long index, u64 in1, u64 in2, u64 in3)
    2.21  {
    2.22 -	long r9  = 0;
    2.23 -	long r10 = 0;
    2.24 -	long r11 = 0;
    2.25 +	unsigned long r9  = 0;
    2.26 +	unsigned long r10 = 0;
    2.27 +	unsigned long r11 = 0;
    2.28  	long status = -1;
    2.29  
    2.30  	if (running_on_sim) return pal_emulator_static(index);
    2.31 @@ -364,7 +363,7 @@ xen_pal_emulator(unsigned long index, un
    2.32  				&r10);
    2.33  		break;
    2.34  	    case PAL_REGISTER_INFO:
    2.35 -		status = ia64_pal_register_info(in1,&r9,&r10);
    2.36 +		status = ia64_pal_register_info(in1, &r9, &r10);
    2.37  		break;
    2.38  	    case PAL_CACHE_FLUSH:
    2.39  		/* FIXME */
    2.40 @@ -608,13 +607,13 @@ dom_fw_fake_acpi(struct fake_acpi_tables
    2.41  	/* Trivial namespace, avoids ACPI CA complaints */
    2.42  	tables->aml[0] = 0x10; /* Scope */
    2.43  	tables->aml[1] = 0x12; /* length/offset to next object */
    2.44 -	strncpy(&tables->aml[2], "_SB_", 4);
    2.45 +	strncpy((char *)&tables->aml[2], "_SB_", 4);
    2.46  
    2.47  	/* The processor object isn't absolutely necessary, revist for SMP */
    2.48  	tables->aml[6] = 0x5b; /* processor object */
    2.49  	tables->aml[7] = 0x83;
    2.50  	tables->aml[8] = 0x0b; /* next */
    2.51 -	strncpy(&tables->aml[9], "CPU0", 4);
    2.52 +	strncpy((char *)&tables->aml[9], "CPU0", 4);
    2.53  
    2.54  	dsdt->checksum = generate_acpi_checksum(dsdt, dsdt->length);
    2.55  
    2.56 @@ -801,8 +800,8 @@ dom_fw_init (struct domain *d, char *arg
    2.57  	sal_systab->sal_rev_major = 0;
    2.58  	sal_systab->entry_count = 1;
    2.59  
    2.60 -	strcpy(sal_systab->oem_id, "Xen/ia64");
    2.61 -	strcpy(sal_systab->product_id, "Xen/ia64");
    2.62 +	strcpy((char *)sal_systab->oem_id, "Xen/ia64");
    2.63 +	strcpy((char *)sal_systab->product_id, "Xen/ia64");
    2.64  
    2.65  	/* fill in an entry point: */
    2.66  	sal_ed->type = SAL_DESC_ENTRY_POINT;
     3.1 --- a/xen/arch/ia64/xen/domain.c	Mon Mar 06 09:01:43 2006 -0700
     3.2 +++ b/xen/arch/ia64/xen/domain.c	Mon Mar 06 09:06:55 2006 -0700
     3.3 @@ -351,8 +351,9 @@ void new_thread(struct vcpu *v,
     3.4  		regs->cr_ipsr = 0x501008826008; /* Need to be expanded as macro */
     3.5  	} else {
     3.6  		regs->cr_ipsr = ia64_getreg(_IA64_REG_PSR)
     3.7 -			| IA64_PSR_BITS_TO_SET | IA64_PSR_BN
     3.8 -			& ~(IA64_PSR_BITS_TO_CLEAR | IA64_PSR_RI | IA64_PSR_IS);
     3.9 +		  | IA64_PSR_BITS_TO_SET | IA64_PSR_BN;
    3.10 +		regs->cr_ipsr &= ~(IA64_PSR_BITS_TO_CLEAR
    3.11 +				   | IA64_PSR_RI | IA64_PSR_IS);
    3.12  		regs->cr_ipsr |= 2UL << IA64_PSR_CPL0_BIT; // domain runs at PL2
    3.13  	}
    3.14  	regs->cr_iip = start_pc;
     4.1 --- a/xen/arch/ia64/xen/vcpu.c	Mon Mar 06 09:01:43 2006 -0700
     4.2 +++ b/xen/arch/ia64/xen/vcpu.c	Mon Mar 06 09:06:55 2006 -0700
     4.3 @@ -945,8 +945,8 @@ IA64FAULT vcpu_set_eoi(VCPU *vcpu, UINT6
     4.4  	p = &PSCBX(vcpu,insvc[3]);
     4.5  	for (i = 3; (i >= 0) && !(bits = *p); i--, p--);
     4.6  	if (i < 0) {
     4.7 -		printf("Trying to EOI interrupt when none are in-service.\r\n");
     4.8 -		return;
     4.9 +		printf("Trying to EOI interrupt when none are in-service.\n");
    4.10 +		return IA64_NO_FAULT;
    4.11  	}
    4.12  	bitnum = ia64_fls(bits);
    4.13  	vec = bitnum + (i*64);
    4.14 @@ -957,7 +957,7 @@ IA64FAULT vcpu_set_eoi(VCPU *vcpu, UINT6
    4.15  	if (PSCB(vcpu,interrupt_delivery_enabled)) { // but only if enabled...
    4.16  		// worry about this later... Linux only calls eoi
    4.17  		// with interrupts disabled
    4.18 -		printf("Trying to EOI interrupt with interrupts enabled\r\n");
    4.19 +		printf("Trying to EOI interrupt with interrupts enabled\n");
    4.20  	}
    4.21  	if (vcpu_check_pending_interrupts(vcpu) != SPURIOUS_VECTOR)
    4.22  		PSCB(vcpu,pending_interruption) = 1;
     5.1 --- a/xen/arch/ia64/xen/xentime.c	Mon Mar 06 09:01:43 2006 -0700
     5.2 +++ b/xen/arch/ia64/xen/xentime.c	Mon Mar 06 09:06:55 2006 -0700
     5.3 @@ -141,7 +141,7 @@ xen_timer_interrupt (int irq, void *dev_
     5.4  	new_itm = local_cpu_data->itm_next;
     5.5  
     5.6  	if (!VMX_DOMAIN(current) && !time_after(ia64_get_itc(), new_itm))
     5.7 -		return;
     5.8 +		return IRQ_HANDLED;
     5.9  
    5.10  	if (VMX_DOMAIN(current))
    5.11  		vcpu_wake(current);
     6.1 --- a/xen/include/asm-ia64/dom_fw.h	Mon Mar 06 09:01:43 2006 -0700
     6.2 +++ b/xen/include/asm-ia64/dom_fw.h	Mon Mar 06 09:06:55 2006 -0700
     6.3 @@ -119,7 +119,7 @@ extern unsigned long dom_fw_setup(struct
     6.4  #define FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_PADDR	FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_INDEX)
     6.5  #define FW_HYPERCALL_EFI_RESET_SYSTEM_PADDR		FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_RESET_SYSTEM_INDEX)
     6.6  
     6.7 -extern struct ia64_pal_retval xen_pal_emulator(UINT64,UINT64,UINT64,UINT64);
     6.8 +extern struct ia64_pal_retval xen_pal_emulator(UINT64, u64, u64, u64);
     6.9  extern struct sal_ret_values sal_emulator (long index, unsigned long in1, unsigned long in2, unsigned long in3, unsigned long in4, unsigned long in5, unsigned long in6, unsigned long in7);
    6.10  extern struct ia64_pal_retval pal_emulator_static (unsigned long);
    6.11  
     7.1 --- a/xen/include/asm-ia64/flushtlb.h	Mon Mar 06 09:01:43 2006 -0700
     7.2 +++ b/xen/include/asm-ia64/flushtlb.h	Mon Mar 06 09:06:55 2006 -0700
     7.3 @@ -1,6 +1,8 @@
     7.4  #ifndef __FLUSHTLB_H__
     7.5  #define __FLUSHTLB_H__
     7.6  
     7.7 +#include <asm/tlbflush.h>
     7.8 +
     7.9  /* The current time as shown by the virtual TLB clock. */
    7.10  extern u32 tlbflush_clock;
    7.11  
     8.1 --- a/xen/include/asm-ia64/linux-xen/asm/system.h	Mon Mar 06 09:01:43 2006 -0700
     8.2 +++ b/xen/include/asm-ia64/linux-xen/asm/system.h	Mon Mar 06 09:06:55 2006 -0700
     8.3 @@ -290,6 +290,9 @@ void cpu_idle_wait(void);
     8.4  
     8.5  #ifdef XEN
     8.6  #include <asm/xensystem.h>
     8.7 +#ifndef __ASSEMBLY__
     8.8 +struct resource;
     8.9 +#endif
    8.10  #endif
    8.11  
    8.12  #endif /* _ASM_IA64_SYSTEM_H */
     9.1 --- a/xen/include/asm-ia64/mm.h	Mon Mar 06 09:01:43 2006 -0700
     9.2 +++ b/xen/include/asm-ia64/mm.h	Mon Mar 06 09:06:55 2006 -0700
     9.3 @@ -462,4 +462,6 @@ extern unsigned long lookup_domain_mpa(s
     9.4  /* Arch-specific portion of memory_op hypercall. */
     9.5  #define arch_memory_op(op, arg) (-ENOSYS)
     9.6  
     9.7 +extern void assign_domain_page(struct domain *d, unsigned long mpaddr,
     9.8 +			       unsigned long physaddr);
     9.9  #endif /* __ASM_IA64_MM_H__ */