rpms/kernel/devel linux-2.6.9-xen-compile.patch,1.29,1.30
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Mar 30 20:22:25 UTC 2005
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21265
Modified Files:
linux-2.6.9-xen-compile.patch
Log Message:
rtc cmos changes, naively ported from arch/i386/ - I hope xenU won't explode
linux-2.6.9-xen-compile.patch:
linux-2.6.10/arch/xen/i386/pci/irq.c | 1
linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h | 2
linux-2.6.11/arch/xen/Kconfig | 2
linux-2.6.11/arch/xen/i386/kernel/time.c | 45 +++++++---
linux-2.6.11/arch/xen/i386/pci/irq.c | 4
linux-2.6.11/drivers/char/mem.c | 4
linux-2.6.11/drivers/char/tty_io.c | 2
linux-2.6.11/include/asm-generic/pgtable.h | 1
linux-2.6.11/include/asm-xen/asm-i386/pgtable.h | 22 +++-
linux-2.6.11/mm/memory.c | 4
linux-2.6.8/arch/xen/i386/kernel/time.c | 2
linux-2.6.9/Makefile | 2
linux-2.6.9/arch/xen/Makefile | 3
linux-2.6.9/arch/xen/boot/Makefile | 3
linux-2.6.9/include/asm-i386/irq.h | 4
linux-2.6.9/kernel/profile.c | 1
16 files changed, 78 insertions(+), 24 deletions(-)
Index: linux-2.6.9-xen-compile.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6.9-xen-compile.patch,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- linux-2.6.9-xen-compile.patch 30 Mar 2005 16:48:14 -0000 1.29
+++ linux-2.6.9-xen-compile.patch 30 Mar 2005 20:22:22 -0000 1.30
@@ -243,3 +243,72 @@
}
return 0;
+--- linux-2.6.11/arch/xen/i386/kernel/time.c.rc1 2005-03-30 14:55:49.000000000 -0500
++++ linux-2.6.11/arch/xen/i386/kernel/time.c 2005-03-30 15:16:32.000000000 -0500
+@@ -177,6 +177,35 @@ static void __get_time_values_from_xen(v
+ ({ rmb(); (shadow_time_version == HYPERVISOR_shared_info->time_version2); })
+
+ /*
++ * This is a special lock that is owned by the CPU and holds the index
++ * register we are working with. It is required for NMI access to the
++ * CMOS/RTC registers. See include/asm-i386/mc146818rtc.h for details.
++ */
++volatile unsigned long cmos_lock = 0;
++EXPORT_SYMBOL(cmos_lock);
++
++/* Routines for accessing the CMOS RAM/RTC. */
++unsigned char rtc_cmos_read(unsigned char addr)
++{
++ unsigned char val;
++ lock_cmos_prefix(addr);
++ outb_p(addr, RTC_PORT(0));
++ val = inb_p(RTC_PORT(1));
++ lock_cmos_suffix(addr);
++ return val;
++}
++EXPORT_SYMBOL(rtc_cmos_read);
++
++void rtc_cmos_write(unsigned char val, unsigned char addr)
++{
++ lock_cmos_prefix(addr);
++ outb_p(addr, RTC_PORT(0));
++ outb_p(val, RTC_PORT(1));
++ lock_cmos_suffix(addr);
++}
++EXPORT_SYMBOL(rtc_cmos_write);
++
++/*
+ * This version of gettimeofday has microsecond resolution
+ * and better than microsecond precision on fast x86 machines with TSC.
+ */
+@@ -487,16 +516,12 @@ static inline void do_timer_interrupt(in
+ >= USEC_AFTER - ((unsigned) TICK_SIZE) / 2 &&
+ (xtime.tv_nsec / 1000)
+ <= USEC_BEFORE + ((unsigned) TICK_SIZE) / 2) {
+- /* horrible...FIXME */
++ last_rtc_update = xtime.tv_sec;
+ if (efi_enabled) {
+- if (efi_set_rtc_mmss(xtime.tv_sec) == 0)
+- last_rtc_update = xtime.tv_sec;
+- else
+- last_rtc_update = xtime.tv_sec - 600;
+- } else if (set_rtc_mmss(xtime.tv_sec) == 0)
+- last_rtc_update = xtime.tv_sec;
+- else
+- last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
++ if (efi_set_rtc_mmss(xtime.tv_sec))
++ last_rtc_update -= 600;
++ } else if (set_rtc_mmss(xtime.tv_sec))
++ last_rtc_update -= 600;
+ }
+ #endif
+ }
+@@ -598,7 +623,7 @@ device_initcall(time_init_device);
+ #ifdef CONFIG_HPET_TIMER
+ extern void (*late_time_init)(void);
+ /* Duplicate of time_init() below, with hpet_enable part added */
+-void __init hpet_time_init(void)
++static void __init hpet_time_init(void)
+ {
+ xtime.tv_sec = get_cmos_time();
+ xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ);
More information about the fedora-cvs-commits
mailing list