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
nexedi
linux
Commits
92bb6550
Commit
92bb6550
authored
Jan 08, 2004
by
Keith M. Wesolowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Use spinlock to protect IRQ action management.
parent
28922d1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
arch/sparc/kernel/irq.c
arch/sparc/kernel/irq.c
+11
-8
No files found.
arch/sparc/kernel/irq.c
View file @
92bb6550
...
...
@@ -49,6 +49,9 @@
#include <asm/pcic.h>
#include <asm/cacheflush.h>
/* Used to protect the IRQ action lists */
spinlock_t
irq_action_lock
=
SPIN_LOCK_UNLOCKED
;
/*
* Dave Redman (djhr@tadpole.co.uk)
*
...
...
@@ -492,7 +495,7 @@ int request_fast_irq(unsigned int irq,
return
-
EBUSY
;
}
s
ave_and_cli
(
flags
);
s
pin_lock_irqsave
(
&
irq_action_lock
,
flags
);
/* If this is flagged as statically allocated then we use our
* private struct which is never freed.
...
...
@@ -507,10 +510,10 @@ int request_fast_irq(unsigned int irq,
if
(
action
==
NULL
)
action
=
(
struct
irqaction
*
)
kmalloc
(
sizeof
(
struct
irqaction
),
GFP_
KERNEL
);
GFP_
ATOMIC
);
if
(
!
action
)
{
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
irq_action_lock
,
flags
);
return
-
ENOMEM
;
}
...
...
@@ -547,7 +550,7 @@ int request_fast_irq(unsigned int irq,
*
(
cpu_irq
+
irq_action
)
=
action
;
enable_irq
(
irq
);
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
irq_action_lock
,
flags
);
return
0
;
}
...
...
@@ -586,7 +589,7 @@ int request_irq(unsigned int irq,
action
=
NULL
;
/* Or else! */
}
s
ave_and_cli
(
flags
);
s
pin_lock_irqsave
(
&
irq_action_lock
,
flags
);
/* If this is flagged as statically allocated then we use our
* private struct which is never freed.
...
...
@@ -600,10 +603,10 @@ int request_irq(unsigned int irq,
if
(
action
==
NULL
)
action
=
(
struct
irqaction
*
)
kmalloc
(
sizeof
(
struct
irqaction
),
GFP_
KERNEL
);
GFP_
ATOMIC
);
if
(
!
action
)
{
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
irq_action_lock
,
flags
);
return
-
ENOMEM
;
}
...
...
@@ -620,7 +623,7 @@ int request_irq(unsigned int irq,
*
(
cpu_irq
+
irq_action
)
=
action
;
enable_irq
(
irq
);
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
irq_action_lock
,
flags
);
return
0
;
}
...
...
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