Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
50904a7d
Commit
50904a7d
authored
9 years ago
by
Rafael J. Wysocki
Browse files
Options
Downloads
Plain Diff
Merge branches 'acpica', 'acpi-battery' and 'pm-cpuidle'
parents
9e9d55e6
61f8ff69
df8d9eea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
drivers/acpi/sbs.c
+1
-1
1 addition, 1 deletion
drivers/acpi/sbs.c
drivers/cpuidle/cpuidle.c
+16
-0
16 additions, 0 deletions
drivers/cpuidle/cpuidle.c
kernel/sched/idle.c
+2
-14
2 additions, 14 deletions
kernel/sched/idle.c
with
19 additions
and
15 deletions
drivers/acpi/sbs.c
+
1
−
1
View file @
50904a7d
...
...
@@ -684,7 +684,7 @@ static int acpi_sbs_add(struct acpi_device *device)
if
(
!
sbs_manager_broken
)
{
result
=
acpi_manager_get_info
(
sbs
);
if
(
!
result
)
{
sbs
->
manager_present
=
0
;
sbs
->
manager_present
=
1
;
for
(
id
=
0
;
id
<
MAX_SBS_BAT
;
++
id
)
if
((
sbs
->
batteries_supported
&
(
1
<<
id
)))
acpi_battery_add
(
sbs
,
id
);
...
...
This diff is collapsed.
Click to expand it.
drivers/cpuidle/cpuidle.c
+
16
−
0
View file @
50904a7d
...
...
@@ -158,9 +158,18 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
int
entered_state
;
struct
cpuidle_state
*
target_state
=
&
drv
->
states
[
index
];
bool
broadcast
=
!!
(
target_state
->
flags
&
CPUIDLE_FLAG_TIMER_STOP
);
ktime_t
time_start
,
time_end
;
s64
diff
;
/*
* Tell the time framework to switch to a broadcast timer because our
* local timer will be shut down. If a local timer is used from another
* CPU as a broadcast timer, this call may fail if it is not available.
*/
if
(
broadcast
&&
tick_broadcast_enter
())
return
-
EBUSY
;
trace_cpu_idle_rcuidle
(
index
,
dev
->
cpu
);
time_start
=
ktime_get
();
...
...
@@ -169,6 +178,13 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
time_end
=
ktime_get
();
trace_cpu_idle_rcuidle
(
PWR_EVENT_EXIT
,
dev
->
cpu
);
if
(
broadcast
)
{
if
(
WARN_ON_ONCE
(
!
irqs_disabled
()))
local_irq_disable
();
tick_broadcast_exit
();
}
if
(
!
cpuidle_state_is_coupled
(
dev
,
drv
,
entered_state
))
local_irq_enable
();
...
...
This diff is collapsed.
Click to expand it.
kernel/sched/idle.c
+
2
−
14
View file @
50904a7d
...
...
@@ -81,7 +81,6 @@ static void cpuidle_idle_call(void)
struct
cpuidle_device
*
dev
=
__this_cpu_read
(
cpuidle_devices
);
struct
cpuidle_driver
*
drv
=
cpuidle_get_cpu_driver
(
dev
);
int
next_state
,
entered_state
;
unsigned
int
broadcast
;
bool
reflect
;
/*
...
...
@@ -150,17 +149,6 @@ static void cpuidle_idle_call(void)
goto
exit_idle
;
}
broadcast
=
drv
->
states
[
next_state
].
flags
&
CPUIDLE_FLAG_TIMER_STOP
;
/*
* Tell the time framework to switch to a broadcast timer
* because our local timer will be shutdown. If a local timer
* is used from another cpu as a broadcast timer, this call may
* fail if it is not available
*/
if
(
broadcast
&&
tick_broadcast_enter
())
goto
use_default
;
/* Take note of the planned idle state. */
idle_set_state
(
this_rq
(),
&
drv
->
states
[
next_state
]);
...
...
@@ -174,8 +162,8 @@ static void cpuidle_idle_call(void)
/* The cpu is no longer idle or about to enter idle. */
idle_set_state
(
this_rq
(),
NULL
);
if
(
broadcast
)
tick_broadcast_exit
()
;
if
(
entered_state
==
-
EBUSY
)
goto
use_default
;
/*
* Give the governor an opportunity to reflect on the outcome
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment