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
50fee3b3
Commit
50fee3b3
authored
Jul 25, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: Convert c3_lock to atomic_spinlock
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
d227cf76
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+5
-5
No files found.
drivers/acpi/processor_idle.c
View file @
50fee3b3
...
...
@@ -919,7 +919,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
}
static
int
c3_cpu_count
;
static
DEFINE_SPINLOCK
(
c3_lock
);
static
DEFINE_
ATOMIC_
SPINLOCK
(
c3_lock
);
/**
* acpi_idle_enter_bm - enters C3 with proper BM handling
...
...
@@ -994,12 +994,12 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
* without doing anything.
*/
if
(
pr
->
flags
.
bm_check
&&
pr
->
flags
.
bm_control
)
{
spin_lock
(
&
c3_lock
);
atomic_
spin_lock
(
&
c3_lock
);
c3_cpu_count
++
;
/* Disable bus master arbitration when all CPUs are in C3 */
if
(
c3_cpu_count
==
num_online_cpus
())
acpi_write_bit_register
(
ACPI_BITREG_ARB_DISABLE
,
1
);
spin_unlock
(
&
c3_lock
);
atomic_
spin_unlock
(
&
c3_lock
);
}
else
if
(
!
pr
->
flags
.
bm_check
)
{
ACPI_FLUSH_CPU_CACHE
();
}
...
...
@@ -1008,10 +1008,10 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
/* Re-enable bus master arbitration */
if
(
pr
->
flags
.
bm_check
&&
pr
->
flags
.
bm_control
)
{
spin_lock
(
&
c3_lock
);
atomic_
spin_lock
(
&
c3_lock
);
acpi_write_bit_register
(
ACPI_BITREG_ARB_DISABLE
,
0
);
c3_cpu_count
--
;
spin_unlock
(
&
c3_lock
);
atomic_
spin_unlock
(
&
c3_lock
);
}
kt2
=
ktime_get_real
();
idle_time
=
ktime_to_us
(
ktime_sub
(
kt2
,
kt1
));
...
...
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