Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mock-turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
d488046d
Commit
d488046d
authored
Jul 16, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: use for_each_set_bit instead of custom logic
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
ebdd2b16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
mockturtle-hmq.c
software/kernel/mockturtle-hmq.c
+4
-17
No files found.
software/kernel/mockturtle-hmq.c
View file @
d488046d
...
...
@@ -1006,14 +1006,9 @@ irqreturn_t trtl_irq_handler_in(int irq_core_base, void *arg)
dispatch_irq:
n_disp
++
;
i
=
-
1
;
while
(
status
&&
i
<
TRTL_MAX_MQ_CHAN
*
TRTL_MAX_CPU
)
{
++
i
;
if
(
status
&
0x1
)
{
hmq
=
&
trtl
->
cpu
[
i
/
TRTL_MAX_MQ_CHAN
].
hmq
[
i
%
TRTL_MAX_MQ_CHAN
];
trtl_irq_handler_input
(
hmq
);
}
status
>>=
1
;
for_each_set_bit
(
i
,
&
status
,
TRTL_MAX_MQ_CHAN
*
TRTL_MAX_CPU
)
{
hmq
=
&
trtl
->
cpu
[
i
/
TRTL_MAX_MQ_CHAN
].
hmq
[
i
%
TRTL_MAX_MQ_CHAN
];
trtl_irq_handler_input
(
hmq
);
}
status
=
trtl_hmq_irq_status_in
(
trtl
);
...
...
@@ -1123,15 +1118,7 @@ irqreturn_t trtl_irq_handler_out(int irq_core_base, void *arg)
if
(
!
status
)
return
IRQ_NONE
;
i
=
-
1
;
while
(
status
&&
i
<
TRTL_MAX_MQ_CHAN
*
TRTL_MAX_CPU
)
{
++
i
;
if
(
!
(
status
&
0x1
))
{
status
>>=
1
;
continue
;
}
status
>>=
1
;
for_each_set_bit
(
i
,
&
status
,
TRTL_MAX_MQ_CHAN
*
TRTL_MAX_CPU
)
{
hmq
=
&
trtl
->
cpu
[
i
/
TRTL_MAX_MQ_CHAN
].
hmq
[
i
%
TRTL_MAX_MQ_CHAN
];
/*
...
...
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