ia64/xen-unstable

changeset 4056:557e8cf002c3

bitkeeper revision 1.1236.1.69 (422f5e294MTF_0hJCiWKTPnZodtGGg)

Accomodate recent common change in __enter_scheduler
author djm@kirby.fc.hp.com
date Wed Mar 09 20:35:53 2005 +0000 (2005-03-09)
parents a13b9052d91d
children 586e5a7db87a c77189c38646
files xen/arch/ia64/patch/linux-2.6.7/time.c xen/arch/ia64/xenmisc.c
line diff
     1.1 --- a/xen/arch/ia64/patch/linux-2.6.7/time.c	Wed Mar 09 20:19:23 2005 +0000
     1.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/time.c	Wed Mar 09 20:35:53 2005 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4  --- ../../linux-2.6.7/arch/ia64/kernel/time.c	2004-06-15 23:19:01.000000000 -0600
     1.5 -+++ arch/ia64/time.c	2005-03-08 08:05:00.000000000 -0700
     1.6 ++++ arch/ia64/time.c	2005-03-09 13:22:52.000000000 -0700
     1.7  @@ -10,16 +10,22 @@
     1.8    */
     1.9   #include <linux/config.h>
    1.10 @@ -33,7 +33,7 @@
    1.11   
    1.12   extern unsigned long wall_jiffies;
    1.13   
    1.14 -@@ -45,6 +54,58 @@
    1.15 +@@ -45,6 +54,59 @@
    1.16   
    1.17   #endif
    1.18   
    1.19 @@ -70,10 +70,11 @@
    1.20  +    return now; 
    1.21  +}
    1.22  +
    1.23 -+void update_dom_time(struct exec_domain *ed)
    1.24 ++int update_dom_time(struct exec_domain *ed)
    1.25  +{
    1.26  +// FIXME: implement this?
    1.27  +//	printf("update_dom_time: called, not implemented, skipping\n");
    1.28 ++	return 0;
    1.29  +}
    1.30  +
    1.31  +/* Set clock to <secs,usecs> after 00:00:00 UTC, 1 January, 1970. */
    1.32 @@ -92,7 +93,7 @@
    1.33   static void
    1.34   itc_reset (void)
    1.35   {
    1.36 -@@ -80,12 +141,15 @@
    1.37 +@@ -80,12 +142,15 @@
    1.38   	return (elapsed_cycles*local_cpu_data->nsec_per_cyc) >> IA64_NSEC_PER_CYC_SHIFT;
    1.39   }
    1.40   
    1.41 @@ -108,7 +109,7 @@
    1.42   int
    1.43   do_settimeofday (struct timespec *tv)
    1.44   {
    1.45 -@@ -95,7 +159,9 @@
    1.46 +@@ -95,7 +160,9 @@
    1.47   	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
    1.48   		return -EINVAL;
    1.49   
    1.50 @@ -118,7 +119,7 @@
    1.51   	{
    1.52   		/*
    1.53   		 * This is revolting. We need to set "xtime" correctly. However, the value
    1.54 -@@ -117,12 +183,15 @@
    1.55 +@@ -117,12 +184,15 @@
    1.56   		time_esterror = NTP_PHASE_LIMIT;
    1.57   		time_interpolator_reset();
    1.58   	}
    1.59 @@ -134,7 +135,7 @@
    1.60   
    1.61   void
    1.62   do_gettimeofday (struct timeval *tv)
    1.63 -@@ -185,6 +254,7 @@
    1.64 +@@ -185,6 +255,7 @@
    1.65   }
    1.66   
    1.67   EXPORT_SYMBOL(do_gettimeofday);
    1.68 @@ -142,7 +143,7 @@
    1.69   
    1.70   /*
    1.71    * The profiling function is SMP safe. (nothing can mess
    1.72 -@@ -195,6 +265,9 @@
    1.73 +@@ -195,6 +266,9 @@
    1.74   static inline void
    1.75   ia64_do_profile (struct pt_regs * regs)
    1.76   {
    1.77 @@ -152,7 +153,7 @@
    1.78   	unsigned long ip, slot;
    1.79   	extern cpumask_t prof_cpu_mask;
    1.80   
    1.81 -@@ -231,24 +304,89 @@
    1.82 +@@ -231,24 +305,89 @@
    1.83   		ip = prof_len-1;
    1.84   	atomic_inc((atomic_t *)&prof_buffer[ip]);
    1.85   }
    1.86 @@ -242,7 +243,7 @@
    1.87   	ia64_do_profile(regs);
    1.88   
    1.89   	while (1) {
    1.90 -@@ -269,10 +407,16 @@
    1.91 +@@ -269,10 +408,16 @@
    1.92   			 * another CPU. We need to avoid to SMP race by acquiring the
    1.93   			 * xtime_lock.
    1.94   			 */
    1.95 @@ -259,7 +260,7 @@
    1.96   		} else
    1.97   			local_cpu_data->itm_next = new_itm;
    1.98   
    1.99 -@@ -292,7 +436,12 @@
   1.100 +@@ -292,7 +437,12 @@
   1.101   		 */
   1.102   		while (!time_after(new_itm, ia64_get_itc() + local_cpu_data->itm_delta/2))
   1.103   			new_itm += local_cpu_data->itm_delta;
   1.104 @@ -272,7 +273,7 @@
   1.105   		/* double check, in case we got hit by a (slow) PMI: */
   1.106   	} while (time_after_eq(ia64_get_itc(), new_itm));
   1.107   	return IRQ_HANDLED;
   1.108 -@@ -307,6 +456,7 @@
   1.109 +@@ -307,6 +457,7 @@
   1.110   	int cpu = smp_processor_id();
   1.111   	unsigned long shift = 0, delta;
   1.112   
   1.113 @@ -280,7 +281,7 @@
   1.114   	/* arrange for the cycle counter to generate a timer interrupt: */
   1.115   	ia64_set_itv(IA64_TIMER_VECTOR);
   1.116   
   1.117 -@@ -320,6 +470,7 @@
   1.118 +@@ -320,6 +471,7 @@
   1.119   		shift = (2*(cpu - hi) + 1) * delta/hi/2;
   1.120   	}
   1.121   	local_cpu_data->itm_next = ia64_get_itc() + delta + shift;
   1.122 @@ -288,7 +289,7 @@
   1.123   	ia64_set_itm(local_cpu_data->itm_next);
   1.124   }
   1.125   
   1.126 -@@ -335,6 +486,7 @@
   1.127 +@@ -335,6 +487,7 @@
   1.128   	 * frequency and then a PAL call to determine the frequency ratio between the ITC
   1.129   	 * and the base frequency.
   1.130   	 */
   1.131 @@ -296,7 +297,7 @@
   1.132   	status = ia64_sal_freq_base(SAL_FREQ_BASE_PLATFORM,
   1.133   				    &platform_base_freq, &platform_base_drift);
   1.134   	if (status != 0) {
   1.135 -@@ -384,9 +536,11 @@
   1.136 +@@ -384,9 +537,11 @@
   1.137   					+ itc_freq/2)/itc_freq;
   1.138   
   1.139   	if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) {
   1.140 @@ -308,7 +309,7 @@
   1.141   	}
   1.142   
   1.143   	/* Setup the CPU local timer tick */
   1.144 -@@ -395,7 +549,9 @@
   1.145 +@@ -395,7 +550,9 @@
   1.146   
   1.147   static struct irqaction timer_irqaction = {
   1.148   	.handler =	timer_interrupt,
   1.149 @@ -318,7 +319,7 @@
   1.150   	.name =		"timer"
   1.151   };
   1.152   
   1.153 -@@ -403,12 +559,16 @@
   1.154 +@@ -403,12 +560,16 @@
   1.155   time_init (void)
   1.156   {
   1.157   	register_percpu_irq(IA64_TIMER_VECTOR, &timer_irqaction);
     2.1 --- a/xen/arch/ia64/xenmisc.c	Wed Mar 09 20:19:23 2005 +0000
     2.2 +++ b/xen/arch/ia64/xenmisc.c	Wed Mar 09 20:35:53 2005 +0000
     2.3 @@ -239,3 +239,13 @@ void *module_text_address(unsigned long 
     2.4  {
     2.5  	return NULL;
     2.6  }
     2.7 +
     2.8 +// context_switch
     2.9 +void context_switch(struct exec_domain *prev, struct exec_domain *next)
    2.10 +{
    2.11 +	switch_to(prev,next);
    2.12 +	clear_bit(EDF_RUNNING, &prev->ed_flags);
    2.13 +	//if (!is_idle_task(next->domain) )
    2.14 +		//send_guest_virq(next, VIRQ_TIMER);
    2.15 +	schedule_tail(next);
    2.16 +}