linux/arch
Christophe Leroy 79c1c594f4 mm/hugetlb: change parameters of arch_make_huge_pte()
Patch series "Subject: [PATCH v2 0/5] Implement huge VMAP and VMALLOC on powerpc 8xx", v2.

This series implements huge VMAP and VMALLOC on powerpc 8xx.

Powerpc 8xx has 4 page sizes:
- 4k
- 16k
- 512k
- 8M

At the time being, vmalloc and vmap only support huge pages which are
leaf at PMD level.

Here the PMD level is 4M, it doesn't correspond to any supported
page size.

For now, implement use of 16k and 512k pages which is done
at PTE level.

Support of 8M pages will be implemented later, it requires use of
hugepd tables.

To allow this, the architecture provides two functions:
- arch_vmap_pte_range_map_size() which tells vmap_pte_range() what
page size to use. A stub returning PAGE_SIZE is provided when the
architecture doesn't provide this function.
- arch_vmap_pte_supported_shift() which tells __vmalloc_node_range()
what page shift to use for a given area size. A stub returning
PAGE_SHIFT is provided when the architecture doesn't provide this
function.

This patch (of 5):

At the time being, arch_make_huge_pte() has the following prototype:

  pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
			   struct page *page, int writable);

vma is used to get the pages shift or size.
vma is also used on Sparc to get vm_flags.
page is not used.
writable is not used.

In order to use this function without a vma, replace vma by shift and
flags.  Also remove the used parameters.

Link: https://lkml.kernel.org/r/cover.1620795204.git.christophe.leroy@csgroup.eu
Link: https://lkml.kernel.org/r/f4633ac6a7da2f22f31a04a89e0a7026bb78b15b.1620795204.git.christophe.leroy@csgroup.eu
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Uladzislau Rezki <uladzislau.rezki@sony.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-30 20:47:26 -07:00
..
alpha alpha: remove DISCONTIGMEM and NUMA 2021-06-29 10:53:55 -07:00
arc arc: remove support for DISCONTIGMEM 2021-06-29 10:53:55 -07:00
arm mm: update legacy flush_tlb_* to use vma 2021-06-29 10:53:52 -07:00
arm64 mm/hugetlb: change parameters of arch_make_huge_pte() 2021-06-30 20:47:26 -07:00
csky arch/csky patches for 5.13-rc1 2021-05-03 12:58:31 -07:00
h8300 h8300: remove unused variable 2021-06-29 10:53:52 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2021-05-07 00:34:51 -07:00
ia64 mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
m68k m68k: remove support for DISCONTIGMEM 2021-06-29 10:53:55 -07:00
microblaze quota: Disable quotactl_path syscall 2021-05-17 14:39:56 +02:00
mips mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
nds32 arch, mm: remove stale mentions of DISCONIGMEM 2021-06-29 10:53:55 -07:00
nios2 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-05-02 09:14:01 -07:00
openrisc mm: update legacy flush_tlb_* to use vma 2021-06-29 10:53:52 -07:00
parisc quota: Disable quotactl_path syscall 2021-05-17 14:39:56 +02:00
powerpc mm/hugetlb: change parameters of arch_make_huge_pte() 2021-06-30 20:47:26 -07:00
riscv mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
s390 mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
sh mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
sparc mm/hugetlb: change parameters of arch_make_huge_pte() 2021-06-30 20:47:26 -07:00
um Merge branch 'akpm' (patches from Andrew) 2021-05-07 00:34:51 -07:00
x86 mm: hugetlb: add a kernel parameter hugetlb_free_vmemmap 2021-06-30 20:47:25 -07:00
xtensa arch, mm: remove stale mentions of DISCONIGMEM 2021-06-29 10:53:55 -07:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Add Landlock, a new LSM from Mickaël Salaün <mic@linux.microsoft.com> 2021-05-01 18:50:44 -07:00