Re: [PATCH] Introduce boot based time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 10 May 2007 19:10:25 +0200
Tomas Janousek <[email protected]> wrote:

> The commits
>   411187fb05cd11676b0979d9fbf3291db69dbce2 (GTOD: persistent clock support)
>   c1d370e167d66b10bca3b602d3740405469383de (i386: use GTOD persistent clock
>     support)
> changed the monotonic time so that it no longer jumps after resume, but it's
> not possible to use it for boot time and process start time calculations then.
> Also, the uptime no longer increases during suspend.
> 
> I add a variable to track the wall_to_monotonic changes, a function to get the
> real boot time and a function to get the boot based time from the monotonic
> one.

From: Andrew Morton <[email protected]>

- I don't think those sybols are needed in modules.

- Document total_sleep_time units (would have been better to call it
  total_sleep_time_secs, perhaps).

Cc: John Stultz <[email protected]>
Cc: Tomas Janousek <[email protected]>
Cc: Tomas Smetana <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 kernel/time/timekeeping.c |    6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)

diff -puN include/linux/time.h~introduce-boot-based-time-fix include/linux/time.h
diff -puN kernel/time/timekeeping.c~introduce-boot-based-time-fix kernel/time/timekeeping.c
--- a/kernel/time/timekeeping.c~introduce-boot-based-time-fix
+++ a/kernel/time/timekeeping.c
@@ -46,7 +46,7 @@ EXPORT_SYMBOL(xtime_lock);
  */
 struct timespec xtime __attribute__ ((aligned (16)));
 struct timespec wall_to_monotonic __attribute__ ((aligned (16)));
-static unsigned long total_sleep_time;
+static unsigned long total_sleep_time;		/* seconds */
 
 EXPORT_SYMBOL(xtime);
 
@@ -503,8 +503,6 @@ void getboottime(struct timespec *ts)
 		- wall_to_monotonic.tv_nsec);
 }
 
-EXPORT_SYMBOL(getboottime);
-
 /**
  * monotonic_to_bootbased - Convert the monotonic time to boot based.
  * @ts:		pointer to the timespec to be converted
@@ -513,5 +511,3 @@ void monotonic_to_bootbased(struct times
 {
 	ts->tv_sec += total_sleep_time;
 }
-
-EXPORT_SYMBOL(monotonic_to_bootbased);
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux