ia64/xen-unstable

changeset 2936:0c03aa71a5c3

bitkeeper revision 1.1159.1.404 (41923b0epYovqxxi6oRwepHm8dm7JQ)

Add irq_enter/irq_exit to local timer interrupt.
author cl349@freefall.cl.cam.ac.uk
date Wed Nov 10 16:00:14 2004 +0000 (2004-11-10)
parents 7c54a5360056
children b35c932069a7
files linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c
line diff
     1.1 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c	Wed Nov 10 15:46:56 2004 +0000
     1.2 +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c	Wed Nov 10 16:00:14 2004 +0000
     1.3 @@ -402,12 +402,11 @@ static inline void do_timer_interrupt(in
     1.4  		processed_system_time += NS_PER_TICK;
     1.5  		do_timer(regs);
     1.6  #ifdef CONFIG_SMP
     1.7 -		if (regs)	/* XXXsmp this needs to be done on every cpu
     1.8 -				 * - every tick - maybe  */
     1.9 -		    update_process_times(user_mode(regs));
    1.10 +		if (regs)
    1.11 +			update_process_times(user_mode(regs));
    1.12  #endif
    1.13  		if (regs)
    1.14 -		    profile_tick(CPU_PROFILING, regs);
    1.15 +			profile_tick(CPU_PROFILING, regs);
    1.16  	}
    1.17  
    1.18  	/*
    1.19 @@ -712,9 +711,16 @@ static irqreturn_t local_timer_interrupt
    1.20  	if ((xxx++ % 100) == 0)
    1.21  		xxprint("local_timer_interrupt\n");
    1.22  
    1.23 +	/*
    1.24 +	 * update_process_times() expects us to have done irq_enter().
    1.25 +	 * Besides, if we don't timer interrupts ignore the global
    1.26 +	 * interrupt lock, which is the WrongThing (tm) to do.
    1.27 +	 */
    1.28 +	irq_enter();
    1.29  	/* XXX add processed_system_time loop thingy */
    1.30  	if (regs)
    1.31  		update_process_times(user_mode(regs));
    1.32 +	irq_exit();
    1.33  
    1.34  	return IRQ_HANDLED;
    1.35  }