mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
6c79d7260a
In file included from linux-2.6.13-rc5/arch/i386/kernel/timers/timer_pit.c:20: linux-2.6.13-rc5/include/asm-i386/mach-visws/do_timer.h: In function `do_timer_overflow': linux-2.6.13-rc5/include/asm-i386/mach-visws/do_timer.h:32: error: `i8259A_lock' undeclared (first use in this function) linux-2.6.13-rc5/include/asm-i386/mach-visws/do_timer.h:32: error: (Each undeclared identifier is reported only once linux-2.6.13-rc5/include/asm-i386/mach-visws/do_timer.h:32: error: for each function it appears in.) make[3]: *** [arch/i386/kernel/timers/timer_pit.o] Error 1 make[2]: *** [arch/i386/kernel/timers] Error 2 make[1]: *** [arch/i386/kernel] Error 2 make: *** [_all] Error 2 Signed-off-by: Tom Duffy <thomas.duffy.99@alumni.brown.edu> Cc: Andrey Panin <pazke@orbita1.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
/* defines for inline arch setup functions */
|
|
|
|
#include <asm/fixmap.h>
|
|
#include <asm/i8259.h>
|
|
#include "cobalt.h"
|
|
|
|
static inline void do_timer_interrupt_hook(struct pt_regs *regs)
|
|
{
|
|
/* Clear the interrupt */
|
|
co_cpu_write(CO_CPU_STAT,co_cpu_read(CO_CPU_STAT) & ~CO_STAT_TIMEINTR);
|
|
|
|
do_timer(regs);
|
|
#ifndef CONFIG_SMP
|
|
update_process_times(user_mode(regs));
|
|
#endif
|
|
/*
|
|
* 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
|
|
profile_tick(CPU_PROFILING, regs);
|
|
#else
|
|
if (!using_apic_timer)
|
|
smp_local_timer_interrupt(regs);
|
|
#endif
|
|
}
|
|
|
|
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 {
|
|
printk("do_slow_gettimeoffset(): hardware timer problem?\n");
|
|
}
|
|
return count;
|
|
}
|