pagewalk: separate function pointers from iterator data
The mm_walk structure currently mixed data and code. Split out the operations vectors into a new mm_walk_ops structure, and while we are changing the API also declare the mm_walk structure inside the walk_page_range and walk_page_vma functions. Based on patch from Linus Torvalds. Link: https://lore.kernel.org/r/20190828141955.22210-3-hch@lst.de Signed-off-by:Christoph Hellwig <hch@lst.de> Reviewed-by:
Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by:
Steven Price <steven.price@arm.com> Reviewed-by:
Jason Gunthorpe <jgg@mellanox.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
Showing
- arch/openrisc/kernel/dma.c 12 additions, 10 deletionsarch/openrisc/kernel/dma.c
- arch/powerpc/mm/book3s64/subpage_prot.c 5 additions, 5 deletionsarch/powerpc/mm/book3s64/subpage_prot.c
- arch/s390/mm/gmap.c 15 additions, 18 deletionsarch/s390/mm/gmap.c
- fs/proc/task_mmu.c 41 additions, 37 deletionsfs/proc/task_mmu.c
- include/linux/pagewalk.h 38 additions, 26 deletionsinclude/linux/pagewalk.h
- mm/hmm.c 11 additions, 12 deletionsmm/hmm.c
- mm/madvise.c 12 additions, 29 deletionsmm/madvise.c
- mm/memcontrol.c 11 additions, 12 deletionsmm/memcontrol.c
- mm/mempolicy.c 7 additions, 8 deletionsmm/mempolicy.c
- mm/migrate.c 11 additions, 12 deletionsmm/migrate.c
- mm/mincore.c 7 additions, 8 deletionsmm/mincore.c
- mm/mprotect.c 9 additions, 15 deletionsmm/mprotect.c
- mm/pagewalk.c 72 additions, 52 deletionsmm/pagewalk.c
Loading
Please register or sign in to comment