Commit d42044a
PM: hibernate: Replace deprecated kmap_atomic() with kmap_local_page()
kmap_atomic() is deprecated and should be replaced with kmap_local_page()
[1][2]. kmap_local_page() is faster in kernels with HIGHMEM enabled, can
take page faults, and allows preemption.
According to [2], this replacement is safe as long as the code between
kmap_atomic() and kunmap_atomic() does not implicitly depend on disabling
page faults or preemption. In all of the call sites in this patch, the only
thing happening between mapping and unmapping pages is copy_page() calls,
and I don't suspect they depend on disabling page faults or preemption.
Link: https://lwn.net/Articles/836144/ [1]
Link: https://docs.kernel.org/mm/highmem.html#temporary-virtual-mappings [2]
Signed-off-by: David Reaver <me@davidreaver.com>
Link: https://patch.msgid.link/20250112152658.20132-1-me@davidreaver.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent 0ad2507 commit d42044a
1 file changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2270 | 2270 | | |
2271 | 2271 | | |
2272 | 2272 | | |
2273 | | - | |
| 2273 | + | |
2274 | 2274 | | |
2275 | | - | |
| 2275 | + | |
2276 | 2276 | | |
2277 | 2277 | | |
2278 | 2278 | | |
| |||
2561 | 2561 | | |
2562 | 2562 | | |
2563 | 2563 | | |
2564 | | - | |
| 2564 | + | |
2565 | 2565 | | |
2566 | | - | |
| 2566 | + | |
2567 | 2567 | | |
2568 | 2568 | | |
2569 | 2569 | | |
| |||
2881 | 2881 | | |
2882 | 2882 | | |
2883 | 2883 | | |
2884 | | - | |
2885 | | - | |
| 2884 | + | |
| 2885 | + | |
2886 | 2886 | | |
2887 | 2887 | | |
2888 | 2888 | | |
2889 | | - | |
2890 | | - | |
| 2889 | + | |
| 2890 | + | |
2891 | 2891 | | |
2892 | 2892 | | |
2893 | 2893 | | |
| |||
0 commit comments