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
94f68b22
Commit
94f68b22
authored
Sep 17, 2002
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: convert xtime usage from timeval to timespec
parent
03d42991
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
arch/ppc/kernel/time.c
arch/ppc/kernel/time.c
+4
-4
arch/ppc/platforms/pmac_time.c
arch/ppc/platforms/pmac_time.c
+1
-1
No files found.
arch/ppc/kernel/time.c
View file @
94f68b22
...
@@ -193,7 +193,7 @@ void timer_interrupt(struct pt_regs * regs)
...
@@ -193,7 +193,7 @@ void timer_interrupt(struct pt_regs * regs)
*/
*/
if
(
ppc_md
.
set_rtc_time
&&
(
time_status
&
STA_UNSYNC
)
==
0
&&
if
(
ppc_md
.
set_rtc_time
&&
(
time_status
&
STA_UNSYNC
)
==
0
&&
xtime
.
tv_sec
-
last_rtc_update
>=
659
&&
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
)
{
jiffies
-
wall_jiffies
==
1
)
{
if
(
ppc_md
.
set_rtc_time
(
xtime
.
tv_sec
+
1
+
time_offset
)
==
0
)
if
(
ppc_md
.
set_rtc_time
(
xtime
.
tv_sec
+
1
+
time_offset
)
==
0
)
last_rtc_update
=
xtime
.
tv_sec
+
1
;
last_rtc_update
=
xtime
.
tv_sec
+
1
;
...
@@ -228,7 +228,7 @@ void do_gettimeofday(struct timeval *tv)
...
@@ -228,7 +228,7 @@ void do_gettimeofday(struct timeval *tv)
read_lock_irqsave
(
&
xtime_lock
,
flags
);
read_lock_irqsave
(
&
xtime_lock
,
flags
);
sec
=
xtime
.
tv_sec
;
sec
=
xtime
.
tv_sec
;
usec
=
xtime
.
tv_usec
;
usec
=
(
xtime
.
tv_nsec
/
1000
)
;
#ifdef CONFIG_PPC_ISERIES
#ifdef CONFIG_PPC_ISERIES
delta
=
tb_ticks_per_jiffy
-
(
next_jiffy_update_tb
[
0
]
-
get_tb64
()
);
delta
=
tb_ticks_per_jiffy
-
(
next_jiffy_update_tb
[
0
]
-
get_tb64
()
);
#else
#else
...
@@ -285,7 +285,7 @@ void do_settimeofday(struct timeval *tv)
...
@@ -285,7 +285,7 @@ void do_settimeofday(struct timeval *tv)
new_sec
--
;
new_sec
--
;
new_usec
+=
1000000
;
new_usec
+=
1000000
;
}
}
xtime
.
tv_
usec
=
new_usec
;
xtime
.
tv_
nsec
=
(
new_usec
*
1000
)
;
xtime
.
tv_sec
=
new_sec
;
xtime
.
tv_sec
=
new_sec
;
/* In case of a large backwards jump in time with NTP, we want the
/* In case of a large backwards jump in time with NTP, we want the
...
@@ -344,7 +344,7 @@ void __init time_init(void)
...
@@ -344,7 +344,7 @@ void __init time_init(void)
write_lock_irqsave
(
&
xtime_lock
,
flags
);
write_lock_irqsave
(
&
xtime_lock
,
flags
);
xtime
.
tv_sec
=
sec
;
xtime
.
tv_sec
=
sec
;
last_jiffy_stamp
(
0
)
=
tb_last_stamp
=
stamp
;
last_jiffy_stamp
(
0
)
=
tb_last_stamp
=
stamp
;
xtime
.
tv_
u
sec
=
0
;
xtime
.
tv_
n
sec
=
0
;
/* No update now, we just read the time from the RTC ! */
/* No update now, we just read the time from the RTC ! */
last_rtc_update
=
xtime
.
tv_sec
;
last_rtc_update
=
xtime
.
tv_sec
;
write_unlock_irqrestore
(
&
xtime_lock
,
flags
);
write_unlock_irqrestore
(
&
xtime_lock
,
flags
);
...
...
arch/ppc/platforms/pmac_time.c
View file @
94f68b22
...
@@ -228,7 +228,7 @@ time_sleep_notify(struct pmu_sleep_notifier *self, int when)
...
@@ -228,7 +228,7 @@ time_sleep_notify(struct pmu_sleep_notifier *self, int when)
case
PBOOK_WAKE
:
case
PBOOK_WAKE
:
write_lock_irqsave
(
&
xtime_lock
,
flags
);
write_lock_irqsave
(
&
xtime_lock
,
flags
);
xtime
.
tv_sec
=
pmac_get_rtc_time
()
+
time_diff
;
xtime
.
tv_sec
=
pmac_get_rtc_time
()
+
time_diff
;
xtime
.
tv_
u
sec
=
0
;
xtime
.
tv_
n
sec
=
0
;
last_rtc_update
=
xtime
.
tv_sec
;
last_rtc_update
=
xtime
.
tv_sec
;
write_unlock_irqrestore
(
&
xtime_lock
,
flags
);
write_unlock_irqrestore
(
&
xtime_lock
,
flags
);
break
;
break
;
...
...
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