ia64/xen-unstable

changeset 4840:4bc6f1b1425e

bitkeeper revision 1.1389.9.6 (428135ccBlRW99tjfmtjk5XjVtLT3A)

Minor adaptations for common ACPI update and other common changes
author djm@kirby.fc.hp.com
date Tue May 10 22:29:32 2005 +0000 (2005-05-10)
parents a22acf8b8127
children f71cef640151 5f2fad7dda00
files xen/arch/ia64/domain.c xen/arch/ia64/irq.c xen/arch/ia64/mm_init.c xen/arch/ia64/patch/linux-2.6.11/unaligned.c xen/arch/ia64/process.c xen/arch/ia64/xenmisc.c xen/include/asm-ia64/config.h xen/include/asm-ia64/domain.h
line diff
     1.1 --- a/xen/arch/ia64/domain.c	Tue May 10 15:07:49 2005 +0000
     1.2 +++ b/xen/arch/ia64/domain.c	Tue May 10 22:29:32 2005 +0000
     1.3 @@ -191,7 +191,7 @@ void arch_do_createdomain(struct exec_do
     1.4  	// stay on kernel stack because may get interrupts!
     1.5  	// ia64_ret_from_clone (which b0 gets in new_thread) switches
     1.6  	// to user stack
     1.7 -	ed->thread.on_ustack = 0;
     1.8 +	ed->arch._thread.on_ustack = 0;
     1.9  }
    1.10  
    1.11  void arch_do_boot_vcpu(struct exec_domain *p)
    1.12 @@ -261,7 +261,7 @@ void new_thread(struct exec_domain *ed,
    1.13  printf("new_thread: ed=%p, start_pc=%p, regs=%p, sw=%p, new_rbs=%p, IA64_STK_OFFSET=%p, &r8=%p\n",
    1.14  ed,start_pc,regs,sw,new_rbs,IA64_STK_OFFSET,&regs->r8);
    1.15  	sw->b0 = (unsigned long) &ia64_ret_from_clone;
    1.16 -	ed->thread.ksp = (unsigned long) sw - 16;
    1.17 +	ed->arch._thread.ksp = (unsigned long) sw - 16;
    1.18  	//ed->thread_info->flags = 0;
    1.19  printk("new_thread, about to call init_all_rr\n");
    1.20  	init_all_rr(ed);
     2.1 --- a/xen/arch/ia64/irq.c	Tue May 10 15:07:49 2005 +0000
     2.2 +++ b/xen/arch/ia64/irq.c	Tue May 10 22:29:32 2005 +0000
     2.3 @@ -1406,9 +1406,11 @@ int pirq_guest_bind(struct exec_domain *
     2.4          desc->handler->startup(irq);
     2.5  
     2.6          /* Attempt to bind the interrupt target to the correct CPU. */
     2.7 +#if 0 /* FIXME CONFIG_SMP ??? */
     2.8          if ( desc->handler->set_affinity != NULL )
     2.9              desc->handler->set_affinity(
    2.10                  irq, apicid_to_phys_cpu_present(d->processor));
    2.11 +#endif
    2.12      }
    2.13      else if ( !will_share || !action->shareable )
    2.14      {
     3.1 --- a/xen/arch/ia64/mm_init.c	Tue May 10 15:07:49 2005 +0000
     3.2 +++ b/xen/arch/ia64/mm_init.c	Tue May 10 22:29:32 2005 +0000
     3.3 @@ -227,7 +227,7 @@ ia64_set_rbs_bot (void)
     3.4  
     3.5  	if (stack_size > MAX_USER_STACK_SIZE)
     3.6  		stack_size = MAX_USER_STACK_SIZE;
     3.7 -	current->thread.rbs_bot = STACK_TOP - stack_size;
     3.8 +	current->arch._thread.rbs_bot = STACK_TOP - stack_size;
     3.9  }
    3.10  
    3.11  /*
    3.12 @@ -255,7 +255,7 @@ printf("ia64_init_addr_space: called, no
    3.13  	if (vma) {
    3.14  		memset(vma, 0, sizeof(*vma));
    3.15  		vma->vm_mm = current->mm;
    3.16 -		vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
    3.17 +		vma->vm_start = current->arch._thread.rbs_bot & PAGE_MASK;
    3.18  		vma->vm_end = vma->vm_start + PAGE_SIZE;
    3.19  		vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7];
    3.20  		vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE|VM_GROWSUP;
     4.1 --- a/xen/arch/ia64/patch/linux-2.6.11/unaligned.c	Tue May 10 15:07:49 2005 +0000
     4.2 +++ b/xen/arch/ia64/patch/linux-2.6.11/unaligned.c	Tue May 10 22:29:32 2005 +0000
     4.3 @@ -1,5 +1,5 @@
     4.4  --- ../../linux-2.6.11/arch/ia64/kernel/unaligned.c	2005-03-02 00:38:25.000000000 -0700
     4.5 -+++ arch/ia64/unaligned.c	2005-04-28 15:40:13.000000000 -0600
     4.6 ++++ arch/ia64/unaligned.c	2005-05-10 15:46:09.000000000 -0600
     4.7  @@ -437,7 +437,11 @@
     4.8   }
     4.9   
    4.10 @@ -12,7 +12,31 @@
    4.11   setreg (unsigned long regnum, unsigned long val, int nat, struct pt_regs *regs)
    4.12   {
    4.13   	struct switch_stack *sw = (struct switch_stack *) regs - 1;
    4.14 -@@ -611,7 +615,11 @@
    4.15 +@@ -522,7 +526,11 @@
    4.16 + 	 */
    4.17 + 	if (regnum >= IA64_FIRST_ROTATING_FR) {
    4.18 + 		ia64_sync_fph(current);
    4.19 ++#ifdef XEN
    4.20 ++		current->arch._thread.fph[fph_index(regs, regnum)] = *fpval;
    4.21 ++#else
    4.22 + 		current->thread.fph[fph_index(regs, regnum)] = *fpval;
    4.23 ++#endif
    4.24 + 	} else {
    4.25 + 		/*
    4.26 + 		 * pt_regs or switch_stack ?
    4.27 +@@ -581,7 +589,11 @@
    4.28 + 	 */
    4.29 + 	if (regnum >= IA64_FIRST_ROTATING_FR) {
    4.30 + 		ia64_flush_fph(current);
    4.31 ++#ifdef XEN
    4.32 ++		*fpval = current->arch._thread.fph[fph_index(regs, regnum)];
    4.33 ++#else
    4.34 + 		*fpval = current->thread.fph[fph_index(regs, regnum)];
    4.35 ++#endif
    4.36 + 	} else {
    4.37 + 		/*
    4.38 + 		 * f0 = 0.0, f1= 1.0. Those registers are constant and are thus
    4.39 +@@ -611,7 +623,11 @@
    4.40   }
    4.41   
    4.42   
    4.43 @@ -24,7 +48,7 @@
    4.44   getreg (unsigned long regnum, unsigned long *val, int *nat, struct pt_regs *regs)
    4.45   {
    4.46   	struct switch_stack *sw = (struct switch_stack *) regs - 1;
    4.47 -@@ -1294,6 +1302,9 @@
    4.48 +@@ -1294,6 +1310,9 @@
    4.49   void
    4.50   ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
    4.51   {
    4.52 @@ -34,7 +58,7 @@
    4.53   	struct ia64_psr *ipsr = ia64_psr(regs);
    4.54   	mm_segment_t old_fs = get_fs();
    4.55   	unsigned long bundle[2];
    4.56 -@@ -1502,4 +1513,5 @@
    4.57 +@@ -1502,4 +1521,5 @@
    4.58   	si.si_imm = 0;
    4.59   	force_sig_info(SIGBUS, &si, current);
    4.60   	goto done;
     5.1 --- a/xen/arch/ia64/process.c	Tue May 10 15:07:49 2005 +0000
     5.2 +++ b/xen/arch/ia64/process.c	Tue May 10 22:29:32 2005 +0000
     5.3 @@ -517,7 +517,7 @@ printf("ia64_fault, vector=0x%p, ifa=%p,
     5.4  	      case 32: /* fp fault */
     5.5  	      case 33: /* fp trap */
     5.6  		//result = handle_fpu_swa((vector == 32) ? 1 : 0, regs, isr);
     5.7 -		if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) {
     5.8 +		//if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) {
     5.9  			//siginfo.si_signo = SIGFPE;
    5.10  			//siginfo.si_errno = 0;
    5.11  			//siginfo.si_code = FPE_FLTINV;
    5.12 @@ -526,7 +526,7 @@ printf("ia64_fault, vector=0x%p, ifa=%p,
    5.13  			//siginfo.si_isr = isr;
    5.14  			//siginfo.si_imm = 0;
    5.15  			//force_sig_info(SIGFPE, &siginfo, current);
    5.16 -		}
    5.17 +		//}
    5.18  		//return;
    5.19  		sprintf(buf, "FP fault/trap");
    5.20  		break;
     6.1 --- a/xen/arch/ia64/xenmisc.c	Tue May 10 15:07:49 2005 +0000
     6.2 +++ b/xen/arch/ia64/xenmisc.c	Tue May 10 22:29:32 2005 +0000
     6.3 @@ -79,6 +79,14 @@ void raise_actimer_softirq(void)
     6.4  	raise_softirq(AC_TIMER_SOFTIRQ);
     6.5  }
     6.6  
     6.7 +unsigned long __hypercall_create_continuation(
     6.8 +	unsigned int op, unsigned int nr_args, ...)
     6.9 +{
    6.10 +	printf("__hypercall_create_continuation: not implemented!!!\n");
    6.11 +}
    6.12 +
    6.13 +///////////////////////////////
    6.14 +
    6.15  ///////////////////////////////
    6.16  // from arch/x86/apic.c
    6.17  ///////////////////////////////
     7.1 --- a/xen/include/asm-ia64/config.h	Tue May 10 15:07:49 2005 +0000
     7.2 +++ b/xen/include/asm-ia64/config.h	Tue May 10 22:29:32 2005 +0000
     7.3 @@ -258,6 +258,14 @@ struct screen_info { };
     7.4  #define seq_printf(a,b...) printf(b)
     7.5  #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
     7.6  
     7.7 +//
     7.8 +#define __smp_processor_id() (current->processor)
     7.9 +
    7.10 +// needed for newer ACPI code
    7.11 +#define asmlinkage
    7.12 +
    7.13 +#define FORCE_CRASH()	asm("break 0;;");
    7.14 +
    7.15  // these declarations got moved at some point, find a better place for them
    7.16  extern int opt_noht;
    7.17  extern int ht_per_core;
     8.1 --- a/xen/include/asm-ia64/domain.h	Tue May 10 15:07:49 2005 +0000
     8.2 +++ b/xen/include/asm-ia64/domain.h	Tue May 10 22:29:32 2005 +0000
     8.3 @@ -60,7 +60,7 @@ struct arch_exec_domain {
     8.4  };
     8.5  
     8.6  #define active_mm arch.active_mm
     8.7 -#define thread arch._thread
     8.8 +//#define thread arch._thread
     8.9  
    8.10  // FOLLOWING FROM linux-2.6.7/include/sched.h
    8.11