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
4586266b
Commit
4586266b
authored
May 19, 2003
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: More time-interpolation cleanups; correct SN2 interpolator.
parent
768b6efa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
arch/ia64/sn/kernel/sn2/timer.c
arch/ia64/sn/kernel/sn2/timer.c
+14
-2
include/asm-ia64/timex.h
include/asm-ia64/timex.h
+1
-5
No files found.
arch/ia64/sn/kernel/sn2/timer.c
View file @
4586266b
...
...
@@ -2,6 +2,8 @@
* linux/arch/ia64/sn/kernel/sn2/timer.c
*
* Copyright (C) 2003 Silicon Graphics, Inc.
* Copyright (C) 2003 Hewlett-Packard Co
* David Mosberger <davidm@hpl.hp.com>: updated for new timer-interpolation infrastructure
*/
#include <linux/init.h>
...
...
@@ -20,26 +22,36 @@
extern
unsigned
long
sn_rtc_cycles_per_second
;
static
volatile
unsigned
long
last_wall_rtc
;
static
unsigned
long
rtc_offset
;
/* updated only when xtime write-lock is held! */
static
long
rtc_nsecs_per_cycle
;
static
long
rtc_per_timer_tick
;
static
unsigned
long
getoffset
(
void
)
{
return
(
long
)
(
GET_RTC_COUNTER
()
-
last_wall_rtc
)
*
rtc_nsecs_per_cycle
;
return
rtc_offset
+
(
GET_RTC_COUNTER
()
-
last_wall_rtc
)
*
rtc_nsecs_per_cycle
;
}
static
void
update
(
long
delta_nsec
)
{
last_wall_rtc
=
GET_RTC_COUNTER
();
unsigned
long
rtc_counter
=
GET_RTC_COUNTER
();
unsigned
long
offset
=
rtc_offset
+
(
rtc_counter
-
last_wall_rtc
)
*
rtc_nsecs_per_cycle
;
/* Be careful about signed/unsigned comparisons here: */
if
(
delta_nsec
<
0
||
(
unsigned
long
)
delta_nsec
<
offset
)
rtc_offset
=
offset
-
delta_nsec
;
else
rtc_offset
=
0
;
last_wall_rtc
=
rtc_counter
;
}
static
void
reset
(
void
)
{
rtc_offset
=
0
;
last_wall_rtc
=
GET_RTC_COUNTER
();
}
...
...
include/asm-ia64/timex.h
View file @
4586266b
...
...
@@ -2,7 +2,7 @@
#define _ASM_IA64_TIMEX_H
/*
* Copyright (C) 1998-2001 Hewlett-Packard Co
* Copyright (C) 1998-2001
, 2003
Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
/*
...
...
@@ -25,8 +25,4 @@ get_cycles (void)
return
ret
;
}
extern
unsigned
long
(
*
gettimeoffset
)(
void
);
extern
void
ia64_reset_wall_time
(
void
);
extern
void
ia64_update_wall_time
(
long
delta_nsec
);
#endif
/* _ASM_IA64_TIMEX_H */
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