Mike Rapoport a7259df767 memblock: make memblock_find_in_range method private
There are a lot of uses of memblock_find_in_range() along with
memblock_reserve() from the times memblock allocation APIs did not exist.

memblock_find_in_range() is the very core of memblock allocations, so any
future changes to its internal behaviour would mandate updates of all the
users outside memblock.

Replace the calls to memblock_find_in_range() with an equivalent calls to
memblock_phys_alloc() and memblock_phys_alloc_range() and make
memblock_find_in_range() private method of memblock.

This simplifies the callers, ensures that (unlikely) errors in
memblock_reserve() are handled and improves maintainability of
memblock_find_in_range().

Link: https://lkml.kernel.org/r/20210816122622.30279-1-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>		[arm64]
Acked-by: Kirill A. Shutemov <kirill.shtuemov@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>	[ACPI]
Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Acked-by: Nick Kossifidis <mick@ics.forth.gr>			[riscv]
Tested-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-09-03 09:58:17 -07:00
..
2021-06-29 13:39:41 -07:00
2021-06-07 11:02:30 +02:00
2020-11-24 16:47:49 +01:00
2021-04-26 15:10:25 -07:00
2021-03-15 16:24:59 +01:00
2021-06-29 12:36:59 -07:00
2021-03-18 15:31:53 +01:00
2021-03-18 15:31:53 +01:00
2021-06-25 19:57:01 -04:00
2021-03-18 15:31:53 +01:00
2021-06-28 12:46:30 -07:00
2020-08-20 13:12:58 +02:00
2021-03-18 15:31:53 +01:00
2020-06-11 15:54:31 -07:00
2020-07-27 14:31:07 -04:00
2021-03-18 15:31:53 +01:00
2020-08-04 14:47:45 -07:00