android_kernel_xiaomi_sm8350/kernel/power
Rafael J. Wysocki a82f7119fd Hibernation: Fix mark_nosave_pages()
There is a problem in the hibernation code that triggers on some NUMA
systems on which pfn_valid() returns 'true' for some PFNs that don't
belong to any zone.  Namely, there is a BUG_ON() in
memory_bm_find_bit() that triggers for PFNs not belonging to any
zone and passing the pfn_valid() test.  On the affected systems it
triggers when we mark PFNs reported by the platform as not saveable,
because the PFNs in question belong to a region mapped directly using
iorepam() (i.e. the ACPI data area) and they pass the pfn_valid()
test.

Modify memory_bm_find_bit() so that it returns an error if given PFN
doesn't belong to any zone instead of crashing the kernel and ignore
the result returned by it in mark_nosave_pages(), while marking the
"nosave" memory regions.

This doesn't affect the hibernation functionality, as we won't touch
the PFNs in question anyway.

http://bugzilla.kernel.org/show_bug.cgi?id=9966 .

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-11 23:15:55 -04:00
..
console.c
disk.c PM: Introduce PM_EVENT_HIBERNATE callback state 2008-02-23 10:40:04 -08:00
Kconfig PM: documentation cleanups 2008-02-07 01:27:17 -05:00
main.c Suspend: Invoke suspend notifications after console switch 2008-02-01 18:30:58 -05:00
Makefile
pm.c PM: ACPI and APM must not be enabled at the same time 2008-01-11 12:26:47 -05:00
power.h Suspend: Add config option to disable the freezer if architecture wants that 2008-02-01 18:30:58 -05:00
poweroff.c
process.c freezer vs stopped or traced 2008-03-04 07:59:54 -08:00
snapshot.c Hibernation: Fix mark_nosave_pages() 2008-03-11 23:15:55 -04:00
swap.c Hibernation: Update messages 2008-02-01 18:30:55 -05:00
swsusp.c Hibernation: Update messages 2008-02-01 18:30:55 -05:00
user.c Hibernation: Add PM_RESTORE_PREPARE and PM_POST_RESTORE notifiers (rev. 2) 2008-02-01 18:30:53 -05:00