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
a2454cb2
Commit
a2454cb2
authored
Oct 29, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Add disable_irq_nosync() and CPU number headings
parent
e2c6ee0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
6 deletions
+40
-6
arch/arm/kernel/irq.c
arch/arm/kernel/irq.c
+39
-4
include/asm-arm/irq.h
include/asm-arm/irq.h
+1
-2
No files found.
arch/arm/kernel/irq.c
View file @
a2454cb2
...
@@ -86,7 +86,7 @@ static struct irqdesc bad_irq_desc = {
...
@@ -86,7 +86,7 @@ static struct irqdesc bad_irq_desc = {
};
};
/**
/**
* disable_irq
- disable an irq and wait for completion
* disable_irq
_nosync - disable an irq without waiting
* @irq: Interrupt to disable
* @irq: Interrupt to disable
*
*
* Disable the selected interrupt line. Enables and disables
* Disable the selected interrupt line. Enables and disables
...
@@ -94,7 +94,7 @@ static struct irqdesc bad_irq_desc = {
...
@@ -94,7 +94,7 @@ static struct irqdesc bad_irq_desc = {
*
*
* This function may be called from IRQ context.
* This function may be called from IRQ context.
*/
*/
void
disable_irq
(
unsigned
int
irq
)
void
disable_irq
_nosync
(
unsigned
int
irq
)
{
{
struct
irqdesc
*
desc
=
irq_desc
+
irq
;
struct
irqdesc
*
desc
=
irq_desc
+
irq
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -104,6 +104,28 @@ void disable_irq(unsigned int irq)
...
@@ -104,6 +104,28 @@ void disable_irq(unsigned int irq)
list_del_init
(
&
desc
->
pend
);
list_del_init
(
&
desc
->
pend
);
spin_unlock_irqrestore
(
&
irq_controller_lock
,
flags
);
spin_unlock_irqrestore
(
&
irq_controller_lock
,
flags
);
}
}
EXPORT_SYMBOL
(
disable_irq_nosync
);
/**
* disable_irq - disable an irq and wait for completion
* @irq: Interrupt to disable
*
* Disable the selected interrupt line. Enables and disables
* are nested. This functions waits for any pending IRQ
* handlers for this interrupt to complete before returning.
* If you use this function while holding a resource the IRQ
* handler may need you will deadlock.
*
* This function may be called - with care - from IRQ context.
*/
void
disable_irq
(
unsigned
int
irq
)
{
struct
irqdesc
*
desc
=
irq_desc
+
irq
;
disable_irq_nosync
(
irq
);
if
(
desc
->
action
)
synchronize_irq
(
irq
);
}
EXPORT_SYMBOL
(
disable_irq
);
EXPORT_SYMBOL
(
disable_irq
);
/**
/**
...
@@ -175,17 +197,30 @@ EXPORT_SYMBOL(disable_irq_wake);
...
@@ -175,17 +197,30 @@ EXPORT_SYMBOL(disable_irq_wake);
int
show_interrupts
(
struct
seq_file
*
p
,
void
*
v
)
int
show_interrupts
(
struct
seq_file
*
p
,
void
*
v
)
{
{
int
i
=
*
(
loff_t
*
)
v
;
int
i
=
*
(
loff_t
*
)
v
,
cpu
;
struct
irqaction
*
action
;
struct
irqaction
*
action
;
unsigned
long
flags
;
unsigned
long
flags
;
if
(
i
==
0
)
{
char
cpuname
[
12
];
seq_printf
(
p
,
" "
);
for_each_present_cpu
(
cpu
)
{
sprintf
(
cpuname
,
"CPU%d"
,
cpu
);
seq_printf
(
p
,
" %10s"
,
cpuname
);
}
seq_putc
(
p
,
'\n'
);
}
if
(
i
<
NR_IRQS
)
{
if
(
i
<
NR_IRQS
)
{
spin_lock_irqsave
(
&
irq_controller_lock
,
flags
);
spin_lock_irqsave
(
&
irq_controller_lock
,
flags
);
action
=
irq_desc
[
i
].
action
;
action
=
irq_desc
[
i
].
action
;
if
(
!
action
)
if
(
!
action
)
goto
unlock
;
goto
unlock
;
seq_printf
(
p
,
"%3d: %10u "
,
i
,
kstat_irqs
(
i
));
seq_printf
(
p
,
"%3d: "
,
i
);
for_each_present_cpu
(
cpu
)
seq_printf
(
p
,
"%10u "
,
kstat_cpu
(
cpu
).
irqs
[
i
]);
seq_printf
(
p
,
" %s"
,
action
->
name
);
seq_printf
(
p
,
" %s"
,
action
->
name
);
for
(
action
=
action
->
next
;
action
;
action
=
action
->
next
)
for
(
action
=
action
->
next
;
action
;
action
=
action
->
next
)
seq_printf
(
p
,
", %s"
,
action
->
name
);
seq_printf
(
p
,
", %s"
,
action
->
name
);
...
...
include/asm-arm/irq.h
View file @
a2454cb2
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
struct
irqaction
;
struct
irqaction
;
#define disable_irq_nosync(i) disable_irq(i)
extern
void
disable_irq_nosync
(
unsigned
int
);
extern
void
disable_irq
(
unsigned
int
);
extern
void
disable_irq
(
unsigned
int
);
extern
void
enable_irq
(
unsigned
int
);
extern
void
enable_irq
(
unsigned
int
);
...
...
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