WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] linux/x86: fix up time-xen.c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/x86: fix up time-xen.c
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Oct 2007 15:00:28 -0700
Delivery-date: Wed, 31 Oct 2007 15:01:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1193324380 -3600
# Node ID 2b8d5e48dddadcbd590b98aa8945348d36e91191
# Parent  11fb85f45a87786cd2e31cc1bcb1d3235b58a5ac
linux/x86: fix up time-xen.c

Changeset 143 removed the uses of timer_suspend/timer_resume, but not
the implementations. It also introduced an incompatible pointer
assignment.

Also replace an #if checking a CONFIG_ variable by #ifdef.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/kernel/time-xen.c |   41 ++++++-----------------------------------
 1 files changed, 6 insertions(+), 35 deletions(-)

diff -r 11fb85f45a87 -r 2b8d5e48ddda arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c       Thu Oct 25 15:56:17 2007 +0100
+++ b/arch/i386/kernel/time-xen.c       Thu Oct 25 15:59:40 2007 +0100
@@ -833,44 +833,15 @@ void notify_arch_cmos_timer(void)
        mod_timer(&sync_xen_wallclock_timer, jiffies + 1);
 }
 
-static long clock_cmos_diff, sleep_start;
-
-static int timer_suspend(struct sys_device *dev, pm_message_t state)
-{
-       /*
-        * Estimate time zone so that set_time can update the clock
-        */
-       clock_cmos_diff = -get_cmos_time();
-       clock_cmos_diff += get_seconds();
-       sleep_start = get_cmos_time();
+static int timer_resume(struct sys_device *dev)
+{
+       extern void time_resume(void);
+       time_resume();
        return 0;
 }
 
-static int timer_resume(struct sys_device *dev)
-{
-       unsigned long flags;
-       unsigned long sec;
-       unsigned long sleep_length;
-
-#ifdef CONFIG_HPET_TIMER
-       if (is_hpet_enabled())
-               hpet_reenable();
-#endif
-       sec = get_cmos_time() + clock_cmos_diff;
-       sleep_length = (get_cmos_time() - sleep_start) * HZ;
-       write_seqlock_irqsave(&xtime_lock, flags);
-       xtime.tv_sec = sec;
-       xtime.tv_nsec = 0;
-       jiffies_64 += sleep_length;
-       wall_jiffies += sleep_length;
-       write_sequnlock_irqrestore(&xtime_lock, flags);
-       touch_softlockup_watchdog();
-       return 0;
-}
-
-void time_resume(void);
 static struct sysdev_class timer_sysclass = {
-       .resume = time_resume,
+       .resume = timer_resume,
        set_kset_name("timer"),
 };
 
@@ -1121,7 +1092,7 @@ void local_teardown_timer(unsigned int c
 }
 #endif
 
-#if CONFIG_CPU_FREQ
+#ifdef CONFIG_CPU_FREQ
 static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, 
                                void *data)
 {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux/x86: fix up time-xen.c, Xen patchbot-linux-2.6.18-xen <=