kdump: implement reserve_crashkernel_cma
authorJiri Bohac <jbohac@suse.cz>
Thu, 12 Jun 2025 10:16:39 +0000 (12:16 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 20 Jul 2025 02:08:23 +0000 (19:08 -0700)
commitab475510e0422bb5672d465f9d0f523d72fdb7f1
tree4b8674dc85cf5c44d7a0665cf32dd0ae45b6681a
parent35c18f2933c596b4fd6a98baee36f3137d133a5f
kdump: implement reserve_crashkernel_cma

reserve_crashkernel_cma() reserves CMA ranges for the crash kernel.  If
allocating the requested size fails, try to reserve in smaller blocks.

Store the reserved ranges in the crashk_cma_ranges array and the number of
ranges in crashk_cma_cnt.

Link: https://lkml.kernel.org/r/aEqpBwOy_ekm0gw9@dwarf.suse.cz
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Cc: Baoquan He <bhe@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Donald Dutile <ddutile@redhat.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Philipp Rudo <prudo@redhat.com>
Cc: Pingfan Liu <piliu@redhat.com>
Cc: Tao Liu <ltao@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/crash_reserve.h
kernel/crash_reserve.c