direct-io.hg

changeset 1297:05184d300711

bitkeeper revision 1.859 (407652acyoMCU4hs17VI0fgKDFoC7g)

time.c:
Fix compile error when building non-priv Xenolinux.
author kaf24@scramble.cl.cam.ac.uk
date Fri Apr 09 07:37:16 2004 +0000 (2004-04-09)
parents 1695bdcd44b7
children de049ec69adc
files xenolinux-2.4.25-sparse/arch/xen/kernel/time.c
line diff
     1.1 --- a/xenolinux-2.4.25-sparse/arch/xen/kernel/time.c	Thu Apr 08 17:46:51 2004 +0000
     1.2 +++ b/xenolinux-2.4.25-sparse/arch/xen/kernel/time.c	Fri Apr 09 07:37:16 2004 +0000
     1.3 @@ -18,28 +18,28 @@
     1.4   * This file contains the PC-specific time handling details:
     1.5   * reading the RTC at bootup, etc..
     1.6   * 1994-07-02    Alan Modra
     1.7 - *	fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
     1.8 + * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
     1.9   * 1995-03-26    Markus Kuhn
    1.10   *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
    1.11   *      precision CMOS clock update
    1.12   * 1996-05-03    Ingo Molnar
    1.13   *      fixed time warps in do_[slow|fast]_gettimeoffset()
    1.14 - * 1997-09-10	Updated NTP code according to technical memorandum Jan '96
    1.15 - *		"A Kernel Model for Precision Timekeeping" by Dave Mills
    1.16 + * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
    1.17 + *  "A Kernel Model for Precision Timekeeping" by Dave Mills
    1.18   * 1998-09-05    (Various)
    1.19 - *	More robust do_fast_gettimeoffset() algorithm implemented
    1.20 - *	(works with APM, Cyrix 6x86MX and Centaur C6),
    1.21 - *	monotonic gettimeofday() with fast_get_timeoffset(),
    1.22 - *	drift-proof precision TSC calibration on boot
    1.23 - *	(C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
    1.24 - *	Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
    1.25 - *	ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
    1.26 + * More robust do_fast_gettimeoffset() algorithm implemented
    1.27 + * (works with APM, Cyrix 6x86MX and Centaur C6),
    1.28 + * monotonic gettimeofday() with fast_get_timeoffset(),
    1.29 + * drift-proof precision TSC calibration on boot
    1.30 + * (C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
    1.31 + * Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
    1.32 + * ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
    1.33   * 1998-12-16    Andrea Arcangeli
    1.34 - *	Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
    1.35 - *	because was not accounting lost_ticks.
    1.36 + * Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
    1.37 + * because was not accounting lost_ticks.
    1.38   * 1998-12-24 Copyright (C) 1998  Andrea Arcangeli
    1.39 - *	Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
    1.40 - *	serialize accesses to xtime/lost_ticks).
    1.41 + * Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
    1.42 + * serialize accesses to xtime/lost_ticks).
    1.43   */
    1.44  
    1.45  #include <asm/smp.h>
    1.46 @@ -67,7 +67,7 @@ spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED
    1.47  extern rwlock_t xtime_lock;
    1.48  extern unsigned long wall_jiffies;
    1.49  
    1.50 -unsigned long cpu_khz;	/* get this from Xen, used elsewhere */
    1.51 +unsigned long cpu_khz; /* get this from Xen, used elsewhere */
    1.52  
    1.53  static unsigned int rdtsc_bitshift;
    1.54  static u32 st_scale_f; /* convert ticks -> usecs */
    1.55 @@ -165,7 +165,7 @@ static int set_rtc_mmss(unsigned long no
    1.56      real_seconds = nowtime % 60;
    1.57      real_minutes = nowtime / 60;
    1.58      if ( ((abs(real_minutes - cmos_minutes) + 15)/30) & 1 )
    1.59 -        real_minutes += 30;		/* correct for half hour time zone */
    1.60 +        real_minutes += 30;  /* correct for half hour time zone */
    1.61      real_minutes %= 60;
    1.62  
    1.63      if ( abs(real_minutes - cmos_minutes) < 30 )
    1.64 @@ -251,7 +251,7 @@ static inline unsigned long __get_time_d
    1.65   */
    1.66  void do_gettimeofday(struct timeval *tv)
    1.67  {
    1.68 -	unsigned long flags, lost;
    1.69 +    unsigned long flags, lost;
    1.70      struct timeval _tv;
    1.71  
    1.72   again:
    1.73 @@ -325,7 +325,7 @@ void do_settimeofday(struct timeval *tv)
    1.74      HANDLE_USEC_UNDERFLOW(*tv);
    1.75  
    1.76      xtime = *tv;
    1.77 -    time_adjust = 0;		/* stop active adjtime() */
    1.78 +    time_adjust = 0;  /* stop active adjtime() */
    1.79      time_status |= STA_UNSYNC;
    1.80      time_maxerror = NTP_PHASE_LIMIT;
    1.81      time_esterror = NTP_PHASE_LIMIT;
    1.82 @@ -356,21 +356,21 @@ void do_settimeofday(struct timeval *tv)
    1.83  
    1.84  asmlinkage long sys_stime(int *tptr)
    1.85  {
    1.86 -	int value;
    1.87 +    int value;
    1.88      struct timeval tv;
    1.89  
    1.90 -	if ( !capable(CAP_SYS_TIME) )
    1.91 -		return -EPERM;
    1.92 +    if ( !capable(CAP_SYS_TIME) )
    1.93 +        return -EPERM;
    1.94  
    1.95 -	if ( get_user(value, tptr) )
    1.96 -		return -EFAULT;
    1.97 +    if ( get_user(value, tptr) )
    1.98 +        return -EFAULT;
    1.99  
   1.100      tv.tv_sec  = value;
   1.101      tv.tv_usec = 0;
   1.102  
   1.103      do_settimeofday(&tv);
   1.104  
   1.105 -	return 0;
   1.106 +    return 0;
   1.107  }
   1.108  
   1.109  
   1.110 @@ -436,7 +436,9 @@ static inline void do_timer_interrupt(in
   1.111               unlikely(((sec_diff * 1000000) + 
   1.112                         xtime.tv_usec - shadow_tv.tv_usec) > 500000) )
   1.113          {
   1.114 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
   1.115              last_update_to_rtc = last_update_to_xen = 0;
   1.116 +#endif
   1.117              last_seen_tv.tv_sec = 0;
   1.118          }
   1.119  
   1.120 @@ -447,7 +449,7 @@ static inline void do_timer_interrupt(in
   1.121      }
   1.122  
   1.123  #ifdef CONFIG_XEN_PRIVILEGED_GUEST
   1.124 -	if ( (start_info.flags & SIF_INITDOMAIN) &&
   1.125 +    if ( (start_info.flags & SIF_INITDOMAIN) &&
   1.126           ((time_status & STA_UNSYNC) == 0) )
   1.127      {
   1.128          /* Send synchronised time to Xen approximately every minute. */