Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FlightOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Armin Luntzer
FlightOS
Commits
01757b59
Commit
01757b59
authored
8 years ago
by
Armin Luntzer
Browse files
Options
Downloads
Patches
Plain Diff
IRQ: pass irq number in call to handler
parent
a3ce393e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/sparc/kernel/irq.c
+9
-5
9 additions, 5 deletions
arch/sparc/kernel/irq.c
include/kernel/irq.h
+1
-1
1 addition, 1 deletion
include/kernel/irq.h
with
10 additions
and
6 deletions
arch/sparc/kernel/irq.c
+
9
−
5
View file @
01757b59
...
...
@@ -424,6 +424,10 @@ static int leon_irq_queue(struct irl_vector_elem *p_elem)
/**
*
* @brief execute deferred (low-priority) handlers
*
* @note see todo
* @todo TODO we do not track deferred handler IRQ numbers, so we'll just
* pass -1 for now and hope the user knows what he's doing -.-
*/
void
leon_irq_queue_execute
(
void
)
...
...
@@ -442,7 +446,7 @@ void leon_irq_queue_execute(void)
if
(
likely
(
p_elem
->
handler
))
{
if
(
p_elem
->
handler
(
p_elem
->
data
))
if
(
p_elem
->
handler
(
-
1
,
p_elem
->
data
))
leon_irq_queue
(
p_elem
);
else
list_add_tail
(
&
p_elem
->
handler_node
,
...
...
@@ -480,9 +484,9 @@ static int leon_irq_dispatch(unsigned int irq)
list_for_each_entry
(
p_elem
,
&
irl_vector
[
irq
],
handler_node
)
{
if
(
likely
(
p_elem
->
priority
==
ISR_PRIORITY_NOW
))
p_elem
->
handler
(
p_elem
->
data
);
p_elem
->
handler
(
irq
,
p_elem
->
data
);
else
if
(
leon_irq_queue
(
p_elem
)
<
0
)
p_elem
->
handler
(
p_elem
->
data
);
p_elem
->
handler
(
irq
,
p_elem
->
data
);
}
return
0
;
...
...
@@ -557,9 +561,9 @@ static int leon_eirq_dispatch(unsigned int irq)
* queueing fails
*/
if
(
likely
(
p_elem
->
priority
==
ISR_PRIORITY_NOW
))
p_elem
->
handler
(
p_elem
->
data
);
p_elem
->
handler
(
eirq
,
p_elem
->
data
);
else
if
(
leon_irq_queue
(
p_elem
)
<
0
)
p_elem
->
handler
(
p_elem
->
data
);
p_elem
->
handler
(
eirq
,
p_elem
->
data
);
}
}
...
...
This diff is collapsed.
Click to expand it.
include/kernel/irq.h
+
1
−
1
View file @
01757b59
...
...
@@ -29,7 +29,7 @@ enum irqreturn {
typedef
enum
irqreturn
irqreturn_t
;
typedef
irqreturn_t
(
*
irq_handler_t
)(
void
*
);
typedef
irqreturn_t
(
*
irq_handler_t
)(
unsigned
int
irq
,
void
*
);
enum
isr_exec_priority
{
ISR_PRIORITY_NOW
,
ISR_PRIORITY_DEFERRED
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment