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
0771c693
Commit
0771c693
authored
Apr 28, 2009
by
Krzysztof Hałasa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IXP42x: Use __fls() in QMgr interrupt handlers.
Signed-off-by:
Krzysztof Hałasa
<
khc@pm.waw.pl
>
parent
d4c9e9fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
+20
-15
No files found.
arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
View file @
0771c693
...
...
@@ -52,14 +52,15 @@ void qmgr_set_irq(unsigned int queue, int src,
static
irqreturn_t
qmgr_irq1_a0
(
int
irq
,
void
*
pdev
)
{
int
i
,
ret
=
0
;
u32
en_bitmap
,
src
,
stat
;
/* ACK - it may clear any bits so don't rely on it */
__raw_writel
(
0xFFFFFFFF
,
&
qmgr_regs
->
irqstat
[
0
]);
for
(
i
=
0
;
i
<
HALF_QUEUES
;
i
++
)
{
u32
src
,
stat
;
i
f
(
!
(
qmgr_regs
->
irqen
[
0
]
&
BIT
(
i
)))
continue
;
en_bitmap
=
qmgr_regs
->
irqen
[
0
];
while
(
en_bitmap
)
{
i
=
__fls
(
en_bitmap
);
/* number of the last "low" queue */
en_bitmap
&=
~
BIT
(
i
)
;
src
=
qmgr_regs
->
irqsrc
[
i
>>
3
];
stat
=
qmgr_regs
->
stat1
[
i
>>
3
];
if
(
src
&
4
)
/* the IRQ condition is inverted */
...
...
@@ -82,9 +83,9 @@ static irqreturn_t qmgr_irq2_a0(int irq, void *pdev)
__raw_writel
(
0xFFFFFFFF
,
&
qmgr_regs
->
irqstat
[
1
]);
req_bitmap
=
qmgr_regs
->
irqen
[
1
]
&
qmgr_regs
->
statne_h
;
for
(
i
=
0
;
i
<
HALF_QUEUES
;
i
++
)
{
i
f
(
!
(
req_bitmap
&
BIT
(
i
)))
continue
;
while
(
req_bitmap
)
{
i
=
__fls
(
req_bitmap
);
/* number of the last "high" queue */
req_bitmap
&=
~
BIT
(
i
)
;
irq_handlers
[
HALF_QUEUES
+
i
](
irq_pdevs
[
HALF_QUEUES
+
i
]);
ret
=
IRQ_HANDLED
;
}
...
...
@@ -95,15 +96,19 @@ static irqreturn_t qmgr_irq2_a0(int irq, void *pdev)
static
irqreturn_t
qmgr_irq
(
int
irq
,
void
*
pdev
)
{
int
i
,
half
=
(
irq
==
IRQ_IXP4XX_QM1
?
0
:
1
);
u32
val
=
__raw_readl
(
&
qmgr_regs
->
irqstat
[
half
]);
__raw_writel
(
val
,
&
qmgr_regs
->
irqstat
[
half
]);
/* ACK */
u32
req_bitmap
=
__raw_readl
(
&
qmgr_regs
->
irqstat
[
half
]);
for
(
i
=
0
;
i
<
HALF_QUEUES
;
i
++
)
if
(
val
&
(
1
<<
i
))
{
int
irq
=
half
*
HALF_QUEUES
+
i
;
irq_handlers
[
irq
](
irq_pdevs
[
irq
]);
}
return
val
?
IRQ_HANDLED
:
0
;
if
(
!
req_bitmap
)
return
0
;
__raw_writel
(
req_bitmap
,
&
qmgr_regs
->
irqstat
[
half
]);
/* ACK */
while
(
req_bitmap
)
{
i
=
__fls
(
req_bitmap
);
/* number of the last queue */
req_bitmap
&=
~
BIT
(
i
);
i
+=
half
*
HALF_QUEUES
;
irq_handlers
[
i
](
irq_pdevs
[
i
]);
}
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