Skip to contentSkip to conversation

cleanup warning in xen/ia64

PATCH Applied Akio Takebe 4 participants 7 messages Feb 27, 2006 – Feb 28, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cleanup warning in xen/ia64

Hi, all

We clean up warning in xen/ia64 .
We have cleaned up many warnings, but it remainded some warnings yet.

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

For xen (common)
- cleanup.include.xen.patch

For xen (ia64)
- cleanup.include.asm-ia64.patch
- cleanup.linux.patch
- cleanup.linux-xen.patch
- cleanup.xen.patch

Best Regards,

Akio Takebe, and Fujitsu team

xen/include/asm-ia64/config.h +1 -1
diff -r 6c43118bdba8 xen/include/asm-ia64/config.h
@@ -255,7 +255,7 @@
 #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
 
 void dummy_called(char *function);
-#define dummy()	dummy_called(__FUNCTION__)
+#define dummy()	dummy_called((char *) __FUNCTION__)
 
 // these declarations got moved at some point, find a better place for them
 extern int ht_per_core;
xen/include/asm-ia64/mm.h +1 -0
diff -r 6c43118bdba8 xen/include/asm-ia64/mm.h
@@ -407,6 +407,7 @@
 extern int nr_swap_pages;
 
 extern unsigned long *mpt_table;
+extern unsigned long gmfn_to_mfn_foreign(struct domain *d, unsigned long gpfn);
 extern unsigned long lookup_domain_mpa(struct domain *d, unsigned long mpaddr);
 #undef machine_to_phys_mapping
 #define machine_to_phys_mapping	mpt_table
xen/include/asm-ia64/vcpu.h +13 -0
diff -r 6c43118bdba8 xen/include/asm-ia64/vcpu.h
@@ -38,7 +38,9 @@
 extern IA64FAULT vcpu_get_gr_nat(VCPU *vcpu, unsigned long reg, UINT64 *val);
 extern IA64FAULT vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value, int nat);
 /* application registers */
+extern void vcpu_load_kernel_regs(VCPU *vcpu);
 extern IA64FAULT vcpu_set_ar(VCPU *vcpu, UINT64 reg, UINT64 val);
+extern IA64FAULT vcpu_get_ar(VCPU *vcpu, UINT64 reg, UINT64 *val);
 /* psr */
 extern BOOLEAN vcpu_get_psr_ic(VCPU *vcpu);
 extern UINT64 vcpu_get_ipsr_int_state(VCPU *vcpu,UINT64 prevpsr);
@@ -46,6 +48,9 @@
 extern IA64FAULT vcpu_reset_psr_sm(VCPU *vcpu, UINT64 imm);
 extern IA64FAULT vcpu_set_psr_sm(VCPU *vcpu, UINT64 imm);
 extern IA64FAULT vcpu_set_psr_l(VCPU *vcpu, UINT64 val);
+extern IA64FAULT vcpu_set_psr_i(VCPU *vcpu);
+extern IA64FAULT vcpu_reset_psr_dt(VCPU *vcpu);
+extern IA64FAULT vcpu_set_psr_dt(VCPU *vcpu);
 /* control registers */
 extern IA64FAULT vcpu_set_dcr(VCPU *vcpu, UINT64 val);
 extern IA64FAULT vcpu_set_itm(VCPU *vcpu, UINT64 val);
@@ -89,6 +94,8 @@
 extern IA64FAULT vcpu_get_lrr0(VCPU *vcpu, UINT64 *pval);
 extern IA64FAULT vcpu_get_lrr1(VCPU *vcpu, UINT64 *pval);
 /* interrupt registers */
+extern void vcpu_pend_unspecified_interrupt(VCPU *vcpu);
+extern UINT64 vcpu_check_pending_interrupts(VCPU *vcpu);
 extern IA64FAULT vcpu_get_itv(VCPU *vcpu,UINT64 *pval);
 extern IA64FAULT vcpu_get_pmv(VCPU *vcpu,UINT64 *pval);
 extern IA64FAULT vcpu_get_cmcv(VCPU *vcpu,UINT64 *pval);
@@ -99,6 +106,7 @@
 /* interval timer registers */
 extern IA64FAULT vcpu_set_itm(VCPU *vcpu,UINT64 val);
 extern IA64FAULT vcpu_set_itc(VCPU *vcpu,UINT64 val);
+extern UINT64 vcpu_timer_pending_early(VCPU *vcpu);
 /* debug breakpoint registers */
 extern IA64FAULT vcpu_set_ibr(VCPU *vcpu,UINT64 reg,UINT64 val);
 extern IA64FAULT vcpu_set_dbr(VCPU *vcpu,UINT64 reg,UINT64 val);
@@ -135,9 +143,14 @@
 extern IA64FAULT vcpu_ptr_i(VCPU *vcpu,UINT64 vadr, UINT64 addr_range);
 extern IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, UINT64 *pteval, UINT64 *itir, UINT64 *iha);
 extern IA64FAULT vcpu_tpa(VCPU *vcpu, UINT64 vadr, UINT64 *padr);
+extern IA64FAULT vcpu_force_data_miss(VCPU *vcpu, UINT64 ifa);
+extern IA64FAULT vcpu_fc(VCPU *vcpu, UINT64 vadr);
 /* misc */
 extern IA64FAULT vcpu_rfi(VCPU *vcpu);
 extern IA64FAULT vcpu_thash(VCPU *vcpu, UINT64 vadr, UINT64 *pval);
+extern IA64FAULT vcpu_cover(VCPU *vcpu);
+extern IA64FAULT vcpu_ttag(VCPU *vcpu, UINT64 vadr, UINT64 *padr);
+extern IA64FAULT vcpu_get_cpuid(VCPU *vcpu, UINT64 reg, UINT64 *pval);
 
 extern void vcpu_pend_interrupt(VCPU *vcpu, UINT64 vector);
 extern void vcpu_pend_timer(VCPU *vcpu);
xen/include/xen/string.h +3 -0
diff -r 6c43118bdba8 xen/include/xen/string.h
@@ -24,6 +24,9 @@
 #endif
 #ifndef __HAVE_ARCH_STRNCPY
 extern char * strncpy(char *,const char *, __kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_STRLCPY
+extern size_t strlcpy(char *,const char *, __kernel_size_t);
 #endif
 #ifndef __HAVE_ARCH_STRCAT
 extern char * strcat(char *, const char *);
xen/arch/ia64/linux-xen/minstate.h +1 -1
diff -r 6c43118bdba8 xen/arch/ia64/linux-xen/minstate.h
@@ -175,7 +175,7 @@
 	;;											\
 .mem.offset 0,0; st8.spill [r16]=r13,16;							\
 .mem.offset 8,0; st8.spill [r17]=r21,16;	/* save ar.fpsr */				\
-	/* XEN mov r13=IA64_KR(CURRENT);	/* establish `current' */				\
+	/* XEN mov r13=IA64_KR(CURRENT);*/	/* establish `current' */				\
 	MINSTATE_GET_CURRENT(r13);		/* XEN establish `current' */				\
 	;;											\
 .mem.offset 0,0; st8.spill [r16]=r15,16;							\
xen/arch/ia64/linux-xen/setup.c +6 -2
diff -r 6c43118bdba8 xen/arch/ia64/linux-xen/setup.c
@@ -94,6 +94,10 @@
 EXPORT_SYMBOL(io_space);
 unsigned int num_io_spaces;
 
+#ifdef XEN
+extern void early_cmdline_parse(char **);
+#endif
+
 /*
  * "flush_icache_range()" needs to know what processor dependent stride size to use
  * when it makes i-cache(s) coherent with d-caches.
@@ -500,6 +504,7 @@
 	paging_init();
 }
 
+#ifndef XEN
 /*
  * Display cpu info for all cpu's.
  */
@@ -611,14 +616,13 @@
 {
 }
 
-#ifndef XEN
 struct seq_operations cpuinfo_op = {
 	.start =	c_start,
 	.next =		c_next,
 	.stop =		c_stop,
 	.show =		show_cpuinfo
 };
-#endif
+#endif /* XEN */
 
 void
 identify_cpu (struct cpuinfo_ia64 *c)
xen/arch/ia64/linux-xen/unaligned.c +23 -16
diff -r 6c43118bdba8 xen/arch/ia64/linux-xen/unaligned.c
@@ -216,6 +216,7 @@
 	RPT(r28), RPT(r29), RPT(r30), RPT(r31)
 };
 
+#if 0
 static u16 fr_info[32]={
 	0,			/* constant : WE SHOULD NEVER GET THIS */
 	0,			/* constant : WE SHOULD NEVER GET THIS */
@@ -285,6 +286,7 @@
 	}
 #	undef F
 }
+#endif
 
 static inline unsigned long
 rotate_reg (unsigned long sor, unsigned long rrb, unsigned long reg)
@@ -299,12 +301,11 @@
 void
 set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, unsigned long nat)
 {
-	struct switch_stack *sw = (struct switch_stack *) regs - 1;
-	unsigned long *bsp, *bspstore, *addr, *rnat_addr, *ubs_end;
+	unsigned long *bsp, *bspstore, *addr, *rnat_addr;
 	unsigned long *kbs = (void *) current + IA64_RBS_OFFSET;
-	unsigned long rnats, nat_mask;
+	unsigned long nat_mask;
     unsigned long old_rsc,new_rsc;
-	unsigned long on_kbs,rnat;
+	unsigned long rnat;
 	long sof = (regs->cr_ifs) & 0x7f;
 	long sor = 8 * ((regs->cr_ifs >> 14) & 0xf);
 	long rrb_gr = (regs->cr_ifs >> 18) & 0x7f;
@@ -323,7 +324,7 @@
     new_rsc=old_rsc&(~0x3);
     ia64_set_rsc(new_rsc);
 
-    bspstore = ia64_get_bspstore();
+    bspstore = (unsigned long*)ia64_get_bspstore();
     bsp =kbs + (regs->loadrs >> 19);//16+3
 
 	addr = ia64_rse_skip_regs(bsp, -sof + ridx);
@@ -335,7 +336,7 @@
         ia64_flushrs ();
         ia64_mf ();
 		*addr = val;
-        bspstore = ia64_get_bspstore();
+        bspstore = (unsigned long*)ia64_get_bspstore();
     	rnat = ia64_get_rnat ();
         if(bspstore < rnat_addr){
             rnat=rnat&(~nat_mask);
@@ -362,13 +363,11 @@
 
 
 static void
-get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, unsigned long *nat)
-{
-    struct switch_stack *sw = (struct switch_stack *) regs - 1;
-    unsigned long *bsp, *addr, *rnat_addr, *ubs_end, *bspstore;
+get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, int*nat)
+{
+    unsigned long *bsp, *addr, *rnat_addr, *bspstore;
     unsigned long *kbs = (void *) current + IA64_RBS_OFFSET;
-    unsigned long rnats, nat_mask;
-    unsigned long on_kbs;
+    unsigned long nat_mask;
     unsigned long old_rsc, new_rsc;
     long sof = (regs->cr_ifs) & 0x7f;
     long sor = 8 * ((regs->cr_ifs >> 14) & 0xf);
@@ -388,7 +387,7 @@
     new_rsc=old_rsc&(~(0x3));
     ia64_set_rsc(new_rsc);
 
-    bspstore = ia64_get_bspstore();
+    bspstore = (unsigned long*)ia64_get_bspstore();
     bsp =kbs + (regs->loadrs >> 19); //16+3;
 
     addr = ia64_rse_skip_regs(bsp, -sof + ridx);
@@ -399,14 +398,14 @@
 
         ia64_flushrs ();
         ia64_mf ();
-        bspstore = ia64_get_bspstore();
+        bspstore = (unsigned long*)ia64_get_bspstore();
     }
     *val=*addr;
     if(nat){
         if(bspstore < rnat_addr){
-            *nat=!!(ia64_get_rnat()&nat_mask);
+            *nat=(int)!!(ia64_get_rnat()&nat_mask);
         }else{
-            *nat = !!((*rnat_addr)&nat_mask);
+            *nat = (int)!!((*rnat_addr)&nat_mask);
         }
         ia64_set_rsc(old_rsc);
     }
@@ -634,6 +633,7 @@
 	return rotate_reg(96, rrb_fr, (regnum - IA64_FIRST_ROTATING_FR));
 }
 
+#if 0
 static void
 setfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
 {
@@ -682,6 +682,7 @@
 		regs->cr_ipsr |= IA64_PSR_MFL;
 	}
 }
+#endif
 
 /*
  * Those 2 inline functions generate the spilled versions of the constant floating point
@@ -699,6 +700,7 @@
 	ia64_stf_spill(final, 1);
 }
 
+#if 0
 static void
 getfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
 {
@@ -748,6 +750,7 @@
 		}
 	}
 }
+#endif
 
 
 #ifdef XEN
@@ -803,6 +806,7 @@
 		*nat  = (*unat >> (addr >> 3 & 0x3f)) & 0x1UL;
 }
 
+#if 0
 static void
 emulate_load_updates (update_t type, load_store_t ld, struct pt_regs *regs, unsigned long ifa)
 {
@@ -1078,6 +1082,7 @@
 
 	return 0;
 }
+#endif
 
 /*
  * floating point operations sizes in bytes
@@ -1153,6 +1158,7 @@
 	ia64_stfd(final, 6);
 }
 
+#if 0
 static int
 emulate_load_floatpair (unsigned long ifa, load_store_t ld, struct pt_regs *regs)
 {
@@ -1437,6 +1443,7 @@
 	return 0;
 
 }
+#endif
 
 void
 ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
xen/arch/ia64/linux-xen/unwind.c +2 -1
diff -r 6c43118bdba8 xen/arch/ia64/linux-xen/unwind.c
@@ -484,7 +484,8 @@
 	} else if (regnum <= 15) {
 		if (regnum <= 11) {
 			pt = get_scratch_regs(info);
-			addr = &pt->f6  + (regnum - 6);
+			//XXX struct ia64_fpreg and struct pt_fpreg are same.
+			addr = (struct ia64_fpreg*)(&pt->f6  + (regnum - 6));
 		}
 		else
 			addr = &info->sw->f12 + (regnum - 12);
xen/arch/ia64/linux/cmdline.c +1 -0
diff -r 6c43118bdba8 xen/arch/ia64/linux/cmdline.c
@@ -15,6 +15,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <xen/lib.h>
 
 
 /**
xen/arch/ia64/linux/linuxextable.c +4 -0
diff -r 6c43118bdba8 xen/arch/ia64/linux/linuxextable.c
@@ -19,6 +19,10 @@
 #include <linux/init.h>
 #include <asm/uaccess.h>
 #include <asm/sections.h>
+
+extern void *search_module_extables(unsigned long addr);
+extern void *__module_text_address(unsigned long addr);
+extern void *module_text_address(unsigned long addr);
 
 extern struct exception_table_entry __start___ex_table[];
 extern struct exception_table_entry __stop___ex_table[];
xen/arch/ia64/xen/acpi.c +6 -4
diff -r 6c43118bdba8 xen/arch/ia64/xen/acpi.c
@@ -178,7 +178,7 @@
 
 	if (lapic->address) {
 		iounmap((void *) ipi_base_addr);
-		ipi_base_addr = (unsigned long) ioremap(lapic->address, 0);
+		ipi_base_addr = (void __iomem *) ioremap(lapic->address, 0);
 	}
 	return 0;
 }
@@ -265,7 +265,9 @@
 	acpi_table_entry_header *header, const unsigned long end)
 {
 	struct acpi_table_plat_int_src *plintsrc;
+#if 0
 	int vector;
+#endif
 
 	plintsrc = (struct acpi_table_plat_int_src *) header;
 
@@ -369,9 +371,9 @@
 	/* Get base address of IPI Message Block */
 
 	if (acpi_madt->lapic_address)
-		ipi_base_addr = (unsigned long) ioremap(acpi_madt->lapic_address, 0);
-
-	printk(KERN_INFO PREFIX "Local APIC address 0x%lx\n", ipi_base_addr);
+		ipi_base_addr = (void __iomem *) ioremap(acpi_madt->lapic_address, 0);
+
+	printk(KERN_INFO PREFIX "Local APIC address %p\n", ipi_base_addr);
 
 	acpi_madt_oem_check(acpi_madt->header.oem_id,
 		acpi_madt->header.oem_table_id);
xen/arch/ia64/xen/dom0_ops.c +2 -2
diff -r 6c43118bdba8 xen/arch/ia64/xen/dom0_ops.c
@@ -17,6 +17,7 @@
 #include <xen/trace.h>
 #include <xen/console.h>
 #include <public/sched_ctl.h>
+#include <asm/vmx.h>
 
 long arch_do_dom0_op(dom0_op_t *op, dom0_op_t *u_dom0_op)
 {
@@ -143,7 +144,7 @@
             n += j;
         }
 
-        free_xenheap_page((unsigned long)l_arr);
+        free_xenheap_page((void *) l_arr);
 
         put_domain(d);
     }
@@ -160,7 +161,6 @@
         unsigned long nr_pages = op->u.getmemlist.max_pfns & 0xffffffff;
         unsigned long mfn;
         unsigned long *buffer = op->u.getmemlist.buffer;
-        struct page *page;
 
         ret = -EINVAL;
         if ( d != NULL )
xen/arch/ia64/xen/dom_fw.c +64 -49

283 lines not on this page · raw message

xen/arch/ia64/xen/domain.c +69 -59

302 lines not on this page · raw message

xen/arch/ia64/xen/hypercall.c +23 -18

102 lines not on this page · raw message

xen/arch/ia64/xen/irq.c +14 -5
diff -r 6c43118bdba8 xen/arch/ia64/xen/irq.c
@@ -286,7 +286,9 @@
 int handle_IRQ_event(unsigned int irq,
 		struct pt_regs *regs, struct irqaction *action)
 {
+#ifndef XEN
 	int status = 1;	/* Force the "do bottom halves" bit */
+#endif
 	int retval = 0;
 
 #ifndef XEN
@@ -657,8 +659,10 @@
 	if (!action)
 		return -ENOMEM;
 
+#ifdef XEN
+	action->handler = (void *) handler;
+#else
 	action->handler = handler;
-#ifndef XEN
 	action->flags = irqflags;
 	action->mask = 0;
 #endif
@@ -698,7 +702,9 @@
 #endif
 {
 	irq_desc_t *desc;
+#ifndef XEN
 	struct irqaction **p;
+#endif
 	unsigned long flags;
 
 	if (irq >= NR_IRQS)
@@ -755,7 +761,8 @@
  * disabled.
  */
 
-static DECLARE_MUTEX(probe_sem);
+#ifndef XEN
+static int DECLARE_MUTEX(probe_sem);
 
 /**
  *	probe_irq_on	- begin an interrupt autodetect
@@ -765,7 +772,6 @@
  *
  */
 
-#ifndef XEN
 unsigned long probe_irq_on(void)
 {
 	unsigned int i;
@@ -936,7 +942,9 @@
 
 int setup_irq(unsigned int irq, struct irqaction * new)
 {
+#ifndef XEN
 	int shared = 0;
+#endif
 	unsigned long flags;
 	struct irqaction *old, **p;
 	irq_desc_t *desc = irq_descp(irq);
@@ -1371,7 +1379,7 @@
     return 0;
 }
 
-int pirq_guest_bind(struct vcpu *d, int irq, int will_share)
+int pirq_guest_bind(struct vcpu *v, int irq, int will_share)
 {
     irq_desc_t         *desc = &irq_desc[irq];
     irq_guest_action_t *action;
@@ -1431,7 +1439,7 @@
         goto out;
     }
 
-    action->guest[action->nr_guests++] = d;
+    action->guest[action->nr_guests++] = v->domain;
 
  out:
     spin_unlock_irqrestore(&desc->lock, flags);
@@ -1480,6 +1488,7 @@
 #ifdef XEN
 #ifdef IA64
 // this is a temporary hack until real console input is implemented
+extern void domain_pend_keyboard_interrupt(int irq);
 irqreturn_t guest_forward_keyboard_input(int irq, void *nada, struct pt_regs *regs)
 {
 	domain_pend_keyboard_interrupt(irq);
xen/arch/ia64/xen/mm_init.c +8 -4
diff -r 6c43118bdba8 xen/arch/ia64/xen/mm_init.c
@@ -47,6 +47,7 @@
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
 #include <asm/mca.h>
+#include <asm/vhpt.h>
 
 #ifndef XEN
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -63,7 +64,7 @@
 EXPORT_SYMBOL(vmem_map);
 #endif
 
-static int pgt_cache_water[2] = { 25, 50 };
+// static int pgt_cache_water[2] = { 25, 50 };
 
 struct page *zero_page_memmap_ptr;		/* map entry for zero page */
 EXPORT_SYMBOL(zero_page_memmap_ptr);
@@ -222,7 +223,7 @@
 ia64_set_rbs_bot (void)
 {
 #ifdef XEN
-	unsigned stack_size = MAX_USER_STACK_SIZE;
+	unsigned long stack_size = MAX_USER_STACK_SIZE;
 #else
 	unsigned long stack_size = current->rlim[RLIMIT_STACK].rlim_max & -16;
 #endif
@@ -279,7 +280,7 @@
 #endif
 }
 
-setup_gate (void)
+void setup_gate (void)
 {
 	printk("setup_gate not-implemented.\n");
 }
@@ -287,7 +288,10 @@
 void __devinit
 ia64_mmu_init (void *my_cpu_data)
 {
-	unsigned long psr, pta, impl_va_bits;
+	unsigned long psr, impl_va_bits;
+#if 0
+	unsigned long pta;
+#endif
 	extern void __devinit tlb_init (void);
 	int cpu;
 
xen/arch/ia64/xen/pcdp.c +2 -0
diff -r 6c43118bdba8 xen/arch/ia64/xen/pcdp.c
@@ -71,7 +71,9 @@
 {
 	struct pcdp *pcdp;
 	struct pcdp_uart *uart;
+#ifndef XEN
 	struct pcdp_device *dev, *end;
+#endif
 	int i, serial = 0;
 
 	pcdp = efi.hcdp;
xen/arch/ia64/xen/privop.c +43 -40

198 lines not on this page · raw message

xen/arch/ia64/xen/process.c +46 -36

218 lines not on this page · raw message

xen/arch/ia64/xen/regionreg.c +8 -5
diff -r 6c43118bdba8 xen/arch/ia64/xen/regionreg.c
@@ -18,6 +18,8 @@
 extern void ia64_new_rr7(unsigned long rid,void *shared_info, void *shared_arch_info, unsigned long p_vhpt, unsigned long v_pal);
 extern void *pal_vaddr;
 
+/* FIXME: where these declarations should be there ? */
+extern void panic_domain(struct pt_regs *, const char *, ...);
 
 #define	IA64_MIN_IMPL_RID_BITS	(IA64_MIN_IMPL_RID_MSB+1)
 #define	IA64_MAX_IMPL_RID_BITS	24
@@ -142,7 +144,7 @@
 	// setup domain struct
 	d->arch.rid_bits = ridbits;
 	d->arch.starting_rid = i << IA64_MIN_IMPL_RID_BITS; d->arch.ending_rid = (i+n_rid_blocks) << IA64_MIN_IMPL_RID_BITS;
-printf("###allocating rid_range, domain %p: starting_rid=%lx, ending_rid=%lx\n",
+printf("###allocating rid_range, domain %p: starting_rid=%x, ending_rid=%x\n",
 d,d->arch.starting_rid, d->arch.ending_rid);
 	
 	return 1;
@@ -220,8 +222,8 @@
 	newrid = v->arch.starting_rid + rrv.rid;
 
 	if (newrid > v->arch.ending_rid) {
-		printk("can't set rr%d to %lx, starting_rid=%lx,"
-			"ending_rid=%lx, val=%lx\n", rreg, newrid,
+		printk("can't set rr%d to %lx, starting_rid=%x,"
+			"ending_rid=%x, val=%lx\n", (int) rreg, newrid,
 			v->arch.starting_rid,v->arch.ending_rid,val);
 		return 0;
 	}
@@ -252,7 +254,7 @@
 	if (rreg == 0) v->arch.metaphysical_saved_rr0 =
 		vmMangleRID(newrrv.rrval);
 	if (rreg == 7) ia64_new_rr7(vmMangleRID(newrrv.rrval),v->vcpu_info,
-				v->arch.privregs, vhpt_paddr, pal_vaddr);
+				v->arch.privregs, vhpt_paddr, (unsigned long) pal_vaddr);
 	else set_rr(rr,newrrv.rrval);
 #endif
 	return 1;
@@ -262,11 +264,12 @@
 int set_metaphysical_rr0(void)
 {
 	struct vcpu *v = current;
-	ia64_rr rrv;
+//	ia64_rr rrv;
 	
 //	rrv.ve = 1; 	FIXME: TURN ME BACK ON WHEN VHPT IS WORKING
 	ia64_set_rr(0,v->arch.metaphysical_rr0);
 	ia64_srlz_d();
+	return 1;
 }
 
 // validates/changes region registers 0-6 in the currently executing domain
xen/arch/ia64/xen/sn_console.c +7 -9
diff -r 6c43118bdba8 xen/arch/ia64/xen/sn_console.c
@@ -9,7 +9,13 @@
 #include <asm/sn/sn_sal.h>
 #include <xen/serial.h>
 
-void sn_putc(struct serial_port *, char);
+/*
+ * sn_putc - Send a character to the console, polled or interrupt mode
+ */
+static void sn_putc(struct serial_port *port, char c)
+{
+	ia64_sn_console_putc(c);
+}
 
 static struct uart_driver sn_sal_console = {
 	.putc = sn_putc,
@@ -75,11 +81,3 @@
 
 	return 0;
 }
-
-/*
- * sn_putc - Send a character to the console, polled or interrupt mode
- */
-void sn_putc(struct serial_port *port, char c)
-{
-	return ia64_sn_console_putc(c);
-}
xen/arch/ia64/xen/vcpu.c +31 -22

163 lines not on this page · raw message

xen/arch/ia64/xen/vhpt.c +5 -6
diff -r 6c43118bdba8 xen/arch/ia64/xen/vhpt.c
@@ -20,7 +20,7 @@
 void vhpt_flush(void)
 {
 	struct vhpt_lf_entry *v = (void *)VHPT_ADDR;
-	int i, cnt = 0;
+	int i;
 #if 0
 static int firsttime = 2;
 
@@ -47,7 +47,6 @@
 #ifdef VHPT_GLOBAL
 void vhpt_flush_address(unsigned long vadr, unsigned long addr_range)
 {
-	unsigned long ps;
 	struct vhpt_lf_entry *vlfe;
 
 	if ((vadr >> 61) == 7) {
@@ -128,20 +127,20 @@
 	// allocate a huge chunk of physical memory.... how???
 	vhpt_total_size = 1 << VHPT_SIZE_LOG2;	// 4MB, 16MB, 64MB, or 256MB
 	vhpt_alignment = 1 << VHPT_SIZE_LOG2;	// 4MB, 16MB, 64MB, or 256MB
-	printf("vhpt_init: vhpt size=%p, align=%p\n",vhpt_total_size,vhpt_alignment);
+	printf("vhpt_init: vhpt size=%lx, align=%lx\n", vhpt_total_size, vhpt_alignment);
 	/* This allocation only holds true if vhpt table is unique for
 	 * all domains. Or else later new vhpt table should be allocated
 	 * from domain heap when each domain is created. Assume xen buddy
 	 * allocator can provide natural aligned page by order?
 	 */
-	vhpt_imva = alloc_xenheap_pages(VHPT_SIZE_LOG2 - PAGE_SHIFT);
+	vhpt_imva = (unsigned long) alloc_xenheap_pages(VHPT_SIZE_LOG2 - PAGE_SHIFT);
 	if (!vhpt_imva) {
 		printf("vhpt_init: can't allocate VHPT!\n");
 		while(1);
 	}
 	vhpt_paddr = __pa(vhpt_imva);
 	vhpt_pend = vhpt_paddr + vhpt_total_size - 1;
-	printf("vhpt_init: vhpt paddr=%p, end=%p\n",vhpt_paddr,vhpt_pend);
+	printf("vhpt_init: vhpt paddr=%lx, end=%lx\n", vhpt_paddr, vhpt_pend);
 	vhpt_pte = pte_val(pfn_pte(vhpt_paddr >> PAGE_SHIFT, PAGE_KERNEL));
 	vhpt_map();
 	ia64_set_pta(VHPT_ADDR | (1 << 8) | (VHPT_SIZE_LOG2 << 2) |
@@ -167,6 +166,6 @@
 		if (v->CChain) vhpt_chains++;
 	}
 	s += sprintf(s,"VHPT usage: %ld/%ld (%ld collision chains)\n",
-		vhpt_valid,VHPT_NUM_ENTRIES,vhpt_chains);
+		vhpt_valid, (unsigned long) VHPT_NUM_ENTRIES, vhpt_chains);
 	return s - buf;
 }
xen/arch/ia64/xen/xenirq.c +5 -5
diff -r 6c43118bdba8 xen/arch/ia64/xen/xenirq.c
@@ -24,7 +24,7 @@
 		firstirq = 0;
 	}
 	if (firsttime[vector]) {
-		printf("**** (entry) First received int on vector=%d,itc=%lx\n",
+		printf("**** (entry) First received int on vector=%lu,itc=%lx\n",
 			(unsigned long) vector, ia64_get_itc());
 		firsttime[vector] = 0;
 	}
@@ -38,13 +38,13 @@
 		extern void vcpu_pend_interrupt(void *, int);
 #if 0
 		if (firsttime[vector]) {
-			printf("**** (iterate) First received int on vector=%d,itc=%lx\n",
-			(unsigned long) vector, ia64_get_itc());
+			printf("**** (iterate) First received int on vector=%lu,itc=%lx\n",
+				(unsigned long) vector, ia64_get_itc());
 			firsttime[vector] = 0;
 		}
 		if (firstpend[vector]) {
-			printf("**** First pended int on vector=%d,itc=%lx\n",
-				(unsigned long) vector,ia64_get_itc());
+			printf("**** First pended int on vector=%lu,itc=%lx\n",
+				(unsigned long) vector, ia64_get_itc());
 			firstpend[vector] = 0;
 		}
 #endif
xen/arch/ia64/xen/xenmem.c +1 -2
diff -r 6c43118bdba8 xen/arch/ia64/xen/xenmem.c
@@ -34,7 +34,6 @@
 void
 paging_init (void)
 {
-	struct page_info *pg;
 	unsigned int mpt_order;
 	/* Create machine to physical mapping table
 	 * NOTE: similar to frame table, later we may need virtually
@@ -61,7 +60,7 @@
 #define FT_ALIGN_SIZE	(16UL << 20)
 void __init init_frametable(void)
 {
-	unsigned long i, pfn;
+	unsigned long pfn;
 	frame_table_size = max_page * sizeof(struct page_info);
 	frame_table_size = (frame_table_size + PAGE_SIZE - 1) & PAGE_MASK;
 
xen/arch/ia64/xen/xenmisc.c +14 -6
diff -r 6c43118bdba8 xen/arch/ia64/xen/xenmisc.c
@@ -19,12 +19,18 @@
 #include <public/sched.h>
 #include <asm/vhpt.h>
 #include <asm/debugger.h>
+#include <asm/vmx.h>
+#include <asm/vmx_vcpu.h>
 
 efi_memory_desc_t ia64_efi_io_md;
 EXPORT_SYMBOL(ia64_efi_io_md);
 unsigned long wait_init_idle;
 int phys_proc_id[NR_CPUS];
 unsigned long loops_per_jiffy = (1<<12);	// from linux/init/main.c
+
+/* FIXME: where these declarations should be there ? */
+extern void load_region_regs(struct vcpu *);
+extern void show_registers(struct pt_regs *regs);
 
 void ia64_mca_init(void) { printf("ia64_mca_init() skipped (Machine check abort handling)\n"); }
 void ia64_mca_cpu_init(void *x) { }
@@ -251,6 +257,7 @@
 	   unsigned long user_rbs_end, unsigned long addr, long *val)
 {
 	printk("ia64_peek: called, not implemented\n");
+	return 1;
 }
 
 long
@@ -258,6 +265,7 @@
 	   unsigned long user_rbs_end, unsigned long addr, long val)
 {
 	printk("ia64_poke: called, not implemented\n");
+	return 1;
 }
 
 void
@@ -314,7 +322,7 @@
 static int i = 100;
 int id = ((struct vcpu *)current)->domain->domain_id & 0xf;
 if (!cnt[id]--) { printk("%x",id); cnt[id] = 500000; }
-if (!i--) { printk("+",id); i = 1000000; }
+if (!i--) { printk("+"); i = 1000000; }
 }
 
     if (VMX_DOMAIN(current)){
@@ -358,12 +366,12 @@
 	va_list args;
 	char buf[128];
 	struct vcpu *v = current;
-	static volatile int test = 1;	// so can continue easily in debug
-	extern spinlock_t console_lock;
-	unsigned long flags;
+//	static volatile int test = 1;	// so can continue easily in debug
+//	extern spinlock_t console_lock;
+//	unsigned long flags;
     
 loop:
-	printf("$$$$$ PANIC in domain %d (k6=%p): ",
+	printf("$$$$$ PANIC in domain %d (k6=0x%lx): ",
 		v->domain->domain_id, 
 		__get_cpu_var(cpu_kr)._kr[IA64_KR_CURRENT]);
 	va_start(args, fmt);
@@ -378,7 +386,7 @@
 	}
 	domain_pause_by_systemcontroller(current->domain);
 	v->domain->shutdown_code = SHUTDOWN_crash;
-	set_bit(_DOMF_shutdown, v->domain->domain_flags);
+	set_bit(_DOMF_shutdown, &v->domain->domain_flags);
 	if (v->domain->domain_id == 0) {
 		int i = 1000000000L;
 		// if domain0 crashes, just periodically print out panic
xen/arch/ia64/xen/xensetup.c +21 -9
diff -r 6c43118bdba8 xen/arch/ia64/xen/xensetup.c
@@ -14,7 +14,7 @@
 #include <public/version.h>
 //#include <xen/delay.h>
 #include <xen/compile.h>
-//#include <xen/console.h>
+#include <xen/console.h>
 #include <xen/serial.h>
 #include <xen/trace.h>
 #include <asm/meminit.h>
@@ -22,6 +22,7 @@
 #include <asm/setup.h>
 #include <xen/string.h>
 #include <asm/vmx.h>
+#include <linux/efi.h>
 
 unsigned long xenheap_phys_end;
 
@@ -35,6 +36,16 @@
 
 int find_max_pfn (unsigned long, unsigned long, void *);
 void start_of_day(void);
+
+/* FIXME: which header these declarations should be there ? */
+extern long is_platform_hp_ski(void);
+extern void early_setup_arch(char **);
+extern void late_setup_arch(char **);
+extern void hpsim_serial_init(void);
+extern void alloc_dom0(void);
+extern void setup_per_cpu_areas(void);
+extern void mem_init(void);
+extern void init_IRQ(void);
 
 /* opt_nosmp: If true, secondary processors are ignored. */
 static int opt_nosmp = 0;
@@ -149,8 +160,7 @@
 {
     unsigned char *cmdline;
     void *heap_start;
-    int i;
-    unsigned long max_mem, nr_pages, firsthole_start;
+    unsigned long nr_pages, firsthole_start;
     unsigned long dom0_memory_start, dom0_memory_size;
     unsigned long dom0_initrd_start, dom0_initrd_size;
     unsigned long initial_images_start, initial_images_end;
@@ -160,7 +170,7 @@
     /* Kernel may be relocated by EFI loader */
     xen_pstart = ia64_tpa(KERNEL_START);
 
-    early_setup_arch(&cmdline);
+    early_setup_arch((char **) &cmdline);
 
     /* We initialise the serial devices very early so we can get debugging. */
     if (running_on_sim) hpsim_serial_init();
@@ -248,9 +258,9 @@
 	max_page);
 
     heap_start = memguard_init(ia64_imva(&_end));
-    printf("Before heap_start: 0x%lx\n", heap_start);
+    printf("Before heap_start: %p\n", heap_start);
     heap_start = __va(init_boot_allocator(__pa(heap_start)));
-    printf("After heap_start: 0x%lx\n", heap_start);
+    printf("After heap_start: %p\n", heap_start);
 
     reserve_memory();
 
@@ -281,7 +291,7 @@
     idle_domain = domain_create(IDLE_DOMAIN_ID, 0);
     BUG_ON(idle_domain == NULL);
 
-    late_setup_arch(&cmdline);
+    late_setup_arch((char **) &cmdline);
     setup_per_cpu_areas();
     mem_init();
 
@@ -298,6 +308,8 @@
 #endif
 
 #ifdef CONFIG_SMP
+    int i;
+
     if ( opt_nosmp )
     {
         max_cpus = 0;
@@ -349,9 +361,9 @@
      * above our heap. The second module, if present, is an initrd ramdisk.
      */
     printk("About to call construct_dom0()\n");
-    dom0_memory_start = __va(initial_images_start);
+    dom0_memory_start = (unsigned long) __va(initial_images_start);
     dom0_memory_size = ia64_boot_param->domain_size;
-    dom0_initrd_start = __va(initial_images_start +
+    dom0_initrd_start = (unsigned long) __va(initial_images_start +
 			     PAGE_ALIGN(ia64_boot_param->domain_size));
     dom0_initrd_size = ia64_boot_param->initrd_size;
  
xen/arch/ia64/xen/xentime.c +6 -5
diff -r 6c43118bdba8 xen/arch/ia64/xen/xentime.c
@@ -30,6 +30,9 @@
 #include <linux/jiffies.h>	// not included by xen/sched.h
 #include <xen/softirq.h>
 
+/* FIXME: where these declarations should be there ? */
+extern void ia64_init_itm(void);
+
 seqlock_t xtime_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED;
 
 #define TIME_KEEPER_ID  0
@@ -70,7 +73,7 @@
 s_time_t get_s_time(void)
 {
     s_time_t now;
-    unsigned long flags, seq;
+    unsigned long seq;
 
     do {
 	seq = read_seqbegin(&xtime_lock);
@@ -202,7 +205,7 @@
 }
 
 static struct irqaction xen_timer_irqaction = {
-	.handler =	xen_timer_interrupt,
+	.handler =	(void *) xen_timer_interrupt,
 	.name =		"timer"
 };
 
@@ -217,8 +220,6 @@
 /* Late init function (after all CPUs are booted). */
 int __init init_xen_time()
 {
-    struct timespec tm;
-
     ia64_time_init();
     itc_scale  = 1000000000UL << 32 ;
     itc_scale /= local_cpu_data->itc_freq;
@@ -253,7 +254,7 @@
 	} while (unlikely(read_seqretry(&xtime_lock, seq)));
 
 	local_cpu_data->itm_next = itm_next;
-	vcpu_set_next_timer(current);
+	vcpu_set_next_timer(v);
 	return 1;
 }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 5 lines · Akio Takebe

We clean up warning in xen/ia64 .
We have cleaned up many warnings, but it remainded some warnings yet.

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

I'll assume these are destined for the ia64-unstable tree.

-- Keir

#2 lore raw

Hi, Keir

Quoted 2 lines

For xen (common)
- cleanup.include.xen.patch

Yes, this work is for Xen/ia64.
This patch isn't concerned with Xen/x86.
But strlcpy() is in xen/common/string.c,
so I think strlcpy() should be defined in xen/include/xen/string.h. Otherwise should strlcpy() be defined in xen/include/asm-ia64/linux/asm/ string.h?

Best Regards,

Akio Takebe

Quoted 11 lines · Akio Takebe
Quoted 6 lines

We clean up warning in xen/ia64 .
We have cleaned up many warnings, but it remainded some warnings yet.

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

I'll assume these are destined for the ia64-unstable tree.

Quoted 7 lines

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

xen/include/xen/string.h +3 -0
diff -r 6c43118bdba8 xen/include/xen/string.h
@@ -24,6 +24,9 @@
 #endif
 #ifndef __HAVE_ARCH_STRNCPY
 extern char * strncpy(char *,const char *, __kernel_size_t);
+#endif
+#ifndef __HAVE_ARCH_STRLCPY
+extern size_t strlcpy(char *,const char *, __kernel_size_t);
 #endif
 #ifndef __HAVE_ARCH_STRCAT
 extern char * strcat(char *, const char *);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 5 lines · Akio Takebe

This patch isn't concerned with Xen/x86.
But strlcpy() is in xen/common/string.c,
so I think strlcpy() should be defined in xen/include/xen/string.h. Otherwise should strlcpy() be defined in xen/include/asm-ia64/linux/asm/ string.h?

Okay, I'll take that patch directly into xen-unstable.

-- Keir

#4 lore raw
In reply to Akio Takebe
Quoted 8 lines · Akio Takebe

Hi, all

We clean up warning in xen/ia64 .
We have cleaned up many warnings, but it remainded some warnings yet.

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

Quoted 8 lines

For xen (common)
- cleanup.include.xen.patch

For xen (ia64)
- cleanup.include.asm-ia64.patch
- cleanup.linux.patch
- cleanup.linux-xen.patch
- cleanup.xen.patch

This looks really good. A minor comment; I see lots of "#if 0" blocks
added to the linux-xen files. These need to be "#ifndef XEN" so that we can more easily manage these changes versus upstream linux. If nobody else has comments, I can fix those when it gets committed to the tree. thanks,

Alex

Signature · 1 line
Alex Williamson                             HP Linux & Open Source Lab
#5 lore raw

Hi,

We changed from "#if 0" to "#ifndef XEN" in "cleanup.linux-xen.patch", and updated "cleanup.xen.patch" to changeset:9000.
We don't resend "cleanup.include.xen.patch", because it was committed to xen-unstable tree.

Best regards,
Kan, and Fujitsu team

Quoted 18 lines · Alex Williamson
Quoted 8 lines · Akio Takebe

Hi, all

We clean up warning in xen/ia64 .
We have cleaned up many warnings, but it remainded some warnings yet.

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

Quoted 8 lines

For xen (common)
- cleanup.include.xen.patch

For xen (ia64)
- cleanup.include.asm-ia64.patch
- cleanup.linux.patch
- cleanup.linux-xen.patch
- cleanup.xen.patch

Quoted 17 lines

This looks really good. A minor comment; I see lots of "#if 0" blocks
added to the linux-xen files. These need to be "#ifndef XEN" so that we can more easily manage these changes versus upstream linux. If nobody else has comments, I can fix those when it gets committed to the tree. thanks,

Alex

Signature · 7 lines
Alex Williamson                             HP Linux & Open Source Lab


_______________________________________________
Xen-ia64-devel mailing list
[email protected]
http://lists.xensource.com/xen-ia64-devel
xen/include/asm-ia64/config.h +1 -1
diff -r a220579c2aa8 xen/include/asm-ia64/config.h
@@ -255,7 +255,7 @@
 #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
 
 void dummy_called(char *function);
-#define dummy()	dummy_called(__FUNCTION__)
+#define dummy()	dummy_called((char *) __FUNCTION__)
 
 // these declarations got moved at some point, find a better place for them
 extern int ht_per_core;
xen/include/asm-ia64/mm.h +1 -0
diff -r a220579c2aa8 xen/include/asm-ia64/mm.h
@@ -407,6 +407,7 @@
 extern int nr_swap_pages;
 
 extern unsigned long *mpt_table;
+extern unsigned long gmfn_to_mfn_foreign(struct domain *d, unsigned long gpfn);
 extern unsigned long lookup_domain_mpa(struct domain *d, unsigned long mpaddr);
 #undef machine_to_phys_mapping
 #define machine_to_phys_mapping	mpt_table
xen/include/asm-ia64/vcpu.h +13 -0
diff -r a220579c2aa8 xen/include/asm-ia64/vcpu.h
@@ -38,7 +38,9 @@
 extern IA64FAULT vcpu_get_gr_nat(VCPU *vcpu, unsigned long reg, UINT64 *val);
 extern IA64FAULT vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value, int nat);
 /* application registers */
+extern void vcpu_load_kernel_regs(VCPU *vcpu);
 extern IA64FAULT vcpu_set_ar(VCPU *vcpu, UINT64 reg, UINT64 val);
+extern IA64FAULT vcpu_get_ar(VCPU *vcpu, UINT64 reg, UINT64 *val);
 /* psr */
 extern BOOLEAN vcpu_get_psr_ic(VCPU *vcpu);
 extern UINT64 vcpu_get_ipsr_int_state(VCPU *vcpu,UINT64 prevpsr);
@@ -46,6 +48,9 @@
 extern IA64FAULT vcpu_reset_psr_sm(VCPU *vcpu, UINT64 imm);
 extern IA64FAULT vcpu_set_psr_sm(VCPU *vcpu, UINT64 imm);
 extern IA64FAULT vcpu_set_psr_l(VCPU *vcpu, UINT64 val);
+extern IA64FAULT vcpu_set_psr_i(VCPU *vcpu);
+extern IA64FAULT vcpu_reset_psr_dt(VCPU *vcpu);
+extern IA64FAULT vcpu_set_psr_dt(VCPU *vcpu);
 /* control registers */
 extern IA64FAULT vcpu_set_dcr(VCPU *vcpu, UINT64 val);
 extern IA64FAULT vcpu_set_itm(VCPU *vcpu, UINT64 val);
@@ -89,6 +94,8 @@
 extern IA64FAULT vcpu_get_lrr0(VCPU *vcpu, UINT64 *pval);
 extern IA64FAULT vcpu_get_lrr1(VCPU *vcpu, UINT64 *pval);
 /* interrupt registers */
+extern void vcpu_pend_unspecified_interrupt(VCPU *vcpu);
+extern UINT64 vcpu_check_pending_interrupts(VCPU *vcpu);
 extern IA64FAULT vcpu_get_itv(VCPU *vcpu,UINT64 *pval);
 extern IA64FAULT vcpu_get_pmv(VCPU *vcpu,UINT64 *pval);
 extern IA64FAULT vcpu_get_cmcv(VCPU *vcpu,UINT64 *pval);
@@ -99,6 +106,7 @@
 /* interval timer registers */
 extern IA64FAULT vcpu_set_itm(VCPU *vcpu,UINT64 val);
 extern IA64FAULT vcpu_set_itc(VCPU *vcpu,UINT64 val);
+extern UINT64 vcpu_timer_pending_early(VCPU *vcpu);
 /* debug breakpoint registers */
 extern IA64FAULT vcpu_set_ibr(VCPU *vcpu,UINT64 reg,UINT64 val);
 extern IA64FAULT vcpu_set_dbr(VCPU *vcpu,UINT64 reg,UINT64 val);
@@ -135,9 +143,14 @@
 extern IA64FAULT vcpu_ptr_i(VCPU *vcpu,UINT64 vadr, UINT64 addr_range);
 extern IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, UINT64 *pteval, UINT64 *itir, UINT64 *iha);
 extern IA64FAULT vcpu_tpa(VCPU *vcpu, UINT64 vadr, UINT64 *padr);
+extern IA64FAULT vcpu_force_data_miss(VCPU *vcpu, UINT64 ifa);
+extern IA64FAULT vcpu_fc(VCPU *vcpu, UINT64 vadr);
 /* misc */
 extern IA64FAULT vcpu_rfi(VCPU *vcpu);
 extern IA64FAULT vcpu_thash(VCPU *vcpu, UINT64 vadr, UINT64 *pval);
+extern IA64FAULT vcpu_cover(VCPU *vcpu);
+extern IA64FAULT vcpu_ttag(VCPU *vcpu, UINT64 vadr, UINT64 *padr);
+extern IA64FAULT vcpu_get_cpuid(VCPU *vcpu, UINT64 reg, UINT64 *pval);
 
 extern void vcpu_pend_interrupt(VCPU *vcpu, UINT64 vector);
 extern void vcpu_pend_timer(VCPU *vcpu);
xen/arch/ia64/linux-xen/minstate.h +1 -1
diff -r a220579c2aa8 xen/arch/ia64/linux-xen/minstate.h
@@ -175,7 +175,7 @@
 	;;											\
 .mem.offset 0,0; st8.spill [r16]=r13,16;							\
 .mem.offset 8,0; st8.spill [r17]=r21,16;	/* save ar.fpsr */				\
-	/* XEN mov r13=IA64_KR(CURRENT);	/* establish `current' */				\
+	/* XEN mov r13=IA64_KR(CURRENT);*/	/* establish `current' */				\
 	MINSTATE_GET_CURRENT(r13);		/* XEN establish `current' */				\
 	;;											\
 .mem.offset 0,0; st8.spill [r16]=r15,16;							\
xen/arch/ia64/linux-xen/setup.c +6 -2
diff -r a220579c2aa8 xen/arch/ia64/linux-xen/setup.c
@@ -94,6 +94,10 @@
 EXPORT_SYMBOL(io_space);
 unsigned int num_io_spaces;
 
+#ifdef XEN
+extern void early_cmdline_parse(char **);
+#endif
+
 /*
  * "flush_icache_range()" needs to know what processor dependent stride size to use
  * when it makes i-cache(s) coherent with d-caches.
@@ -500,6 +504,7 @@
 	paging_init();
 }
 
+#ifndef XEN
 /*
  * Display cpu info for all cpu's.
  */
@@ -611,14 +616,13 @@
 {
 }
 
-#ifndef XEN
 struct seq_operations cpuinfo_op = {
 	.start =	c_start,
 	.next =		c_next,
 	.stop =		c_stop,
 	.show =		show_cpuinfo
 };
-#endif
+#endif /* XEN */
 
 void
 identify_cpu (struct cpuinfo_ia64 *c)
xen/arch/ia64/linux-xen/unaligned.c +23 -16
diff -r a220579c2aa8 xen/arch/ia64/linux-xen/unaligned.c
@@ -216,6 +216,7 @@
 	RPT(r28), RPT(r29), RPT(r30), RPT(r31)
 };
 
+#ifndef XEN
 static u16 fr_info[32]={
 	0,			/* constant : WE SHOULD NEVER GET THIS */
 	0,			/* constant : WE SHOULD NEVER GET THIS */
@@ -285,6 +286,7 @@
 	}
 #	undef F
 }
+#endif /* XEN */
 
 static inline unsigned long
 rotate_reg (unsigned long sor, unsigned long rrb, unsigned long reg)
@@ -299,12 +301,11 @@
 void
 set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, unsigned long nat)
 {
-	struct switch_stack *sw = (struct switch_stack *) regs - 1;
-	unsigned long *bsp, *bspstore, *addr, *rnat_addr, *ubs_end;
+	unsigned long *bsp, *bspstore, *addr, *rnat_addr;
 	unsigned long *kbs = (void *) current + IA64_RBS_OFFSET;
-	unsigned long rnats, nat_mask;
+	unsigned long nat_mask;
     unsigned long old_rsc,new_rsc;
-	unsigned long on_kbs,rnat;
+	unsigned long rnat;
 	long sof = (regs->cr_ifs) & 0x7f;
 	long sor = 8 * ((regs->cr_ifs >> 14) & 0xf);
 	long rrb_gr = (regs->cr_ifs >> 18) & 0x7f;
@@ -323,7 +324,7 @@
     new_rsc=old_rsc&(~0x3);
     ia64_set_rsc(new_rsc);
 
-    bspstore = ia64_get_bspstore();
+    bspstore = (unsigned long*)ia64_get_bspstore();
     bsp =kbs + (regs->loadrs >> 19);//16+3
 
 	addr = ia64_rse_skip_regs(bsp, -sof + ridx);
@@ -335,7 +336,7 @@
         ia64_flushrs ();
         ia64_mf ();
 		*addr = val;
-        bspstore = ia64_get_bspstore();
+        bspstore = (unsigned long*)ia64_get_bspstore();
     	rnat = ia64_get_rnat ();
         if(bspstore < rnat_addr){
             rnat=rnat&(~nat_mask);
@@ -362,13 +363,11 @@
 
 
 static void
-get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, unsigned long *nat)
-{
-    struct switch_stack *sw = (struct switch_stack *) regs - 1;
-    unsigned long *bsp, *addr, *rnat_addr, *ubs_end, *bspstore;
+get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, int*nat)
+{
+    unsigned long *bsp, *addr, *rnat_addr, *bspstore;
     unsigned long *kbs = (void *) current + IA64_RBS_OFFSET;
-    unsigned long rnats, nat_mask;
-    unsigned long on_kbs;
+    unsigned long nat_mask;
     unsigned long old_rsc, new_rsc;
     long sof = (regs->cr_ifs) & 0x7f;
     long sor = 8 * ((regs->cr_ifs >> 14) & 0xf);
@@ -388,7 +387,7 @@
     new_rsc=old_rsc&(~(0x3));
     ia64_set_rsc(new_rsc);
 
-    bspstore = ia64_get_bspstore();
+    bspstore = (unsigned long*)ia64_get_bspstore();
     bsp =kbs + (regs->loadrs >> 19); //16+3;
 
     addr = ia64_rse_skip_regs(bsp, -sof + ridx);
@@ -399,14 +398,14 @@
 
         ia64_flushrs ();
         ia64_mf ();
-        bspstore = ia64_get_bspstore();
+        bspstore = (unsigned long*)ia64_get_bspstore();
     }
     *val=*addr;
     if(nat){
         if(bspstore < rnat_addr){
-            *nat=!!(ia64_get_rnat()&nat_mask);
+            *nat=(int)!!(ia64_get_rnat()&nat_mask);
         }else{
-            *nat = !!((*rnat_addr)&nat_mask);
+            *nat = (int)!!((*rnat_addr)&nat_mask);
         }
         ia64_set_rsc(old_rsc);
     }
@@ -634,6 +633,7 @@
 	return rotate_reg(96, rrb_fr, (regnum - IA64_FIRST_ROTATING_FR));
 }
 
+#ifndef XEN
 static void
 setfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
 {
@@ -682,6 +682,7 @@
 		regs->cr_ipsr |= IA64_PSR_MFL;
 	}
 }
+#endif /* XEN */
 
 /*
  * Those 2 inline functions generate the spilled versions of the constant floating point
@@ -699,6 +700,7 @@
 	ia64_stf_spill(final, 1);
 }
 
+#ifndef XEN
 static void
 getfpreg (unsigned long regnum, struct ia64_fpreg *fpval, struct pt_regs *regs)
 {
@@ -748,6 +750,7 @@
 		}
 	}
 }
+#endif /* XEN */
 
 
 #ifdef XEN
@@ -803,6 +806,7 @@
 		*nat  = (*unat >> (addr >> 3 & 0x3f)) & 0x1UL;
 }
 
+#ifndef XEN
 static void
 emulate_load_updates (update_t type, load_store_t ld, struct pt_regs *regs, unsigned long ifa)
 {
@@ -1078,6 +1082,7 @@
 
 	return 0;
 }
+#endif /* XEN */
 
 /*
  * floating point operations sizes in bytes
@@ -1153,6 +1158,7 @@
 	ia64_stfd(final, 6);
 }
 
+#ifndef XEN
 static int
 emulate_load_floatpair (unsigned long ifa, load_store_t ld, struct pt_regs *regs)
 {
@@ -1437,6 +1443,7 @@
 	return 0;
 
 }
+#endif /* XEN */
 
 void
 ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
xen/arch/ia64/linux-xen/unwind.c +2 -1
diff -r a220579c2aa8 xen/arch/ia64/linux-xen/unwind.c
@@ -484,7 +484,8 @@
 	} else if (regnum <= 15) {
 		if (regnum <= 11) {
 			pt = get_scratch_regs(info);
-			addr = &pt->f6  + (regnum - 6);
+			//XXX struct ia64_fpreg and struct pt_fpreg are same.
+			addr = (struct ia64_fpreg*)(&pt->f6  + (regnum - 6));
 		}
 		else
 			addr = &info->sw->f12 + (regnum - 12);
xen/arch/ia64/linux/cmdline.c +1 -0
diff -r a220579c2aa8 xen/arch/ia64/linux/cmdline.c
@@ -15,6 +15,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <xen/lib.h>
 
 
 /**
xen/arch/ia64/linux/linuxextable.c +4 -0
diff -r a220579c2aa8 xen/arch/ia64/linux/linuxextable.c
@@ -19,6 +19,10 @@
 #include <linux/init.h>
 #include <asm/uaccess.h>
 #include <asm/sections.h>
+
+extern void *search_module_extables(unsigned long addr);
+extern void *__module_text_address(unsigned long addr);
+extern void *module_text_address(unsigned long addr);
 
 extern struct exception_table_entry __start___ex_table[];
 extern struct exception_table_entry __stop___ex_table[];
xen/arch/ia64/xen/acpi.c +6 -4
diff -r a220579c2aa8 xen/arch/ia64/xen/acpi.c
@@ -178,7 +178,7 @@
 
 	if (lapic->address) {
 		iounmap((void *) ipi_base_addr);
-		ipi_base_addr = (unsigned long) ioremap(lapic->address, 0);
+		ipi_base_addr = (void __iomem *) ioremap(lapic->address, 0);
 	}
 	return 0;
 }
@@ -265,7 +265,9 @@
 	acpi_table_entry_header *header, const unsigned long end)
 {
 	struct acpi_table_plat_int_src *plintsrc;
+#if 0
 	int vector;
+#endif
 
 	plintsrc = (struct acpi_table_plat_int_src *) header;
 
@@ -369,9 +371,9 @@
 	/* Get base address of IPI Message Block */
 
 	if (acpi_madt->lapic_address)
-		ipi_base_addr = (unsigned long) ioremap(acpi_madt->lapic_address, 0);
-
-	printk(KERN_INFO PREFIX "Local APIC address 0x%lx\n", ipi_base_addr);
+		ipi_base_addr = (void __iomem *) ioremap(acpi_madt->lapic_address, 0);
+
+	printk(KERN_INFO PREFIX "Local APIC address %p\n", ipi_base_addr);
 
 	acpi_madt_oem_check(acpi_madt->header.oem_id,
 		acpi_madt->header.oem_table_id);
xen/arch/ia64/xen/dom0_ops.c +2 -2
diff -r a220579c2aa8 xen/arch/ia64/xen/dom0_ops.c
@@ -17,6 +17,7 @@
 #include <xen/trace.h>
 #include <xen/console.h>
 #include <public/sched_ctl.h>
+#include <asm/vmx.h>
 
 long arch_do_dom0_op(dom0_op_t *op, dom0_op_t *u_dom0_op)
 {
@@ -143,7 +144,7 @@
             n += j;
         }
 
-        free_xenheap_page((unsigned long)l_arr);
+        free_xenheap_page((void *) l_arr);
 
         put_domain(d);
     }
@@ -160,7 +161,6 @@
         unsigned long nr_pages = op->u.getmemlist.max_pfns & 0xffffffff;
         unsigned long mfn;
         unsigned long *buffer = op->u.getmemlist.buffer;
-        struct page *page;
 
         ret = -EINVAL;
         if ( d != NULL )
xen/arch/ia64/xen/dom_fw.c +64 -49

283 lines not on this page · raw message

xen/arch/ia64/xen/domain.c +67 -58

301 lines not on this page · raw message

xen/arch/ia64/xen/hypercall.c +23 -18

102 lines not on this page · raw message

xen/arch/ia64/xen/irq.c +14 -5
diff -r a220579c2aa8 xen/arch/ia64/xen/irq.c
@@ -286,7 +286,9 @@
 int handle_IRQ_event(unsigned int irq,
 		struct pt_regs *regs, struct irqaction *action)
 {
+#ifndef XEN
 	int status = 1;	/* Force the "do bottom halves" bit */
+#endif
 	int retval = 0;
 
 #ifndef XEN
@@ -657,8 +659,10 @@
 	if (!action)
 		return -ENOMEM;
 
+#ifdef XEN
+	action->handler = (void *) handler;
+#else
 	action->handler = handler;
-#ifndef XEN
 	action->flags = irqflags;
 	action->mask = 0;
 #endif
@@ -698,7 +702,9 @@
 #endif
 {
 	irq_desc_t *desc;
+#ifndef XEN
 	struct irqaction **p;
+#endif
 	unsigned long flags;
 
 	if (irq >= NR_IRQS)
@@ -755,7 +761,8 @@
  * disabled.
  */
 
-static DECLARE_MUTEX(probe_sem);
+#ifndef XEN
+static int DECLARE_MUTEX(probe_sem);
 
 /**
  *	probe_irq_on	- begin an interrupt autodetect
@@ -765,7 +772,6 @@
  *
  */
 
-#ifndef XEN
 unsigned long probe_irq_on(void)
 {
 	unsigned int i;
@@ -936,7 +942,9 @@
 
 int setup_irq(unsigned int irq, struct irqaction * new)
 {
+#ifndef XEN
 	int shared = 0;
+#endif
 	unsigned long flags;
 	struct irqaction *old, **p;
 	irq_desc_t *desc = irq_descp(irq);
@@ -1371,7 +1379,7 @@
     return 0;
 }
 
-int pirq_guest_bind(struct vcpu *d, int irq, int will_share)
+int pirq_guest_bind(struct vcpu *v, int irq, int will_share)
 {
     irq_desc_t         *desc = &irq_desc[irq];
     irq_guest_action_t *action;
@@ -1431,7 +1439,7 @@
         goto out;
     }
 
-    action->guest[action->nr_guests++] = d;
+    action->guest[action->nr_guests++] = v->domain;
 
  out:
     spin_unlock_irqrestore(&desc->lock, flags);
@@ -1480,6 +1488,7 @@
 #ifdef XEN
 #ifdef IA64
 // this is a temporary hack until real console input is implemented
+extern void domain_pend_keyboard_interrupt(int irq);
 irqreturn_t guest_forward_keyboard_input(int irq, void *nada, struct pt_regs *regs)
 {
 	domain_pend_keyboard_interrupt(irq);
xen/arch/ia64/xen/mm_init.c +8 -4
diff -r a220579c2aa8 xen/arch/ia64/xen/mm_init.c
@@ -47,6 +47,7 @@
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
 #include <asm/mca.h>
+#include <asm/vhpt.h>
 
 #ifndef XEN
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -63,7 +64,7 @@
 EXPORT_SYMBOL(vmem_map);
 #endif
 
-static int pgt_cache_water[2] = { 25, 50 };
+// static int pgt_cache_water[2] = { 25, 50 };
 
 struct page *zero_page_memmap_ptr;		/* map entry for zero page */
 EXPORT_SYMBOL(zero_page_memmap_ptr);
@@ -222,7 +223,7 @@
 ia64_set_rbs_bot (void)
 {
 #ifdef XEN
-	unsigned stack_size = MAX_USER_STACK_SIZE;
+	unsigned long stack_size = MAX_USER_STACK_SIZE;
 #else
 	unsigned long stack_size = current->rlim[RLIMIT_STACK].rlim_max & -16;
 #endif
@@ -279,7 +280,7 @@
 #endif
 }
 
-setup_gate (void)
+void setup_gate (void)
 {
 	printk("setup_gate not-implemented.\n");
 }
@@ -287,7 +288,10 @@
 void __devinit
 ia64_mmu_init (void *my_cpu_data)
 {
-	unsigned long psr, pta, impl_va_bits;
+	unsigned long psr, impl_va_bits;
+#if 0
+	unsigned long pta;
+#endif
 	extern void __devinit tlb_init (void);
 	int cpu;
 
xen/arch/ia64/xen/pcdp.c +2 -0
diff -r a220579c2aa8 xen/arch/ia64/xen/pcdp.c
@@ -71,7 +71,9 @@
 {
 	struct pcdp *pcdp;
 	struct pcdp_uart *uart;
+#ifndef XEN
 	struct pcdp_device *dev, *end;
+#endif
 	int i, serial = 0;
 
 	pcdp = efi.hcdp;
xen/arch/ia64/xen/privop.c +43 -40

198 lines not on this page · raw message

xen/arch/ia64/xen/process.c +46 -36

218 lines not on this page · raw message

xen/arch/ia64/xen/regionreg.c +8 -5
diff -r a220579c2aa8 xen/arch/ia64/xen/regionreg.c
@@ -18,6 +18,8 @@
 extern void ia64_new_rr7(unsigned long rid,void *shared_info, void *shared_arch_info, unsigned long p_vhpt, unsigned long v_pal);
 extern void *pal_vaddr;
 
+/* FIXME: where these declarations should be there ? */
+extern void panic_domain(struct pt_regs *, const char *, ...);
 
 #define	IA64_MIN_IMPL_RID_BITS	(IA64_MIN_IMPL_RID_MSB+1)
 #define	IA64_MAX_IMPL_RID_BITS	24
@@ -142,7 +144,7 @@
 	// setup domain struct
 	d->arch.rid_bits = ridbits;
 	d->arch.starting_rid = i << IA64_MIN_IMPL_RID_BITS; d->arch.ending_rid = (i+n_rid_blocks) << IA64_MIN_IMPL_RID_BITS;
-printf("###allocating rid_range, domain %p: starting_rid=%lx, ending_rid=%lx\n",
+printf("###allocating rid_range, domain %p: starting_rid=%x, ending_rid=%x\n",
 d,d->arch.starting_rid, d->arch.ending_rid);
 	
 	return 1;
@@ -219,8 +221,8 @@
 	newrid = v->arch.starting_rid + rrv.rid;
 
 	if (newrid > v->arch.ending_rid) {
-		printk("can't set rr%d to %lx, starting_rid=%lx,"
-			"ending_rid=%lx, val=%lx\n", rreg, newrid,
+		printk("can't set rr%d to %lx, starting_rid=%x,"
+			"ending_rid=%x, val=%lx\n", (int) rreg, newrid,
 			v->arch.starting_rid,v->arch.ending_rid,val);
 		return 0;
 	}
@@ -253,7 +255,7 @@
 	else if (rreg == 7)
 		ia64_new_rr7(vmMangleRID(newrrv.rrval),v->vcpu_info,
 			     v->arch.privregs, __get_cpu_var(vhpt_paddr),
-			     pal_vaddr);
+			     (unsigned long) pal_vaddr);
 	else set_rr(rr,newrrv.rrval);
 #endif
 	return 1;
@@ -263,11 +265,12 @@
 int set_metaphysical_rr0(void)
 {
 	struct vcpu *v = current;
-	ia64_rr rrv;
+//	ia64_rr rrv;
 	
 //	rrv.ve = 1; 	FIXME: TURN ME BACK ON WHEN VHPT IS WORKING
 	ia64_set_rr(0,v->arch.metaphysical_rr0);
 	ia64_srlz_d();
+	return 1;
 }
 
 // validates/changes region registers 0-6 in the currently executing domain
xen/arch/ia64/xen/sn_console.c +7 -9
diff -r a220579c2aa8 xen/arch/ia64/xen/sn_console.c
@@ -9,7 +9,13 @@
 #include <asm/sn/sn_sal.h>
 #include <xen/serial.h>
 
-void sn_putc(struct serial_port *, char);
+/*
+ * sn_putc - Send a character to the console, polled or interrupt mode
+ */
+static void sn_putc(struct serial_port *port, char c)
+{
+	ia64_sn_console_putc(c);
+}
 
 static struct uart_driver sn_sal_console = {
 	.putc = sn_putc,
@@ -75,11 +81,3 @@
 
 	return 0;
 }
-
-/*
- * sn_putc - Send a character to the console, polled or interrupt mode
- */
-void sn_putc(struct serial_port *port, char c)
-{
-	return ia64_sn_console_putc(c);
-}
xen/arch/ia64/xen/vcpu.c +31 -22

163 lines not on this page · raw message

xen/arch/ia64/xen/vhpt.c +6 -6
diff -r a220579c2aa8 xen/arch/ia64/xen/vhpt.c
@@ -21,7 +21,7 @@
 void vhpt_flush(void)
 {
 	struct vhpt_lf_entry *v = (void *)VHPT_ADDR;
-	int i, cnt = 0;
+	int i;
 #if 0
 static int firsttime = 2;
 
@@ -48,7 +48,6 @@
 #ifdef VHPT_GLOBAL
 void vhpt_flush_address(unsigned long vadr, unsigned long addr_range)
 {
-	unsigned long ps;
 	struct vhpt_lf_entry *vlfe;
 
 	if ((vadr >> 61) == 7) {
@@ -131,7 +130,8 @@
 	// allocate a huge chunk of physical memory.... how???
 	vhpt_total_size = 1 << VHPT_SIZE_LOG2;	// 4MB, 16MB, 64MB, or 256MB
 	vhpt_alignment = 1 << VHPT_SIZE_LOG2;	// 4MB, 16MB, 64MB, or 256MB
-	printf("vhpt_init: vhpt size=%p, align=%p\n",vhpt_total_size,vhpt_alignment);
+	printf("vhpt_init: vhpt size=0x%lx, align=0x%lx\n",
+		vhpt_total_size, vhpt_alignment);
 	/* This allocation only holds true if vhpt table is unique for
 	 * all domains. Or else later new vhpt table should be allocated
 	 * from domain heap when each domain is created. Assume xen buddy
@@ -146,8 +146,8 @@
 	paddr = page_to_maddr(page);
 	__get_cpu_var(vhpt_paddr) = paddr;
 	__get_cpu_var(vhpt_pend) = paddr + vhpt_total_size - 1;
-	printf("vhpt_init: vhpt paddr=%p, end=%p\n",
-	       paddr, __get_cpu_var(vhpt_pend));
+	printf("vhpt_init: vhpt paddr=0x%lx, end=0x%lx\n",
+		paddr, __get_cpu_var(vhpt_pend));
 	pte = pte_val(pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL));
 	vhpt_map(pte);
 	ia64_set_pta(VHPT_ADDR | (1 << 8) | (VHPT_SIZE_LOG2 << 2) |
@@ -173,6 +173,6 @@
 		if (v->CChain) vhpt_chains++;
 	}
 	s += sprintf(s,"VHPT usage: %ld/%ld (%ld collision chains)\n",
-		vhpt_valid,VHPT_NUM_ENTRIES,vhpt_chains);
+		vhpt_valid, (unsigned long) VHPT_NUM_ENTRIES, vhpt_chains);
 	return s - buf;
 }
xen/arch/ia64/xen/xenirq.c +5 -5
diff -r a220579c2aa8 xen/arch/ia64/xen/xenirq.c
@@ -24,7 +24,7 @@
 		firstirq = 0;
 	}
 	if (firsttime[vector]) {
-		printf("**** (entry) First received int on vector=%d,itc=%lx\n",
+		printf("**** (entry) First received int on vector=%lu,itc=%lx\n",
 			(unsigned long) vector, ia64_get_itc());
 		firsttime[vector] = 0;
 	}
@@ -38,13 +38,13 @@
 		extern void vcpu_pend_interrupt(void *, int);
 #if 0
 		if (firsttime[vector]) {
-			printf("**** (iterate) First received int on vector=%d,itc=%lx\n",
-			(unsigned long) vector, ia64_get_itc());
+			printf("**** (iterate) First received int on vector=%lu,itc=%lx\n",
+				(unsigned long) vector, ia64_get_itc());
 			firsttime[vector] = 0;
 		}
 		if (firstpend[vector]) {
-			printf("**** First pended int on vector=%d,itc=%lx\n",
-				(unsigned long) vector,ia64_get_itc());
+			printf("**** First pended int on vector=%lu,itc=%lx\n",
+				(unsigned long) vector, ia64_get_itc());
 			firstpend[vector] = 0;
 		}
 #endif
xen/arch/ia64/xen/xenmem.c +1 -2
diff -r a220579c2aa8 xen/arch/ia64/xen/xenmem.c
@@ -34,7 +34,6 @@
 void
 paging_init (void)
 {
-	struct page_info *pg;
 	unsigned int mpt_order;
 	/* Create machine to physical mapping table
 	 * NOTE: similar to frame table, later we may need virtually
@@ -61,7 +60,7 @@
 #define FT_ALIGN_SIZE	(16UL << 20)
 void __init init_frametable(void)
 {
-	unsigned long i, pfn;
+	unsigned long pfn;
 	frame_table_size = max_page * sizeof(struct page_info);
 	frame_table_size = (frame_table_size + PAGE_SIZE - 1) & PAGE_MASK;
 
xen/arch/ia64/xen/xenmisc.c +14 -6
diff -r a220579c2aa8 xen/arch/ia64/xen/xenmisc.c
@@ -19,12 +19,18 @@
 #include <public/sched.h>
 #include <asm/vhpt.h>
 #include <asm/debugger.h>
+#include <asm/vmx.h>
+#include <asm/vmx_vcpu.h>
 
 efi_memory_desc_t ia64_efi_io_md;
 EXPORT_SYMBOL(ia64_efi_io_md);
 unsigned long wait_init_idle;
 int phys_proc_id[NR_CPUS];
 unsigned long loops_per_jiffy = (1<<12);	// from linux/init/main.c
+
+/* FIXME: where these declarations should be there ? */
+extern void load_region_regs(struct vcpu *);
+extern void show_registers(struct pt_regs *regs);
 
 void ia64_mca_init(void) { printf("ia64_mca_init() skipped (Machine check abort handling)\n"); }
 void ia64_mca_cpu_init(void *x) { }
@@ -251,6 +257,7 @@
 	   unsigned long user_rbs_end, unsigned long addr, long *val)
 {
 	printk("ia64_peek: called, not implemented\n");
+	return 1;
 }
 
 long
@@ -258,6 +265,7 @@
 	   unsigned long user_rbs_end, unsigned long addr, long val)
 {
 	printk("ia64_poke: called, not implemented\n");
+	return 1;
 }
 
 void
@@ -314,7 +322,7 @@
 static int i = 100;
 int id = ((struct vcpu *)current)->domain->domain_id & 0xf;
 if (!cnt[id]--) { printk("%x",id); cnt[id] = 500000; }
-if (!i--) { printk("+",id); i = 1000000; }
+if (!i--) { printk("+"); i = 1000000; }
 }
 
     if (VMX_DOMAIN(current)){
@@ -358,12 +366,12 @@
 	va_list args;
 	char buf[128];
 	struct vcpu *v = current;
-	static volatile int test = 1;	// so can continue easily in debug
-	extern spinlock_t console_lock;
-	unsigned long flags;
+//	static volatile int test = 1;	// so can continue easily in debug
+//	extern spinlock_t console_lock;
+//	unsigned long flags;
     
 loop:
-	printf("$$$$$ PANIC in domain %d (k6=%p): ",
+	printf("$$$$$ PANIC in domain %d (k6=0x%lx): ",
 		v->domain->domain_id, 
 		__get_cpu_var(cpu_kr)._kr[IA64_KR_CURRENT]);
 	va_start(args, fmt);
@@ -378,7 +386,7 @@
 	}
 	domain_pause_by_systemcontroller(current->domain);
 	v->domain->shutdown_code = SHUTDOWN_crash;
-	set_bit(_DOMF_shutdown, v->domain->domain_flags);
+	set_bit(_DOMF_shutdown, &v->domain->domain_flags);
 	if (v->domain->domain_id == 0) {
 		int i = 1000000000L;
 		// if domain0 crashes, just periodically print out panic
xen/arch/ia64/xen/xensetup.c +21 -9
diff -r a220579c2aa8 xen/arch/ia64/xen/xensetup.c
@@ -14,7 +14,7 @@
 #include <public/version.h>
 //#include <xen/delay.h>
 #include <xen/compile.h>
-//#include <xen/console.h>
+#include <xen/console.h>
 #include <xen/serial.h>
 #include <xen/trace.h>
 #include <asm/meminit.h>
@@ -22,6 +22,7 @@
 #include <asm/setup.h>
 #include <xen/string.h>
 #include <asm/vmx.h>
+#include <linux/efi.h>
 
 unsigned long xenheap_phys_end;
 
@@ -35,6 +36,16 @@
 
 int find_max_pfn (unsigned long, unsigned long, void *);
 void start_of_day(void);
+
+/* FIXME: which header these declarations should be there ? */
+extern long is_platform_hp_ski(void);
+extern void early_setup_arch(char **);
+extern void late_setup_arch(char **);
+extern void hpsim_serial_init(void);
+extern void alloc_dom0(void);
+extern void setup_per_cpu_areas(void);
+extern void mem_init(void);
+extern void init_IRQ(void);
 
 /* opt_nosmp: If true, secondary processors are ignored. */
 static int opt_nosmp = 0;
@@ -149,8 +160,7 @@
 {
     unsigned char *cmdline;
     void *heap_start;
-    int i;
-    unsigned long max_mem, nr_pages, firsthole_start;
+    unsigned long nr_pages, firsthole_start;
     unsigned long dom0_memory_start, dom0_memory_size;
     unsigned long dom0_initrd_start, dom0_initrd_size;
     unsigned long initial_images_start, initial_images_end;
@@ -160,7 +170,7 @@
     /* Kernel may be relocated by EFI loader */
     xen_pstart = ia64_tpa(KERNEL_START);
 
-    early_setup_arch(&cmdline);
+    early_setup_arch((char **) &cmdline);
 
     /* We initialise the serial devices very early so we can get debugging. */
     if (running_on_sim) hpsim_serial_init();
@@ -248,9 +258,9 @@
 	max_page);
 
     heap_start = memguard_init(ia64_imva(&_end));
-    printf("Before heap_start: 0x%lx\n", heap_start);
+    printf("Before heap_start: %p\n", heap_start);
     heap_start = __va(init_boot_allocator(__pa(heap_start)));
-    printf("After heap_start: 0x%lx\n", heap_start);
+    printf("After heap_start: %p\n", heap_start);
 
     reserve_memory();
 
@@ -281,7 +291,7 @@
     idle_domain = domain_create(IDLE_DOMAIN_ID, 0);
     BUG_ON(idle_domain == NULL);
 
-    late_setup_arch(&cmdline);
+    late_setup_arch((char **) &cmdline);
     setup_per_cpu_areas();
     mem_init();
 
@@ -298,6 +308,8 @@
 #endif
 
 #ifdef CONFIG_SMP
+    int i;
+
     if ( opt_nosmp )
     {
         max_cpus = 0;
@@ -349,9 +361,9 @@
      * above our heap. The second module, if present, is an initrd ramdisk.
      */
     printk("About to call construct_dom0()\n");
-    dom0_memory_start = __va(initial_images_start);
+    dom0_memory_start = (unsigned long) __va(initial_images_start);
     dom0_memory_size = ia64_boot_param->domain_size;
-    dom0_initrd_start = __va(initial_images_start +
+    dom0_initrd_start = (unsigned long) __va(initial_images_start +
 			     PAGE_ALIGN(ia64_boot_param->domain_size));
     dom0_initrd_size = ia64_boot_param->initrd_size;
  
xen/arch/ia64/xen/xentime.c +6 -5
diff -r a220579c2aa8 xen/arch/ia64/xen/xentime.c
@@ -30,6 +30,9 @@
 #include <linux/jiffies.h>	// not included by xen/sched.h
 #include <xen/softirq.h>
 
+/* FIXME: where these declarations should be there ? */
+extern void ia64_init_itm(void);
+
 seqlock_t xtime_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED;
 
 #define TIME_KEEPER_ID  0
@@ -70,7 +73,7 @@
 s_time_t get_s_time(void)
 {
     s_time_t now;
-    unsigned long flags, seq;
+    unsigned long seq;
 
     do {
 	seq = read_seqbegin(&xtime_lock);
@@ -202,7 +205,7 @@
 }
 
 static struct irqaction xen_timer_irqaction = {
-	.handler =	xen_timer_interrupt,
+	.handler =	(void *) xen_timer_interrupt,
 	.name =		"timer"
 };
 
@@ -217,8 +220,6 @@
 /* Late init function (after all CPUs are booted). */
 int __init init_xen_time()
 {
-    struct timespec tm;
-
     ia64_time_init();
     itc_scale  = 1000000000UL << 32 ;
     itc_scale /= local_cpu_data->itc_freq;
@@ -253,7 +254,7 @@
 	} while (unlikely(read_seqretry(&xtime_lock, seq)));
 
 	local_cpu_data->itm_next = itm_next;
-	vcpu_set_next_timer(current);
+	vcpu_set_next_timer(v);
 	return 1;
 }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw
Quoted 6 lines · Masaki Kanno

Hi,

We changed from "#if 0" to "#ifndef XEN" in "cleanup.linux-xen.patch", and updated "cleanup.xen.patch" to changeset:9000.
We don't resend "cleanup.include.xen.patch", because it was committed to xen-unstable tree.

Applied.

Signature · 1 line
Alex Williamson                             HP Linux & Open Source Lab