diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-14 20:13:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-14 20:13:46 -0400 |
commit | c9d26423e56ce1ab4d786f92aebecf859d419293 (patch) | |
tree | 9ad3b09055d299c220fd17fa2715143e859de7f8 /kernel | |
parent | a11c5c9ef6dc562fc7df7aaf7911569a85f4d71c (diff) | |
parent | af5b7e84d022fdea373038d831bb4ca2c0e82108 (diff) |
Merge tag 'pm+acpi-3.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI and power management updates from Rafael Wysocki:
"These are a couple of regression fixes, cpuidle menu governor
optimizations, fixes for ACPI proccessor and battery drivers,
hibernation fix to avoid problems related to the e820 memory map,
fixes for a few cpufreq drivers and a new version of the suspend
profiling tool analyze_suspend.py.
Specifics:
- Fix for an ACPI-based device hotplug regression introduced in 3.14
that causes a kernel panic to trigger when memory hot-remove is
attempted with CONFIG_ACPI_HOTPLUG_MEMORY unset from Tang Chen
- Fix for a cpufreq regression introduced in 3.16 that triggers a
"sleeping function called from invalid context" bug in
dev_pm_opp_init_cpufreq_table() from Stephen Boyd
- ACPI battery driver fix for a warning message added in 3.16 that
prints silly stuff sometimes from Mariusz Ceier
- Hibernation fix for safer handling of mismatches in the 820 memory
map between the configurations during image creation and during the
subsequent restore from Chun-Yi Lee
- ACPI processor driver fix to handle CPU hotplug notifications
correctly during system suspend/resume from Lan Tianyu
- Series of four cpuidle menu governor cleanups that also should
speed it up a bit from Mel Gorman
- Fixes for the speedstep-smi, integrator, cpu0 and arm_big_little
cpufreq drivers from Hans Wennborg, Himangi Saraogi, Markus
Pargmann and Uwe Kleine-König
- Version 3.0 of the analyze_suspend.py suspend profiling tool from
Todd E Brandt"
* tag 'pm+acpi-3.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / battery: Fix warning message in acpi_battery_get_state()
PM / tools: analyze_suspend.py: update to v3.0
cpufreq: arm_big_little: fix module license spec
cpufreq: speedstep-smi: fix decimal printf specifiers
ACPI / hotplug: Check scan handlers in acpi_scan_hot_remove()
cpufreq: OPP: Avoid sleeping while atomic
cpufreq: cpu0: Do not print error message when deferring
cpufreq: integrator: Use set_cpus_allowed_ptr
PM / hibernate: avoid unsafe pages in e820 reserved regions
ACPI / processor: Make acpi_cpu_soft_notify() process CPU FROZEN events
cpuidle: menu: Lookup CPU runqueues less
cpuidle: menu: Call nr_iowait_cpu less times
cpuidle: menu: Use ktime_to_us instead of reinventing the wheel
cpuidle: menu: Use shifts when calculating averages where possible
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/snapshot.c | 21 | ||||
-rw-r--r-- | kernel/sched/core.c | 7 | ||||
-rw-r--r-- | kernel/sched/proc.c | 7 |
3 files changed, 27 insertions, 8 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 4fc5c32422b3..c4b8093c80b3 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -954,6 +954,25 @@ static void mark_nosave_pages(struct memory_bitmap *bm) | |||
954 | } | 954 | } |
955 | } | 955 | } |
956 | 956 | ||
957 | static bool is_nosave_page(unsigned long pfn) | ||
958 | { | ||
959 | struct nosave_region *region; | ||
960 | |||
961 | list_for_each_entry(region, &nosave_regions, list) { | ||
962 | if (pfn >= region->start_pfn && pfn < region->end_pfn) { | ||
963 | pr_err("PM: %#010llx in e820 nosave region: " | ||
964 | "[mem %#010llx-%#010llx]\n", | ||
965 | (unsigned long long) pfn << PAGE_SHIFT, | ||
966 | (unsigned long long) region->start_pfn << PAGE_SHIFT, | ||
967 | ((unsigned long long) region->end_pfn << PAGE_SHIFT) | ||
968 | - 1); | ||
969 | return true; | ||
970 | } | ||
971 | } | ||
972 | |||
973 | return false; | ||
974 | } | ||
975 | |||
957 | /** | 976 | /** |
958 | * create_basic_memory_bitmaps - create bitmaps needed for marking page | 977 | * create_basic_memory_bitmaps - create bitmaps needed for marking page |
959 | * frames that should not be saved and free page frames. The pointers | 978 | * frames that should not be saved and free page frames. The pointers |
@@ -2015,7 +2034,7 @@ static int mark_unsafe_pages(struct memory_bitmap *bm) | |||
2015 | do { | 2034 | do { |
2016 | pfn = memory_bm_next_pfn(bm); | 2035 | pfn = memory_bm_next_pfn(bm); |
2017 | if (likely(pfn != BM_END_OF_MAP)) { | 2036 | if (likely(pfn != BM_END_OF_MAP)) { |
2018 | if (likely(pfn_valid(pfn))) | 2037 | if (likely(pfn_valid(pfn)) && !is_nosave_page(pfn)) |
2019 | swsusp_set_page_free(pfn_to_page(pfn)); | 2038 | swsusp_set_page_free(pfn_to_page(pfn)); |
2020 | else | 2039 | else |
2021 | return -EFAULT; | 2040 | return -EFAULT; |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 1211575a2208..ec1a286684a5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -2393,6 +2393,13 @@ unsigned long nr_iowait_cpu(int cpu) | |||
2393 | return atomic_read(&this->nr_iowait); | 2393 | return atomic_read(&this->nr_iowait); |
2394 | } | 2394 | } |
2395 | 2395 | ||
2396 | void get_iowait_load(unsigned long *nr_waiters, unsigned long *load) | ||
2397 | { | ||
2398 | struct rq *this = this_rq(); | ||
2399 | *nr_waiters = atomic_read(&this->nr_iowait); | ||
2400 | *load = this->cpu_load[0]; | ||
2401 | } | ||
2402 | |||
2396 | #ifdef CONFIG_SMP | 2403 | #ifdef CONFIG_SMP |
2397 | 2404 | ||
2398 | /* | 2405 | /* |
diff --git a/kernel/sched/proc.c b/kernel/sched/proc.c index 16f5a30f9c88..8ecd552fe4f2 100644 --- a/kernel/sched/proc.c +++ b/kernel/sched/proc.c | |||
@@ -8,13 +8,6 @@ | |||
8 | 8 | ||
9 | #include "sched.h" | 9 | #include "sched.h" |
10 | 10 | ||
11 | unsigned long this_cpu_load(void) | ||
12 | { | ||
13 | struct rq *this = this_rq(); | ||
14 | return this->cpu_load[0]; | ||
15 | } | ||
16 | |||
17 | |||
18 | /* | 11 | /* |
19 | * Global load-average calculations | 12 | * Global load-average calculations |
20 | * | 13 | * |