Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: introduce new vm_map_pages() and vm_map_pages_zero() API
Patch series "mm: Use vm_map_pages() and vm_map_pages_zero() API", v5. This patch (of 5): Previouly drivers have their own way of mapping range of kernel pages/memory into user vma and this was done by invoking vm_insert_page() within a loop. As this pattern is common across different drivers, it can be generalized by creating new functions and using them across the drivers. vm_map_pages() is the API which can be used to map kernel memory/pages in drivers which have considered vm_pgoff vm_map_pages_zero() is the API which can be used to map a range of kernel memory/pages in drivers which have not considered vm_pgoff. vm_pgoff is passed as default 0 for those drivers. We _could_ then at a later "fix" these drivers which are using vm_map_pages_zero() to behave according to the normal vm_pgoff offsetting simply by removing the _zero suffix on the function name and if that causes regressions, it gives us an easy way to revert. Tested on Rockchip hardware and display is working, including talking to Lima via prime. Link: http://lkml.kernel.org/r/751cb8a0f4c3e67e95c58a3b072937617f338eea.1552921225.git.jrdr.linux@gmail.com Signed-off-by: Souptick Joarder <[email protected]> Suggested-by: Russell King <[email protected]> Suggested-by: Matthew Wilcox <[email protected]> Reviewed-by: Mike Rapoport <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Joonsoo Kim <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Kees Cook <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Stefan Richter <[email protected]> Cc: Sandy Huang <[email protected]> Cc: David Airlie <[email protected]> Cc: Oleksandr Andrushchenko <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Pawel Osciak <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Boris Ostrovsky <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information