# HG changeset patch # User tristan.gingold@xxxxxxxx # Node ID e2aa944787e08d30aa608e1aa40cec598e39cd1b # Parent ac1ee42ff99c04a3a7d37783b54263f6f84abf1b Misc clean-up and warnings removal. Signed-off-by: Tristan Gingold diff -r ac1ee42ff99c -r e2aa944787e0 xen/arch/ia64/xen/irq.c --- a/xen/arch/ia64/xen/irq.c Tue Feb 28 05:29:40 2006 +++ b/xen/arch/ia64/xen/irq.c Tue Feb 28 06:07:11 2006 @@ -129,7 +129,9 @@ } #endif +#ifndef XEN static void register_irq_proc (unsigned int irq); +#endif /* * Special irq handlers. @@ -286,7 +288,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 @@ -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,9 @@ * disabled. */ +#ifndef XEN static DECLARE_MUTEX(probe_sem); +#endif /** * probe_irq_on - begin an interrupt autodetect @@ -1483,6 +1491,7 @@ irqreturn_t guest_forward_keyboard_input(int irq, void *nada, struct pt_regs *regs) { domain_pend_keyboard_interrupt(irq); + return 0; } void serial_input_init(void) diff -r ac1ee42ff99c -r e2aa944787e0 xen/arch/ia64/xen/privop.c --- a/xen/arch/ia64/xen/privop.c Tue Feb 28 05:29:40 2006 +++ b/xen/arch/ia64/xen/privop.c Tue Feb 28 06:07:11 2006 @@ -524,7 +524,7 @@ Privileged operation decode and dispatch routines **************************************************************************/ -IA64_SLOT_TYPE slot_types[0x20][3] = { +static const IA64_SLOT_TYPE slot_types[0x20][3] = { {M, I, I}, {M, I, I}, {M, I, I}, {M, I, I}, {M, I, ILLEGAL}, {M, I, ILLEGAL}, {ILLEGAL, ILLEGAL, ILLEGAL}, {ILLEGAL, ILLEGAL, ILLEGAL}, @@ -544,7 +544,7 @@ // pointer to privileged emulation function typedef IA64FAULT (*PPEFCN)(VCPU *vcpu, INST64 inst); -PPEFCN Mpriv_funcs[64] = { +static const PPEFCN Mpriv_funcs[64] = { priv_mov_to_rr, priv_mov_to_dbr, priv_mov_to_ibr, priv_mov_to_pkr, priv_mov_to_pmc, priv_mov_to_pmd, 0, 0, 0, priv_ptc_l, priv_ptc_g, priv_ptc_ga, @@ -794,7 +794,7 @@ #define HYPERPRIVOP_SET_KR 0x12 #define HYPERPRIVOP_MAX 0x12 -char *hyperpriv_str[HYPERPRIVOP_MAX+1] = { +static const char * const hyperpriv_str[HYPERPRIVOP_MAX+1] = { 0, "rfi", "rsm.dt", "ssm.dt", "cover", "itc.d", "itc.i", "ssm.i", "=ivr", "=tpr", "tpr=", "eoi", "itm=", "thash", "ptc.ga", "itr.d", "=rr", "rr=", "kr=", @@ -895,7 +895,7 @@ Privileged operation instrumentation routines **************************************************************************/ -char *Mpriv_str[64] = { +static const char * const Mpriv_str[64] = { "mov_to_rr", "mov_to_dbr", "mov_to_ibr", "mov_to_pkr", "mov_to_pmc", "mov_to_pmd", "<0x06>", "<0x07>", "<0x08>", "ptc_l", "ptc_g", "ptc_ga", @@ -915,7 +915,7 @@ }; #define RS "Rsvd" -char *cr_str[128] = { +static const char * const cr_str[128] = { "dcr","itm","iva",RS,RS,RS,RS,RS, "pta",RS,RS,RS,RS,RS,RS,RS, "ipsr","isr",RS,"iip","ifa","itir","iipa","ifs", diff -r ac1ee42ff99c -r e2aa944787e0 xen/arch/ia64/xen/process.c --- a/xen/arch/ia64/xen/process.c Tue Feb 28 05:29:40 2006 +++ b/xen/arch/ia64/xen/process.c Tue Feb 28 06:07:11 2006 @@ -150,7 +150,7 @@ s += sprintf(s,"Slow reflections by vector:\n"); for (i = 0, j = 0; i < 0x80; i++) { - if (cnt = slow_reflect_count[i]) { + if ((cnt = slow_reflect_count[i])) { s += sprintf(s,"0x%02x00:%10d, ",i,cnt); if ((j++ & 3) == 3) s += sprintf(s,"\n"); } @@ -158,7 +158,7 @@ if (j & 3) s += sprintf(s,"\n"); s += sprintf(s,"Fast reflections by vector:\n"); for (i = 0, j = 0; i < 0x80; i++) { - if (cnt = fast_reflect_count[i]) { + if ((cnt = fast_reflect_count[i])) { s += sprintf(s,"0x%02x00:%10d, ",i,cnt); if ((j++ & 3) == 3) s += sprintf(s,"\n"); } @@ -219,14 +219,12 @@ void reflect_extint(struct pt_regs *regs) { - extern unsigned long vcpu_verbose, privop_trace; unsigned long isr = regs->cr_ipsr & IA64_PSR_RI; struct vcpu *v = current; static first_extint = 1; if (first_extint) { printf("Delivering first extint to domain: isr=%p, iip=%p\n",isr,regs->cr_iip); - //privop_trace = 1; vcpu_verbose = 1; first_extint = 0; } if (vcpu_timer_pending_early(v)) @@ -329,10 +327,9 @@ unsigned long arg6, unsigned long arg7, unsigned long stack) { struct pt_regs *regs = (struct pt_regs *) &stack; - unsigned long code, error = isr; + unsigned long code; char buf[128]; - int result, sig; - static const char *reason[] = { + static const char * const reason[] = { "IA-64 Illegal Operation fault", "IA-64 Privileged Operation fault", "IA-64 Privileged Register fault", @@ -543,7 +540,6 @@ /**/ static int last_fd, last_count; // FIXME FIXME FIXME /**/ // BROKEN FOR MULTIPLE DOMAINS & SMP /**/ struct ssc_disk_stat { int fd; unsigned count;} *stat, last_stat; - extern unsigned long vcpu_verbose, privop_trace; arg0 = vcpu_get_gr(current,32); switch(ssc) { @@ -588,7 +584,7 @@ arg3 = vcpu_get_gr(current,35); if (arg2) { // metaphysical address of descriptor struct ssc_disk_req *req; - unsigned long mpaddr, paddr; + unsigned long mpaddr; long len; arg2 = translate_domain_mpaddr(arg2); @@ -696,8 +692,6 @@ ia64_handle_privop (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long itir) { IA64FAULT vector; - struct domain *d = current->domain; - struct vcpu *v = current; vector = priv_emulate(current,regs,isr); if (vector != IA64_NO_FAULT && vector != IA64_RFI_IN_PROGRESS) { // Note: if a path results in a vector to reflect that requires @@ -712,8 +706,7 @@ void ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long iim, unsigned long vector) { - struct domain *d = (struct domain *) current->domain; - struct vcpu *v = (struct domain *) current; + struct vcpu *v = current; unsigned long check_lazy_cover = 0; unsigned long psr = regs->cr_ipsr; @@ -753,7 +746,8 @@ } #endif printf("*** NaT fault... attempting to handle as privop\n"); -printf("isr=%p, ifa=%p,iip=%p,ipsr=%p\n",isr,ifa,regs->cr_iip,psr); +printf("isr=%016lx, ifa=%016lx,iip=%016lx,ipsr=%016lx\n", + isr,ifa,regs->cr_iip,psr); //regs->eml_unat = 0; FIXME: DO WE NEED THIS??? // certain NaT faults are higher priority than privop faults vector = priv_emulate(v,regs,isr); @@ -801,7 +795,6 @@ { struct mc_state *mcs = &mc_state[smp_processor_id()]; VCPU *vcpu = current; - struct cpu_user_regs *regs = vcpu_regs(vcpu); unsigned int i; va_list args; diff -r ac1ee42ff99c -r e2aa944787e0 xen/include/asm-ia64/debugger.h --- a/xen/include/asm-ia64/debugger.h Tue Feb 28 05:29:40 2006 +++ b/xen/include/asm-ia64/debugger.h Tue Feb 28 06:07:11 2006 @@ -39,6 +39,8 @@ #ifndef __ASSEMBLY__ #include + +void show_registers(struct cpu_user_regs *regs); // NOTE: on xen struct pt_regs = struct cpu_user_regs // see include/asm-ia64/linux-xen/asm/ptrace.h diff -r ac1ee42ff99c -r e2aa944787e0 xen/include/asm-ia64/linux-xen/asm/tlbflush.h --- a/xen/include/asm-ia64/linux-xen/asm/tlbflush.h Tue Feb 28 05:29:40 2006 +++ b/xen/include/asm-ia64/linux-xen/asm/tlbflush.h Tue Feb 28 06:07:11 2006 @@ -103,6 +103,10 @@ */ } + #define flush_tlb_kernel_range(start, end) flush_tlb_all() /* XXX fix me */ +#ifdef XEN +extern void flush_tlb_mask(cpumask_t mask); +#endif #endif /* _ASM_IA64_TLBFLUSH_H */ diff -r ac1ee42ff99c -r e2aa944787e0 xen/include/asm-ia64/privop.h --- a/xen/include/asm-ia64/privop.h Tue Feb 28 05:29:40 2006 +++ b/xen/include/asm-ia64/privop.h Tue Feb 28 06:07:11 2006 @@ -209,4 +209,6 @@ extern void privify_memory(void *start, UINT64 len); +extern int ia64_hyperprivop(unsigned long iim, REGS *regs); + #endif diff -r ac1ee42ff99c -r e2aa944787e0 xen/include/asm-ia64/xensystem.h --- a/xen/include/asm-ia64/xensystem.h Tue Feb 28 05:29:40 2006 +++ b/xen/include/asm-ia64/xensystem.h Tue Feb 28 06:07:11 2006 @@ -78,7 +78,6 @@ #define __cmpxchg_user(ptr, new, old, _size) \ ({ \ register long __gu_r8 asm ("r8"); \ - register long __gu_r9 asm ("r9"); \ asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ asm volatile ("mov %1=r0;;\n" \ "[1:]\tcmpxchg"_size".acq %0=[%2],%3,ar.ccv\n" \