linux/arch
Arjun Roy 251a0ffeae mm: bring sparc pte_index() semantics inline with other platforms
pte_index() on platforms other than sparc return a numerical index.  On
sparc, it returns a pte_t*.  This presents an issue for
vm_insert_pages(), which relies on pte_index() to find the offset for a
pte within a pmd, for batched inserts.

This patch:
1. Modifies pte_index() for sparc to return a numerical index, like
   other platforms,
2. Defines pte_entry() for sparc which returns a pte_t*
   (as pte_index() used to),
3. Converts existing sparc callers for pte_index() to use pte_entry().

[sfr@canb.auug.org.au: remove pte_entry and just directly modified pte_offset_kernel instead]
Signed-off-by: Arjun Roy <arjunroy@google.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Cc: David Miller <davem@davemloft.net>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Arjun Roy <arjunroy.kdev@gmail.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Link: http://lkml.kernel.org/r/20200227105045.6b421d9f@canb.auug.org.au
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-04-10 15:36:21 -07:00
..
alpha asm-generic: fix unistd_32.h generation format 2020-04-07 10:43:42 -07:00
arc ARC updates for 5.7-rc1 2020-04-03 15:28:42 -07:00
arm - Fix-ups 2020-04-07 19:44:52 -07:00
arm64 mm: hugetlb: optionally allocate gigantic hugepages using cma 2020-04-10 15:36:21 -07:00
c6x SCSI misc on 20200402 2020-04-02 17:03:53 -07:00
csky mm/vma: append unlikely() while testing VMA access permissions 2020-04-07 10:43:38 -07:00
h8300 asm-generic: make more kernel-space headers mandatory 2020-04-02 09:35:25 -07:00
hexagon mm: allow VM_FAULT_RETRY for multiple times 2020-04-02 09:35:30 -07:00
ia64 kasan: stackdepot: move filter_irq_stacks() to stackdepot.c 2020-04-07 10:43:43 -07:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2020-04-09 10:59:56 -07:00
microblaze asm-generic: fix unistd_32.h generation format 2020-04-07 10:43:42 -07:00
mips virtio: fixes, vdpa 2020-04-08 10:51:53 -07:00
nds32 kasan: stackdepot: move filter_irq_stacks() to stackdepot.c 2020-04-07 10:43:43 -07:00
nios2 dma-mapping updates for 5.7 2020-04-04 10:12:47 -07:00
openrisc OpenRISC updates for 5.6 2020-04-07 12:33:37 -07:00
parisc Merge branch 'akpm' (patches from Andrew) 2020-04-07 14:11:54 -07:00
powerpc powerpc updates for 5.7 #2 2020-04-09 11:01:42 -07:00
riscv RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00
s390 s390: 2020-04-08 10:56:50 -07:00
sh asm-generic: fix unistd_32.h generation format 2020-04-07 10:43:42 -07:00
sparc mm: bring sparc pte_index() semantics inline with other platforms 2020-04-10 15:36:21 -07:00
um This pull request contains the following changes for UML: 2020-04-07 12:36:09 -07:00
unicore32 - Fix-ups 2020-04-07 19:44:52 -07:00
x86 mm: hugetlb: optionally allocate gigantic hugepages using cma 2020-04-10 15:36:21 -07:00
xtensa asm-generic: fix unistd_32.h generation format 2020-04-07 10:43:42 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kconfig dma-mapping updates for 5.7 2020-04-04 10:12:47 -07:00