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
78a93c96
Commit
78a93c96
authored
Feb 01, 2003
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Remove IRQ desc->enabled in favour of testing disable_depth
parent
a04d2bdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
26 deletions
+24
-26
arch/arm/kernel/irq.c
arch/arm/kernel/irq.c
+22
-23
include/asm-arm/mach/irq.h
include/asm-arm/mach/irq.h
+2
-3
No files found.
arch/arm/kernel/irq.c
View file @
78a93c96
...
...
@@ -78,7 +78,8 @@ static struct irqdesc bad_irq_desc = {
* disable_irq - disable an irq and wait for completion
* @irq: Interrupt to disable
*
* Disable the selected interrupt line. We do this lazily.
* Disable the selected interrupt line. Enables and disables
* are nested. We do this lazily.
*
* This function may be called from IRQ context.
*/
...
...
@@ -88,8 +89,7 @@ void disable_irq(unsigned int irq)
unsigned
long
flags
;
spin_lock_irqsave
(
&
irq_controller_lock
,
flags
);
if
(
!
desc
->
depth
++
)
desc
->
enabled
=
0
;
desc
->
disable_depth
++
;
spin_unlock_irqrestore
(
&
irq_controller_lock
,
flags
);
}
...
...
@@ -107,24 +107,25 @@ void enable_irq(unsigned int irq)
{
struct
irqdesc
*
desc
=
irq_desc
+
irq
;
unsigned
long
flags
;
int
pending
=
0
;
spin_lock_irqsave
(
&
irq_controller_lock
,
flags
);
if
(
unlikely
(
!
desc
->
depth
))
{
if
(
unlikely
(
!
desc
->
d
isable_d
epth
))
{
printk
(
"enable_irq(%u) unbalanced from %p
\n
"
,
irq
,
__builtin_return_address
(
0
));
}
else
if
(
!--
desc
->
depth
)
{
}
else
if
(
!--
desc
->
d
isable_d
epth
)
{
desc
->
probing
=
0
;
desc
->
enabled
=
1
;
desc
->
chip
->
unmask
(
irq
);
pending
=
desc
->
pending
;
desc
->
pending
=
0
;
/*
* If the interrupt was waiting to be processed,
* retrigger it.
* If the interrupt is waiting to be processed,
* try to re-run it. We can't directly run it
* from here since the caller might be in an
* interrupt-protected region.
*/
if
(
pending
)
if
(
desc
->
pending
)
{
desc
->
pending
=
0
;
desc
->
chip
->
rerun
(
irq
);
}
}
spin_unlock_irqrestore
(
&
irq_controller_lock
,
flags
);
}
...
...
@@ -264,7 +265,7 @@ do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
* we shouldn't process the IRQ. Instead, turn on the
* hardware masks.
*/
if
(
unlikely
(
desc
->
running
||
!
desc
->
enabled
))
if
(
unlikely
(
desc
->
running
||
desc
->
disable_depth
))
goto
running
;
/*
...
...
@@ -286,13 +287,13 @@ do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
if
(
!
action
)
break
;
if
(
desc
->
pending
&&
desc
->
enabled
)
{
if
(
desc
->
pending
&&
!
desc
->
disable_depth
)
{
desc
->
pending
=
0
;
desc
->
chip
->
unmask
(
irq
);
}
__do_irq
(
irq
,
action
,
regs
);
}
while
(
desc
->
pending
&&
desc
->
enabled
);
}
while
(
desc
->
pending
&&
!
desc
->
disable_depth
);
desc
->
running
=
0
;
...
...
@@ -328,7 +329,7 @@ do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
*/
desc
->
chip
->
ack
(
irq
);
if
(
likely
(
desc
->
enabled
))
{
if
(
likely
(
!
desc
->
disable_depth
))
{
kstat_cpu
(
cpu
).
irqs
[
irq
]
++
;
/*
...
...
@@ -338,7 +339,7 @@ do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
if
(
action
)
{
__do_irq
(
irq
,
desc
->
action
,
regs
);
if
(
likely
(
desc
->
enabled
&&
if
(
likely
(
!
desc
->
disable_depth
&&
!
check_irq_lock
(
desc
,
irq
,
regs
)))
desc
->
chip
->
unmask
(
irq
);
}
...
...
@@ -390,14 +391,13 @@ void __set_irq_handler(unsigned int irq, irq_handler_t handle, int is_chained)
if
(
handle
==
do_bad_IRQ
)
{
desc
->
chip
->
mask
(
irq
);
desc
->
chip
->
ack
(
irq
);
desc
->
depth
=
1
;
desc
->
enabled
=
0
;
desc
->
disable_depth
=
1
;
}
desc
->
handle
=
handle
;
if
(
handle
!=
do_bad_IRQ
&&
is_chained
)
{
desc
->
valid
=
0
;
desc
->
probe_ok
=
0
;
desc
->
depth
=
0
;
desc
->
d
isable_d
epth
=
0
;
desc
->
chip
->
unmask
(
irq
);
}
spin_unlock_irqrestore
(
&
irq_controller_lock
,
flags
);
...
...
@@ -512,10 +512,9 @@ int setup_irq(unsigned int irq, struct irqaction *new)
desc
->
probing
=
0
;
desc
->
running
=
0
;
desc
->
pending
=
0
;
desc
->
depth
=
1
;
desc
->
d
isable_d
epth
=
1
;
if
(
!
desc
->
noautoenable
)
{
desc
->
depth
=
0
;
desc
->
enabled
=
1
;
desc
->
disable_depth
=
0
;
desc
->
chip
->
unmask
(
irq
);
}
}
...
...
include/asm-arm/mach/irq.h
View file @
78a93c96
...
...
@@ -50,8 +50,8 @@ struct irqdesc {
irq_handler_t
handle
;
struct
irqchip
*
chip
;
struct
irqaction
*
action
;
unsigned
int
disable_depth
;
unsigned
int
enabled
:
1
;
/* IRQ is currently enabled */
unsigned
int
triggered
:
1
;
/* IRQ has occurred */
unsigned
int
running
:
1
;
/* IRQ is running */
unsigned
int
pending
:
1
;
/* IRQ is pending */
...
...
@@ -59,8 +59,7 @@ struct irqdesc {
unsigned
int
probe_ok
:
1
;
/* IRQ can be used for probe */
unsigned
int
valid
:
1
;
/* IRQ claimable */
unsigned
int
noautoenable
:
1
;
/* don't automatically enable IRQ */
unsigned
int
unused
:
23
;
unsigned
int
depth
;
/* disable depth */
unsigned
int
unused
:
25
;
/*
* IRQ lock detection
...
...
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