OSDN Git Service

arm64: Use insert_resource() to simplify code
authorZhen Lei <thunder.leizhen@huawei.com>
Fri, 6 May 2022 11:43:58 +0000 (19:43 +0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Sat, 7 May 2022 18:54:33 +0000 (19:54 +0100)
commite6b394425c615d1596ce7d9de23a3a34ee2e612b
treeaebd8d50194653ed9c3edf44ea7db3aa0842def0
parent2e5920bb073a4e3e69cf8e581836cafc8ba1b464
arm64: Use insert_resource() to simplify code

insert_resource() traverses the subtree layer by layer from the root node
until a proper location is found. Compared with request_resource(), the
parent node does not need to be determined in advance.

In addition, move the insertion of node 'crashk_res' into function
reserve_crashkernel() to make the associated code close together.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: John Donnelly <john.p.donnelly@oracle.com>
Acked-by: Baoquan He <bhe@redhat.com>
Link: https://lore.kernel.org/r/20220506114402.365-3-thunder.leizhen@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/setup.c
arch/arm64/mm/init.c