Guo Weikang
c6f239796b
mm/memblock: add memblock_alloc_or_panic interface
...
Before SLUB initialization, various subsystems used memblock_alloc to
allocate memory. In most cases, when memory allocation fails, an
immediate panic is required. To simplify this behavior and reduce
repetitive checks, introduce `memblock_alloc_or_panic`. This function
ensures that memory allocation failures result in a panic automatically,
improving code readability and consistency across subsystems that require
this behavior.
[[email protected] : arch/s390: save_area_alloc default failure behavior changed to panic]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lore.kernel.org/lkml/[email protected] /
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Guo Weikang <[email protected] >
Acked-by: Geert Uytterhoeven <[email protected] > [m68k]
Reviewed-by: Alexander Gordeev <[email protected] > [s390]
Acked-by: Mike Rapoport (Microsoft) <[email protected] >
Cc: Alexander Gordeev <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
2025-01-25 20:22:38 -08:00