summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorsudheer <none@none>2007-06-28 00:11:48 -0700
committersudheer <none@none>2007-06-28 00:11:48 -0700
commitb5b48cc1a59a2d6962c84c49b474efdc7f303fbb (patch)
treed8730d6c1e518e5bc303471e842a9cc718d6234e /usr/src
parent95b1e0e97946d4fd25ec53011929b4a3f204de41 (diff)
downloadillumos-joyent-b5b48cc1a59a2d6962c84c49b474efdc7f303fbb.tar.gz
6539802 Time as reported by gettimeofday(3C) goes backwards on Galaxy kit
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/sys/time.h2
-rw-r--r--usr/src/uts/intel/ia32/ml/i86_subr.s2
-rw-r--r--usr/src/uts/intel/ia32/os/archdep.c3
-rw-r--r--usr/src/uts/intel/sys/machlock.h11
-rw-r--r--usr/src/uts/sparc/sys/machlock.h9
-rw-r--r--usr/src/uts/sun4/cpu/cpu_module.c6
-rw-r--r--usr/src/uts/sun4u/cpu/common_asm.s6
-rw-r--r--usr/src/uts/sun4u/io/todstarfire.c11
-rw-r--r--usr/src/uts/sun4v/cpu/common_asm.s6
9 files changed, 23 insertions, 33 deletions
diff --git a/usr/src/uts/common/sys/time.h b/usr/src/uts/common/sys/time.h
index ffc2c7dcfb..d47be80744 100644
--- a/usr/src/uts/common/sys/time.h
+++ b/usr/src/uts/common/sys/time.h
@@ -275,7 +275,7 @@ extern int64_t timedelta;
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;
diff --git a/usr/src/uts/intel/ia32/ml/i86_subr.s b/usr/src/uts/intel/ia32/ml/i86_subr.s
index 661eddfba6..52de4155ab 100644
--- a/usr/src/uts/intel/ia32/ml/i86_subr.s
+++ b/usr/src/uts/intel/ia32/ml/i86_subr.s
@@ -3138,7 +3138,7 @@ hres_tick(void)
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;
diff --git a/usr/src/uts/intel/ia32/os/archdep.c b/usr/src/uts/intel/ia32/os/archdep.c
index 2681aeae1a..6e92196949 100644
--- a/usr/src/uts/intel/ia32/os/archdep.c
+++ b/usr/src/uts/intel/ia32/os/archdep.c
@@ -936,7 +936,7 @@ bind_hwcap(void)
#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 @@ gethrestime(timespec_t *tp)
#include <sys/machlock.h>
extern int one_sec;
-extern timestruc_t hrestime;
extern int max_hres_adj;
void
diff --git a/usr/src/uts/intel/sys/machlock.h b/usr/src/uts/intel/sys/machlock.h
index d15b1d219b..d740bc6212 100644
--- a/usr/src/uts/intel/sys/machlock.h
+++ b/usr/src/uts/intel/sys/machlock.h
@@ -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 @@ typedef lock_t disp_lock_t; /* dispatcher lock type */
/*
* 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;
diff --git a/usr/src/uts/sparc/sys/machlock.h b/usr/src/uts/sparc/sys/machlock.h
index 4a2cec8b54..72664a37b5 100644
--- a/usr/src/uts/sparc/sys/machlock.h
+++ b/usr/src/uts/sparc/sys/machlock.h
@@ -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 @@ typedef lock_t disp_lock_t; /* dispatcher lock type */
/*
* Extern for CLOCK_LOCK.
*/
-extern int hres_lock;
+extern volatile int hres_lock;
#endif /* _ASM */
diff --git a/usr/src/uts/sun4/cpu/cpu_module.c b/usr/src/uts/sun4/cpu/cpu_module.c
index ebb4b0ced4..717cc26f90 100644
--- a/usr/src/uts/sun4/cpu/cpu_module.c
+++ b/usr/src/uts/sun4/cpu/cpu_module.c
@@ -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;
diff --git a/usr/src/uts/sun4u/cpu/common_asm.s b/usr/src/uts/sun4u/cpu/common_asm.s
index 3104dc837c..b13ec0ef67 100644
--- a/usr/src/uts/sun4u/cpu/common_asm.s
+++ b/usr/src/uts/sun4u/cpu/common_asm.s
@@ -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 @@ QRETURN; \
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;
diff --git a/usr/src/uts/sun4u/io/todstarfire.c b/usr/src/uts/sun4u/io/todstarfire.c
index 2c33e775e1..05fc25fce7 100644
--- a/usr/src/uts/sun4u/io/todstarfire.c
+++ b/usr/src/uts/sun4u/io/todstarfire.c
@@ -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_set_power_alarm(timestruc_t);
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 @@ _init(void)
/* 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);
diff --git a/usr/src/uts/sun4v/cpu/common_asm.s b/usr/src/uts/sun4v/cpu/common_asm.s
index 76c17215bb..f76eec82c7 100644
--- a/usr/src/uts/sun4v/cpu/common_asm.s
+++ b/usr/src/uts/sun4v/cpu/common_asm.s
@@ -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 @@ QRETURN; \
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;