]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcde2067df449dc297c69ab5dd60e170d6ffe050c
treeaebd8d50194653ed9c3edf44ea7db3aa0842def0
parent2ae759b5043d2c8000df963b99724def2865e887
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