[Patch] resume PIT

From: Luming Yu
Date: Thu Mar 10 2005 - 00:06:16 EST




[PATCH] resume PIT for x86_64


Signed-off-by: Luming Yu <luming.yu@xxxxxxxxx>




diff -BruN 0/arch/x86_64/kernel/i8259.c 1/arch/x86_64/kernel/i8259.c
--- 0/arch/x86_64/kernel/i8259.c 2005-03-07 23:29:42.000000000 +0800
+++ 1/arch/x86_64/kernel/i8259.c 2005-03-09 12:53:10.000000000 +0800
@@ -477,6 +477,7 @@
void call_function_interrupt(void);
void invalidate_interrupt(void);
void thermal_interrupt(void);
+void i8254_timer_resume(void);

static void setup_timer(void)
{
@@ -493,6 +494,11 @@
return 0;
}

+void i8254_timer_resume(void)
+{
+ setup_timer();
+}
+
static struct sysdev_class timer_sysclass = {
set_kset_name("timer"),
.resume = timer_resume,
diff -BruN 0/arch/x86_64/kernel/time.c 1/arch/x86_64/kernel/time.c
--- 0/arch/x86_64/kernel/time.c 2005-03-07 23:32:23.000000000 +0800
+++ 1/arch/x86_64/kernel/time.c 2005-03-09 12:53:10.000000000 +0800
@@ -46,7 +46,7 @@
#ifdef CONFIG_CPU_FREQ
static void cpufreq_delayed_get(void);
#endif
-
+extern void i8254_timer_resume(void);
extern int using_apic_timer;

DEFINE_SPINLOCK(rtc_lock);
@@ -980,6 +980,8 @@

if (vxtime.hpet_address)
hpet_reenable();
+ else
+ i8254_timer_resume();

sec = ctime + clock_cmos_diff;
write_seqlock_irqsave(&xtime_lock,flags);

Attachment: i8254.patch
Description: Binary data