linux-stable/arch
Anshuman Khandual 56993b4e14 mm/sparsemem: enable vmem_altmap support in vmemmap_alloc_block_buf()
There are many instances where vmemap allocation is often switched between
regular memory and device memory just based on whether altmap is available
or not.  vmemmap_alloc_block_buf() is used in various platforms to
allocate vmemmap mappings.  Lets also enable it to handle altmap based
device memory allocation along with existing regular memory allocations.
This will help in avoiding the altmap based allocation switch in many
places.  To summarize there are two different methods to call
vmemmap_alloc_block_buf().

vmemmap_alloc_block_buf(size, node, NULL)   /* Allocate from system RAM */
vmemmap_alloc_block_buf(size, node, altmap) /* Allocate from altmap */

This converts altmap_alloc_block_buf() into a static function, drops it's
entry from the header and updates Documentation/vm/memory-model.rst.

Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Jia He <justin.he@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Will Deacon <will@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yu Zhao <yuzhao@google.com>
Link: http://lkml.kernel.org/r/1594004178-8861-3-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-08-07 11:33:27 -07:00
..
alpha asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
arc mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
arm asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
arm64 mm/sparsemem: enable vmem_altmap support in vmemmap_alloc_block_buf() 2020-08-07 11:33:27 -07:00
c6x Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00
csky asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
h8300 fork-v5.9 2020-08-04 14:47:45 -07:00
hexagon asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
ia64 mm/sparsemem: enable vmem_altmap support in vmemmap_populate_basepages() 2020-08-07 11:33:27 -07:00
m68k asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
microblaze asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
mips asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
nds32 asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
nios2 asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
openrisc opeinrisc: switch to generic version of pte allocation 2020-08-07 11:33:26 -07:00
parisc asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
powerpc mm/sparsemem: enable vmem_altmap support in vmemmap_alloc_block_buf() 2020-08-07 11:33:27 -07:00
riscv mm/sparsemem: enable vmem_altmap support in vmemmap_populate_basepages() 2020-08-07 11:33:27 -07:00
s390 mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
sh asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
sparc mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
um asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
x86 mm/sparsemem: enable vmem_altmap support in vmemmap_alloc_block_buf() 2020-08-07 11:33:27 -07:00
xtensa asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
.gitignore
Kconfig It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00