mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch] resume PIT
@ 2005-03-10  4:55 Luming Yu
  0 siblings, 0 replies; only message in thread
From: Luming Yu @ 2005-03-10  4:55 UTC (permalink / raw)
  To: ak; +Cc: luming.yu, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]



[PATCH] resume PIT for x86_64


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




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 #2: i8254.patch --]
[-- Type: application/octet-stream, Size: 1165 bytes --]

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-10  5:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-10  4:55 [Patch] resume PIT Luming Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®