mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
bitkeeper revision 1.1159.1.297 (41810679UWr-FbiF6ilbN9cZPhKKUw)
Remove timer selection code, don't use do_timer_interrupt_hook and use *_seq* functions on xtime_lock. Also remove asm-xen/asm-i386/timer.h which had no needed changes.
This commit is contained in:
1 parent
27277c3bd3
commit
8022271e73
5 files changed
+7
-152
No files matched your search
@@ -210,7 +210,6 @@
|
||||
40f5623akIoBsQ3KxSB2kufkbgONXQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h
|
||||
4118b6a418gnL6AZsTdglC92YGqYTg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/highmem.h
|
||||
40f5623aJVXQwpJMOLE99XgvGsfQ8Q linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h
|
||||
40f5623am9BzluYFuV6EQfTd-so3dA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h
|
||||
40f5623aKXkBBxgpLx2NcvkncQ1Yyw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h
|
||||
40f5623aDMCsWOFO0jktZ4e8sjwvEg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
|
||||
40f5623arsFXkGdPvIqvFi3yFXGR0Q linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h
|
||||
@@ -229,7 +228,6 @@
|
||||
40f5623bG_LzgG6-qwk292nTc5Wabw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/setup.h
|
||||
40f5623bgzm_9vwxpzJswlAxg298Gg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h
|
||||
40f5623bVdKP7Dt7qm8twu3NcnGNbA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/system.h
|
||||
40f5623bSgGrvrGRpD71K-lIYqaGgg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/timer.h
|
||||
40f5623bc8LKPRO09wY5dGDnY_YCpw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h
|
||||
41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/vga.h
|
||||
40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/xor.h
|
||||
|
||||
@@ -71,8 +71,6 @@
|
||||
extern spinlock_t i8259A_lock;
|
||||
int pit_latch_buggy; /* extern */
|
||||
|
||||
#include "do_timer.h"
|
||||
|
||||
u64 jiffies_64 = INITIAL_JIFFIES;
|
||||
|
||||
EXPORT_SYMBOL(jiffies_64);
|
||||
@@ -86,7 +84,7 @@ spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
|
||||
spinlock_t i8253_lock = SPIN_LOCK_UNLOCKED;
|
||||
EXPORT_SYMBOL(i8253_lock);
|
||||
|
||||
struct timer_opts *cur_timer = &timer_none;
|
||||
struct timer_opts *cur_timer = &timer_tsc;
|
||||
|
||||
/* These are peridically updated in shared_info, and then copied here. */
|
||||
u32 shadow_tsc_stamp;
|
||||
@@ -402,7 +400,9 @@ static inline void do_timer_interrupt(int irq, void *dev_id,
|
||||
while (delta >= NS_PER_TICK) {
|
||||
delta -= NS_PER_TICK;
|
||||
processed_system_time += NS_PER_TICK;
|
||||
do_timer_interrupt_hook(regs);
|
||||
do_timer(regs);
|
||||
if (regs)
|
||||
profile_tick(CPU_PROFILING, regs);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -627,7 +627,6 @@ void __init time_init(void)
|
||||
wall_to_monotonic.tv_nsec = -xtime.tv_nsec;
|
||||
processed_system_time = shadow_system_time;
|
||||
|
||||
cur_timer = select_timer();
|
||||
printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name);
|
||||
|
||||
time_irq = bind_virq_to_irq(VIRQ_TIMER);
|
||||
@@ -679,7 +678,7 @@ void time_suspend(void)
|
||||
void time_resume(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
write_lock_irqsave(&xtime_lock, flags);
|
||||
write_seqlock_irqsave(&xtime_lock, flags);
|
||||
/* Get timebases for new environment. */
|
||||
__get_time_values_from_xen();
|
||||
/* Reset our own concept of passage of system time. */
|
||||
@@ -688,7 +687,7 @@ void time_resume(void)
|
||||
last_seen_tv.tv_sec = 0;
|
||||
/* Make sure we resync UTC time with Xen on next timer interrupt. */
|
||||
last_update_from_xen = 0;
|
||||
write_unlock_irqrestore(&xtime_lock, flags);
|
||||
write_sequnlock_irqrestore(&xtime_lock, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
XENARCH := $(subst ",,$(CONFIG_XENARCH))
|
||||
|
||||
obj-y := timer_tsc.o
|
||||
c-obj-y := timer.o timer_none.o timer_pit.o
|
||||
c-obj-y :=
|
||||
|
||||
c-link :=
|
||||
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
/* defines for inline arch setup functions */
|
||||
|
||||
#include <asm/apic.h>
|
||||
|
||||
/**
|
||||
* do_timer_interrupt_hook - hook into timer tick
|
||||
* @regs: standard registers from interrupt
|
||||
*
|
||||
* Description:
|
||||
* This hook is called immediately after the timer interrupt is ack'd.
|
||||
* It's primary purpose is to allow architectures that don't possess
|
||||
* individual per CPU clocks (like the CPU APICs supply) to broadcast the
|
||||
* timer interrupt as a means of triggering reschedules etc.
|
||||
**/
|
||||
|
||||
static inline void do_timer_interrupt_hook(struct pt_regs *regs)
|
||||
{
|
||||
do_timer(regs);
|
||||
/*
|
||||
* In the SMP case we use the local APIC timer interrupt to do the
|
||||
* profiling, except when we simulate SMP mode on a uniprocessor
|
||||
* system, in that case we have to call the local interrupt handler.
|
||||
*/
|
||||
#ifndef CONFIG_X86_LOCAL_APIC
|
||||
if (regs)
|
||||
profile_tick(CPU_PROFILING, regs);
|
||||
#else
|
||||
if (regs && !using_apic_timer)
|
||||
smp_local_timer_interrupt(regs);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* you can safely undefine this if you don't have the Neptune chipset */
|
||||
|
||||
#define BUGGY_NEPTUN_TIMER
|
||||
|
||||
/**
|
||||
* do_timer_overflow - process a detected timer overflow condition
|
||||
* @count: hardware timer interrupt count on overflow
|
||||
*
|
||||
* Description:
|
||||
* This call is invoked when the jiffies count has not incremented but
|
||||
* the hardware timer interrupt has. It means that a timer tick interrupt
|
||||
* came along while the previous one was pending, thus a tick was missed
|
||||
**/
|
||||
static inline int do_timer_overflow(int count)
|
||||
{
|
||||
int i;
|
||||
|
||||
spin_lock(&i8259A_lock);
|
||||
/*
|
||||
* This is tricky when I/O APICs are used;
|
||||
* see do_timer_interrupt().
|
||||
*/
|
||||
i = inb(0x20);
|
||||
spin_unlock(&i8259A_lock);
|
||||
|
||||
/* assumption about timer being IRQ0 */
|
||||
if (i & 0x01) {
|
||||
/*
|
||||
* We cannot detect lost timer interrupts ...
|
||||
* well, that's why we call them lost, don't we? :)
|
||||
* [hmm, on the Pentium and Alpha we can ... sort of]
|
||||
*/
|
||||
count -= LATCH;
|
||||
} else {
|
||||
#ifdef BUGGY_NEPTUN_TIMER
|
||||
/*
|
||||
* for the Neptun bug we know that the 'latch'
|
||||
* command doesn't latch the high and low value
|
||||
* of the counter atomically. Thus we have to
|
||||
* substract 256 from the counter
|
||||
* ... funny, isnt it? :)
|
||||
*/
|
||||
|
||||
count -= 256;
|
||||
#else
|
||||
printk("do_slow_gettimeoffset(): hardware timer problem?\n");
|
||||
#endif
|
||||
}
|
||||
return count;
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
#ifndef _ASMi386_TIMER_H
|
||||
#define _ASMi386_TIMER_H
|
||||
|
||||
/**
|
||||
* struct timer_ops - used to define a timer source
|
||||
*
|
||||
* @name: name of the timer.
|
||||
* @init: Probes and initializes the timer. Takes clock= override
|
||||
* string as an argument. Returns 0 on success, anything else
|
||||
* on failure.
|
||||
* @mark_offset: called by the timer interrupt.
|
||||
* @get_offset: called by gettimeofday(). Returns the number of microseconds
|
||||
* since the last timer interupt.
|
||||
* @monotonic_clock: returns the number of nanoseconds since the init of the
|
||||
* timer.
|
||||
* @delay: delays this many clock cycles.
|
||||
*/
|
||||
struct timer_opts{
|
||||
char* name;
|
||||
int (*init)(char *override);
|
||||
void (*mark_offset)(void);
|
||||
unsigned long (*get_offset)(void);
|
||||
unsigned long long (*monotonic_clock)(void);
|
||||
void (*delay)(unsigned long);
|
||||
};
|
||||
|
||||
#define TICK_SIZE (tick_nsec / 1000)
|
||||
|
||||
extern struct timer_opts* select_timer(void);
|
||||
extern void clock_fallback(void);
|
||||
void setup_pit_timer(void);
|
||||
|
||||
/* Modifiers for buggy PIT handling */
|
||||
|
||||
extern int pit_latch_buggy;
|
||||
|
||||
extern struct timer_opts *cur_timer;
|
||||
extern int timer_ack;
|
||||
|
||||
/* list of externed timers */
|
||||
extern struct timer_opts timer_none;
|
||||
extern struct timer_opts timer_pit;
|
||||
extern struct timer_opts timer_tsc;
|
||||
#ifdef CONFIG_X86_CYCLONE_TIMER
|
||||
extern struct timer_opts timer_cyclone;
|
||||
#endif
|
||||
extern struct timer_opts timer_xen;
|
||||
|
||||
extern unsigned long calibrate_tsc(void);
|
||||
extern void init_cpu_khz(void);
|
||||
#ifdef CONFIG_HPET_TIMER
|
||||
extern struct timer_opts timer_hpet;
|
||||
extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86_PM_TIMER
|
||||
extern struct timer_opts timer_pmtmr;
|
||||
#endif
|
||||
#endif
|
||||