Skip to content
Commit 8ad16a4b authored by Mike Rapoport's avatar Mike Rapoport Committed by Xie XiuQi
Browse files

memblock: extend memblock_cap_memory_range to multiple ranges



hulk inclusion
category: feature
bugzilla: 12800
CVE: NA

-------------------------------------------------

The memblock_cap_memory_range() removes all the memory except the
range passed to it. Extend this function to receive an array of
memblock_regions that should be kept. This allows switching to
simple iteration over memblock arrays with 'for_each_mem_range_rev'
to remove the unneeded memory.

Enable use of this function in arm64 for reservation of multiple
regions for the crash kernel.

Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Signed-off-by: default avatarChen Zhou <chenzhou10@huawei.com>
Reviewed-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 19ab5d6d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment