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
30fcbe6d
Commit
30fcbe6d
authored
Mar 11, 2003
by
David S. Miller
Committed by
David S. Miller
Mar 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Fix timer quotient calcs.
parent
fc51299f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
arch/sparc64/kernel/time.c
arch/sparc64/kernel/time.c
+7
-3
No files found.
arch/sparc64/kernel/time.c
View file @
30fcbe6d
...
@@ -259,7 +259,8 @@ static struct sparc64_tick_ops stick_operations = {
...
@@ -259,7 +259,8 @@ static struct sparc64_tick_ops stick_operations = {
*/
*/
unsigned
long
timer_tick_offset
;
unsigned
long
timer_tick_offset
;
unsigned
long
timer_tick_compare
;
unsigned
long
timer_tick_compare
;
unsigned
long
timer_ticks_per_usec_quotient
;
static
unsigned
long
timer_ticks_per_usec_quotient
;
#define TICK_SIZE (tick_nsec / 1000)
#define TICK_SIZE (tick_nsec / 1000)
...
@@ -823,11 +824,14 @@ static unsigned long sparc64_init_timers(void (*cfunc)(int, void *, struct pt_re
...
@@ -823,11 +824,14 @@ static unsigned long sparc64_init_timers(void (*cfunc)(int, void *, struct pt_re
return
clock
;
return
clock
;
}
}
/* The quotient formula is taken from the IA64 port. */
void
__init
time_init
(
void
)
void
__init
time_init
(
void
)
{
{
unsigned
long
clock
=
sparc64_init_timers
(
timer_interrupt
);
unsigned
long
clock
=
sparc64_init_timers
(
timer_interrupt
);
timer_ticks_per_usec_quotient
=
((
1UL
<<
32
)
/
(
clock
/
1000020
));
timer_ticks_per_usec_quotient
=
(((
1000000UL
<<
30
)
+
(
clock
/
2
))
/
clock
);
}
}
static
__inline__
unsigned
long
do_gettimeoffset
(
void
)
static
__inline__
unsigned
long
do_gettimeoffset
(
void
)
...
@@ -837,7 +841,7 @@ static __inline__ unsigned long do_gettimeoffset(void)
...
@@ -837,7 +841,7 @@ static __inline__ unsigned long do_gettimeoffset(void)
ticks
+=
timer_tick_offset
;
ticks
+=
timer_tick_offset
;
ticks
-=
timer_tick_compare
;
ticks
-=
timer_tick_compare
;
return
(
ticks
*
timer_ticks_per_usec_quotient
)
>>
3
2
UL
;
return
(
ticks
*
timer_ticks_per_usec_quotient
)
>>
3
0
UL
;
}
}
void
do_settimeofday
(
struct
timeval
*
tv
)
void
do_settimeofday
(
struct
timeval
*
tv
)
...
...
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