Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
0b380831
Commit
0b380831
authored
Sep 14, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: xtime.tv_nsec fixes
parent
c0b0a8c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
arch/ppc64/kernel/syscalls.c
arch/ppc64/kernel/syscalls.c
+1
-1
arch/ppc64/kernel/time.c
arch/ppc64/kernel/time.c
+4
-4
No files found.
arch/ppc64/kernel/syscalls.c
View file @
0b380831
...
...
@@ -254,7 +254,7 @@ asmlinkage time_t sys64_time(time_t* tloc)
tb_delta
+=
(
jiffies
-
wall_jiffies
)
*
tb_ticks_per_jiffy
;
secs
=
xtime
.
tv_sec
;
usecs
=
xtime
.
tv_usec
+
tb_delta
/
tb_ticks_per_usec
;
usecs
=
(
xtime
.
tv_nsec
/
1000
)
+
tb_delta
/
tb_ticks_per_usec
;
while
(
usecs
>=
USEC_PER_SEC
)
{
++
secs
;
usecs
-=
USEC_PER_SEC
;
...
...
arch/ppc64/kernel/time.c
View file @
0b380831
...
...
@@ -150,7 +150,7 @@ static __inline__ void timer_check_rtc(void)
*/
if
(
(
time_status
&
STA_UNSYNC
)
==
0
&&
xtime
.
tv_sec
-
last_rtc_update
>=
659
&&
abs
(
xtime
.
tv_usec
-
(
1000000
-
1000000
/
HZ
))
<
500000
/
HZ
&&
abs
(
(
xtime
.
tv_nsec
/
1000
)
-
(
1000000
-
1000000
/
HZ
))
<
500000
/
HZ
&&
jiffies
-
wall_jiffies
==
1
)
{
struct
rtc_time
tm
;
to_tm
(
xtime
.
tv_sec
+
1
,
&
tm
);
...
...
@@ -175,7 +175,7 @@ static __inline__ void timer_sync_xtime( unsigned long cur_tb )
do_gettimeofday
(
&
my_tv
);
if
(
xtime
.
tv_sec
<=
my_tv
.
tv_sec
)
{
xtime
.
tv_sec
=
my_tv
.
tv_sec
;
xtime
.
tv_
usec
=
my_tv
.
tv_usec
;
xtime
.
tv_
nsec
=
my_tv
.
tv_usec
*
1000
;
}
}
}
...
...
@@ -356,7 +356,7 @@ void do_settimeofday(struct timeval *tv)
new_sec
--
;
new_usec
+=
USEC_PER_SEC
;
}
xtime
.
tv_
usec
=
new_usec
;
xtime
.
tv_
nsec
=
new_usec
*
1000
;
xtime
.
tv_sec
=
new_sec
;
/* In case of a large backwards jump in time with NTP, we want the
...
...
@@ -465,7 +465,7 @@ void __init time_init(void)
time_freq
=
0
;
xtime
.
tv_
u
sec
=
0
;
xtime
.
tv_
n
sec
=
0
;
last_rtc_update
=
xtime
.
tv_sec
;
write_unlock_irqrestore
(
&
xtime_lock
,
flags
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment