History

Merge tag 'pm+acpi-3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki: "These are regression fixes (ACPI hotplug, cpufreq, hibernation, ACPI LPSS driver), fixes for stuff that never worked correctly (ACPI GPIO support in some cases and a wrong sign of an error code in the ACPI core in one place), and one blacklist item for ACPI backlight handling. Specifics: - Revert of a recent hibernation core commit that introduced a NULL pointer dereference during resume for at least one user (Rafael J Wysocki). - Fix for the ACPI LPSS (Low-Power Subsystem) driver to disable asynchronous PM callback execution for LPSS devices during system suspend/resume (introduced in 3.16) which turns out to break ordering expectations on some systems. From Fu Zhonghui. - cpufreq core fix related to the handling of sysfs nodes during system suspend/resume that has been broken for intel_pstate since 3.15 from Lan Tianyu. - Restore the generation of "online" uevents for ACPI container devices that was removed in 3.14, but some user space utilities turn out to need them (Rafael J Wysocki). - The cpufreq core fails to release a lock in an error code path after changes made in 3.14. Fix from Prarit Bhargava. - ACPICA and ACPI/GPIO fixes to make the handling of ACPI GPIO operation regions (which means AML using GPIOs) work correctly in all cases from Bob Moore and Srinivas Pandruvada. - Fix for a wrong sign of the ACPI core's create_modalias() return value in case of an error from Mika Westerberg. - ACPI backlight blacklist entry for ThinkPad X201s from Aaron Lu" * tag 'pm+acpi-3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "PM / Hibernate: Iterate over set bits instead of PFNs in swsusp_free()" gpio / ACPI: Use pin index and bit length ACPICA: Update to GPIO region handler interface. ACPI / platform / LPSS: disable async suspend/resume of LPSS devices cpufreq: release policy->rwsem on error cpufreq: fix cpufreq suspend/resume for intel_pstate ACPI / scan: Correct error return value of create_modalias() ACPI / video: disable native backlight for ThinkPad X201s ACPI / hotplug: Generate online uevents for ACPI containers

Linus Torvalds committed 12 years ago

Commit f4cb7072 parents 12df9f3 381e63d14 files · +150 −58Browse files

Showing the changes to kernel (1 of 14 files). Show all

Unified · Split

kernel/power/snapshot.c+15−35
@@ -725,14 +725,6 @@ static void memory_bm_clear_bit(struct memory_bitmap *bm, unsigned long pfn) · 724 unmodified lines
725725 clear_bit(bit, addr);
726726 }
727727
728−static void memory_bm_clear_current(struct memory_bitmap *bm)
729−{
730− int bit;
731−
732− bit = max(bm->cur.node_bit - 1, 0);
733− clear_bit(bit, bm->cur.node->data);
734−}
735−
736728 static int memory_bm_test_bit(struct memory_bitmap *bm, unsigned long pfn)
737729 {
738730 void *addr;
@@ -1341,35 +1333,23 @@ static struct memory_bitmap copy_bm; · 602 unmodified lines
13411333
13421334 void swsusp_free(void)
13431335 {
1344− unsigned long fb_pfn, fr_pfn;
1345−
1346− memory_bm_position_reset(forbidden_pages_map);
1347− memory_bm_position_reset(free_pages_map);
1348−
1349−loop:
1350− fr_pfn = memory_bm_next_pfn(free_pages_map);
1351− fb_pfn = memory_bm_next_pfn(forbidden_pages_map);
1352−
1353− /*
1354− * Find the next bit set in both bitmaps. This is guaranteed to
1355− * terminate when fb_pfn == fr_pfn == BM_END_OF_MAP.
1356− */
1357− do {
1358− if (fb_pfn < fr_pfn)
1359− fb_pfn = memory_bm_next_pfn(forbidden_pages_map);
1360− if (fr_pfn < fb_pfn)
1361− fr_pfn = memory_bm_next_pfn(free_pages_map);
1362− } while (fb_pfn != fr_pfn);
1363−
1364− if (fr_pfn != BM_END_OF_MAP && pfn_valid(fr_pfn)) {
1365− struct page *page = pfn_to_page(fr_pfn);
1336+ struct zone *zone;
1337+ unsigned long pfn, max_zone_pfn;
13661338
1367− memory_bm_clear_current(forbidden_pages_map);
1368− memory_bm_clear_current(free_pages_map);
1369− __free_page(page);
1370− goto loop;
1339+ for_each_populated_zone(zone) {
1340+ max_zone_pfn = zone_end_pfn(zone);
1341+ for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++)
1342+ if (pfn_valid(pfn)) {
1343+ struct page *page = pfn_to_page(pfn);
1344+
1345+ if (swsusp_page_is_forbidden(page) &&
1346+ swsusp_page_is_free(page)) {
1347+ swsusp_unset_page_forbidden(page);
1348+ swsusp_unset_page_free(page);
1349+ __free_page(page);
1350+ }
1351+ }
13711352 }
1372−
13731353 nr_copy_pages = 0;
13741354 nr_meta_pages = 0;
13751355 restore_pblist = NULL;