Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
6865b7f9
Commit
6865b7f9
authored
Dec 11, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc64: Use clock{source,events}_calc_mult_shift().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
e3f4e1cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
22 deletions
+2
-22
arch/sparc/kernel/time_64.c
arch/sparc/kernel/time_64.c
+2
-22
No files found.
arch/sparc/kernel/time_64.c
View file @
6865b7f9
...
@@ -774,26 +774,9 @@ void __devinit setup_sparc64_timer(void)
...
@@ -774,26 +774,9 @@ void __devinit setup_sparc64_timer(void)
static
struct
clocksource
clocksource_tick
=
{
static
struct
clocksource
clocksource_tick
=
{
.
rating
=
100
,
.
rating
=
100
,
.
mask
=
CLOCKSOURCE_MASK
(
64
),
.
mask
=
CLOCKSOURCE_MASK
(
64
),
.
shift
=
16
,
.
flags
=
CLOCK_SOURCE_IS_CONTINUOUS
,
.
flags
=
CLOCK_SOURCE_IS_CONTINUOUS
,
};
};
static
void
__init
setup_clockevent_multiplier
(
unsigned
long
hz
)
{
unsigned
long
mult
,
shift
=
32
;
while
(
1
)
{
mult
=
div_sc
(
hz
,
NSEC_PER_SEC
,
shift
);
if
(
mult
&&
(
mult
>>
32UL
)
==
0UL
)
break
;
shift
--
;
}
sparc64_clockevent
.
shift
=
shift
;
sparc64_clockevent
.
mult
=
mult
;
}
static
unsigned
long
tb_ticks_per_usec
__read_mostly
;
static
unsigned
long
tb_ticks_per_usec
__read_mostly
;
void
__delay
(
unsigned
long
loops
)
void
__delay
(
unsigned
long
loops
)
...
@@ -828,9 +811,7 @@ void __init time_init(void)
...
@@ -828,9 +811,7 @@ void __init time_init(void)
clocksource_hz2mult
(
freq
,
SPARC64_NSEC_PER_CYC_SHIFT
);
clocksource_hz2mult
(
freq
,
SPARC64_NSEC_PER_CYC_SHIFT
);
clocksource_tick
.
name
=
tick_ops
->
name
;
clocksource_tick
.
name
=
tick_ops
->
name
;
clocksource_tick
.
mult
=
clocksource_calc_mult_shift
(
&
clocksource_tick
,
freq
,
4
);
clocksource_hz2mult
(
freq
,
clocksource_tick
.
shift
);
clocksource_tick
.
read
=
clocksource_tick_read
;
clocksource_tick
.
read
=
clocksource_tick_read
;
printk
(
"clocksource: mult[%x] shift[%d]
\n
"
,
printk
(
"clocksource: mult[%x] shift[%d]
\n
"
,
...
@@ -839,8 +820,7 @@ void __init time_init(void)
...
@@ -839,8 +820,7 @@ void __init time_init(void)
clocksource_register
(
&
clocksource_tick
);
clocksource_register
(
&
clocksource_tick
);
sparc64_clockevent
.
name
=
tick_ops
->
name
;
sparc64_clockevent
.
name
=
tick_ops
->
name
;
clockevents_calc_mult_shift
(
&
sparc64_clockevent
,
freq
,
4
);
setup_clockevent_multiplier
(
freq
);
sparc64_clockevent
.
max_delta_ns
=
sparc64_clockevent
.
max_delta_ns
=
clockevent_delta2ns
(
0x7fffffffffffffffUL
,
&
sparc64_clockevent
);
clockevent_delta2ns
(
0x7fffffffffffffffUL
,
&
sparc64_clockevent
);
...
...
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