Mercurial > illumos > illumos-gate
changeset 4551:af6e7cd796cc
6539802 Time as reported by gettimeofday(3C) goes backwards on Galaxy kit
author | sudheer |
---|---|
date | Thu, 28 Jun 2007 00:11:48 -0700 |
parents | ddb718a94826 |
children | 46c287179820 |
files | usr/src/uts/common/sys/time.h usr/src/uts/intel/ia32/ml/i86_subr.s usr/src/uts/intel/ia32/os/archdep.c usr/src/uts/intel/sys/machlock.h usr/src/uts/sparc/sys/machlock.h usr/src/uts/sun4/cpu/cpu_module.c usr/src/uts/sun4u/cpu/common_asm.s usr/src/uts/sun4u/io/todstarfire.c usr/src/uts/sun4v/cpu/common_asm.s |
diffstat | 9 files changed, 23 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/sys/time.h Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/common/sys/time.h Thu Jun 28 00:11:48 2007 -0700 @@ -275,7 +275,7 @@ extern int timechanged; extern int tod_needsync; extern kmutex_t tod_lock; -extern timestruc_t hrestime; +extern volatile timestruc_t hrestime; extern hrtime_t hres_last_tick; extern int64_t hrestime_adj; extern uint_t adj_shift;
--- a/usr/src/uts/intel/ia32/ml/i86_subr.s Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/intel/ia32/ml/i86_subr.s Thu Jun 28 00:11:48 2007 -0700 @@ -3138,7 +3138,7 @@ int64_t timedelta; hrtime_t hres_last_tick; -timestruc_t hrestime; +volatile timestruc_t hrestime; int64_t hrestime_adj; volatile int hres_lock; hrtime_t hrtime_base;
--- a/usr/src/uts/intel/ia32/os/archdep.c Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/intel/ia32/os/archdep.c Thu Jun 28 00:11:48 2007 -0700 @@ -936,7 +936,7 @@ #if defined(_SYSCALL32_IMPL) auxv_hwcap32 = (auxv_hwcap32_include | cpu_hwcap_flags) & - ~auxv_hwcap32_exclude; + ~auxv_hwcap32_exclude; #if defined(__amd64) /* @@ -1343,7 +1343,6 @@ #include <sys/machlock.h> extern int one_sec; -extern timestruc_t hrestime; extern int max_hres_adj; void
--- a/usr/src/uts/intel/sys/machlock.h Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/intel/sys/machlock.h Thu Jun 28 00:11:48 2007 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -77,11 +76,7 @@ /* * Externs for CLOCK_LOCK and clock resolution */ -#ifdef __STDC__ extern volatile int hres_lock; -#else -extern int hres_lock; -#endif extern hrtime_t hrtime_base; extern int clock_res;
--- a/usr/src/uts/sparc/sys/machlock.h Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/sparc/sys/machlock.h Thu Jun 28 00:11:48 2007 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 1990-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -74,7 +73,7 @@ /* * Extern for CLOCK_LOCK. */ -extern int hres_lock; +extern volatile int hres_lock; #endif /* _ASM */
--- a/usr/src/uts/sun4/cpu/cpu_module.c Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/sun4/cpu/cpu_module.c Thu Jun 28 00:11:48 2007 -0700 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -36,9 +36,9 @@ uint_t root_phys_addr_lo_mask; int64_t timedelta; hrtime_t hres_last_tick; -timestruc_t hrestime; +volatile timestruc_t hrestime; int64_t hrestime_adj; -int hres_lock; +volatile int hres_lock; uint_t nsec_scale; uint_t nsec_shift; uint_t adj_shift;
--- a/usr/src/uts/sun4u/cpu/common_asm.s Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/sun4u/cpu/common_asm.s Thu Jun 28 00:11:48 2007 -0700 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -849,9 +849,9 @@ int64_t timedelta; hrtime_t hres_last_tick; -timestruc_t hrestime; +volatile timestruc_t hrestime; int64_t hrestime_adj; -int hres_lock; +volatile int hres_lock; uint_t nsec_scale; hrtime_t hrtime_base; int traptrace_use_stick;
--- a/usr/src/uts/sun4u/io/todstarfire.c Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/sun4u/io/todstarfire.c Thu Jun 28 00:11:48 2007 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 1997, 1999-2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -56,8 +55,6 @@ static void todsf_clear_power_alarm(void); static uint64_t todsf_get_cpufrequency(void); -extern timestruc_t hrestime; - /* * Module linkage information for the kernel. */ @@ -78,7 +75,7 @@ /* Set the string to pass to OBP */ (void) sprintf(obp_string, "h# %p unix-gettod", - (void *)&ssp_time32); + (void *)&ssp_time32); /* Get OBP to get TOD from ssp */ prom_interpret(obp_string, 0, 0, 0, 0, 0);
--- a/usr/src/uts/sun4v/cpu/common_asm.s Wed Jun 27 21:47:24 2007 -0700 +++ b/usr/src/uts/sun4v/cpu/common_asm.s Thu Jun 28 00:11:48 2007 -0700 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -692,9 +692,9 @@ int64_t timedelta; hrtime_t hres_last_tick; -timestruc_t hrestime; +volatile timestruc_t hrestime; int64_t hrestime_adj; -int hres_lock; +volatile int hres_lock; uint_t nsec_scale; hrtime_t hrtime_base; int traptrace_use_stick;