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
Kirill Smelkov
linux
Commits
725d7b36
Commit
725d7b36
authored
Oct 28, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] IP27: Fix slice logic to work for arbitrary number of slices.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
84953b39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sgi-ip27/ip27-timer.c
+7
-4
No files found.
arch/mips/sgi-ip27/ip27-timer.c
View file @
725d7b36
...
...
@@ -131,12 +131,12 @@ static struct irq_chip rt_irq_type = {
static
int
rt_next_event
(
unsigned
long
delta
,
struct
clock_event_device
*
evt
)
{
unsigned
int
cpu
=
smp_processor_id
();
int
slice
=
cputoslice
(
cpu
)
==
0
;
int
slice
putoslice
(
cpu
)
;
unsigned
long
cnt
;
cnt
=
LOCAL_HUB_L
(
PI_RT_COUNT
);
cnt
+=
delta
;
LOCAL_HUB_S
(
slice
?
PI_RT_COMPARE_A
:
PI_RT_COMPARE_B
,
cnt
);
LOCAL_HUB_S
(
PI_RT_COMPARE_A
+
PI_COUNT_OFFSET
*
slice
,
cnt
);
return
LOCAL_HUB_L
(
PI_RT_COUNT
)
>=
cnt
?
-
ETIME
:
0
;
}
...
...
@@ -164,9 +164,12 @@ static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
{
struct
clock_event_device
*
cd
=
dev_id
;
unsigned
int
cpu
=
smp_processor_id
();
int
slice
=
cputoslice
(
cpu
)
==
0
;
int
slice
=
cputoslice
(
cpu
);
LOCAL_HUB_S
(
slice
?
PI_RT_PEND_A
:
PI_RT_PEND_B
,
0
);
/* Ack */
/*
* Ack
*/
LOCAL_HUB_S
(
PI_RT_PEND_A
+
PI_COUNT_OFFSET
*
slice
,
cnt
);
cd
->
event_handler
(
cd
);
return
IRQ_HANDLED
;
...
...
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