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
87047afa
Commit
87047afa
authored
Jul 25, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sched: convert cpupri_vec lock to atomic_spinlock
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
aadc06f2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
kernel/sched_cpupri.c
kernel/sched_cpupri.c
+5
-5
kernel/sched_cpupri.h
kernel/sched_cpupri.h
+1
-1
No files found.
kernel/sched_cpupri.c
View file @
87047afa
...
...
@@ -119,27 +119,27 @@ void cpupri_set(struct cpupri *cp, int cpu, int newpri)
if
(
likely
(
oldpri
!=
CPUPRI_INVALID
))
{
struct
cpupri_vec
*
vec
=
&
cp
->
pri_to_cpu
[
oldpri
];
spin_lock_irqsave
(
&
vec
->
lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
vec
->
lock
,
flags
);
vec
->
count
--
;
if
(
!
vec
->
count
)
clear_bit
(
oldpri
,
cp
->
pri_active
);
cpumask_clear_cpu
(
cpu
,
vec
->
mask
);
spin_unlock_irqrestore
(
&
vec
->
lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
vec
->
lock
,
flags
);
}
if
(
likely
(
newpri
!=
CPUPRI_INVALID
))
{
struct
cpupri_vec
*
vec
=
&
cp
->
pri_to_cpu
[
newpri
];
spin_lock_irqsave
(
&
vec
->
lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
vec
->
lock
,
flags
);
cpumask_set_cpu
(
cpu
,
vec
->
mask
);
vec
->
count
++
;
if
(
vec
->
count
==
1
)
set_bit
(
newpri
,
cp
->
pri_active
);
spin_unlock_irqrestore
(
&
vec
->
lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
vec
->
lock
,
flags
);
}
*
currpri
=
newpri
;
...
...
@@ -165,7 +165,7 @@ int cpupri_init(struct cpupri *cp, bool bootmem)
for
(
i
=
0
;
i
<
CPUPRI_NR_PRIORITIES
;
i
++
)
{
struct
cpupri_vec
*
vec
=
&
cp
->
pri_to_cpu
[
i
];
spin_lock_init
(
&
vec
->
lock
);
atomic_
spin_lock_init
(
&
vec
->
lock
);
vec
->
count
=
0
;
if
(
!
zalloc_cpumask_var
(
&
vec
->
mask
,
gfp
))
goto
cleanup
;
...
...
kernel/sched_cpupri.h
View file @
87047afa
...
...
@@ -12,7 +12,7 @@
/* values 2-101 are RT priorities 0-99 */
struct
cpupri_vec
{
spinlock_t
lock
;
atomic_
spinlock_t
lock
;
int
count
;
cpumask_var_t
mask
;
};
...
...
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