aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/resource.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 35fe105d581e..e7f9d2a5db25 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -454,6 +454,9 @@ int walk_mem_res(u64 start, u64 end, void *arg,
454 * This function calls the @func callback against all memory ranges of type 454 * This function calls the @func callback against all memory ranges of type
455 * System RAM which are marked as IORESOURCE_SYSTEM_RAM and IORESOUCE_BUSY. 455 * System RAM which are marked as IORESOURCE_SYSTEM_RAM and IORESOUCE_BUSY.
456 * It is to be used only for System RAM. 456 * It is to be used only for System RAM.
457 *
458 * This will find System RAM ranges that are children of top-level resources
459 * in addition to top-level System RAM resources.
457 */ 460 */
458int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, 461int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
459 void *arg, int (*func)(unsigned long, unsigned long, void *)) 462 void *arg, int (*func)(unsigned long, unsigned long, void *))
@@ -469,7 +472,7 @@ int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
469 flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY; 472 flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
470 while (start < end && 473 while (start < end &&
471 !find_next_iomem_res(start, end, flags, IORES_DESC_NONE, 474 !find_next_iomem_res(start, end, flags, IORES_DESC_NONE,
472 true, &res)) { 475 false, &res)) {
473 pfn = (res.start + PAGE_SIZE - 1) >> PAGE_SHIFT; 476 pfn = (res.start + PAGE_SIZE - 1) >> PAGE_SHIFT;
474 end_pfn = (res.end + 1) >> PAGE_SHIFT; 477 end_pfn = (res.end + 1) >> PAGE_SHIFT;
475 if (end_pfn > pfn) 478 if (end_pfn > pfn)