resource: add walk_system_ram_res_rev()
authorBaoquan He <bhe@redhat.com>
Wed, 15 Nov 2023 13:00:27 +0000 (21:00 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Dec 2023 01:21:44 +0000 (17:21 -0800)
commit7acf164b259d9007264d9d8501da1023f140a3b4
tree994fc9459720df4d8e4088eb401e987337d66f8c
parentbfc4372b86085ec947fdcef20cbe40c55066394f
resource: add walk_system_ram_res_rev()

This function, being a variant of walk_system_ram_res() introduced in
commit 8c86e70acead ("resource: provide new functions to walk through
resources"), walks through a list of all the resources of System RAM in
reversed order, i.e., from higher to lower.

It will be used in kexec_file code to load kernel, initrd etc when
preparing kexec reboot.

Link: https://lkml.kernel.org/r/ZVTA6z/06cLnWKUz@MiWiFi-R3L-srv
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/ioport.h
kernel/resource.c