linux-stable/arch
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
..
alpha libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
arc ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch 2021-08-03 18:58:33 -07:00
arm memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
arm64 memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
csky mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
h8300 libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
hexagon Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
ia64 ia64: make num_rsvd_regions static 2021-09-03 09:58:09 -07:00
m68k libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
microblaze microblaze: simplify pte_alloc_one_kernel() 2021-09-03 09:58:15 -07:00
mips memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
nds32 mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
nios2 Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
openrisc Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
parisc mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
powerpc mm: sparse: pass section_nr to find_memory_block 2021-09-03 09:58:14 -07:00
riscv memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
s390 memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
sh mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
sparc Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
um Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
x86 memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
xtensa libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR 2021-06-22 11:07:18 -07:00