.. | .. |
---|
610 | 610 | static void __init |
---|
611 | 611 | mvebu_mbus_find_bridge_hole(uint64_t *start, uint64_t *end) |
---|
612 | 612 | { |
---|
613 | | - struct memblock_region *r; |
---|
614 | | - uint64_t s = 0; |
---|
| 613 | + phys_addr_t reg_start, reg_end; |
---|
| 614 | + uint64_t i, s = 0; |
---|
615 | 615 | |
---|
616 | | - for_each_memblock(memory, r) { |
---|
| 616 | + for_each_mem_range(i, ®_start, ®_end) { |
---|
617 | 617 | /* |
---|
618 | 618 | * This part of the memory is above 4 GB, so we don't |
---|
619 | 619 | * care for the MBus bridge hole. |
---|
620 | 620 | */ |
---|
621 | | - if (r->base >= 0x100000000ULL) |
---|
| 621 | + if (reg_start >= 0x100000000ULL) |
---|
622 | 622 | continue; |
---|
623 | 623 | |
---|
624 | 624 | /* |
---|
625 | 625 | * The MBus bridge hole is at the end of the RAM under |
---|
626 | 626 | * the 4 GB limit. |
---|
627 | 627 | */ |
---|
628 | | - if (r->base + r->size > s) |
---|
629 | | - s = r->base + r->size; |
---|
| 628 | + if (reg_end > s) |
---|
| 629 | + s = reg_end; |
---|
630 | 630 | } |
---|
631 | 631 | |
---|
632 | 632 | *start = s; |
---|
.. | .. |
---|
1229 | 1229 | tuple_len = (*cell_count) * sizeof(__be32); |
---|
1230 | 1230 | |
---|
1231 | 1231 | if (ranges_len % tuple_len) { |
---|
1232 | | - pr_warn("malformed ranges entry '%s'\n", node->name); |
---|
| 1232 | + pr_warn("malformed ranges entry '%pOFn'\n", node); |
---|
1233 | 1233 | return -EINVAL; |
---|
1234 | 1234 | } |
---|
1235 | 1235 | return 0; |
---|