mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
video: tegra: nvmap: Fix build for Linux v6.5
In Linux v6.5, the 'vmas' parameter is removed from get_user_pages() by
commit 54d020692b34 ("mm/gup: remove unused vmas parameter from
get_user_pages()"). Update the conftest script test for
'get_user_pages' to test for this and use the generated definition in
the NVMAP driver accordingly.
Bug 4221847
Change-Id: I3b2b2b9937bba86a8924cf5852fe62d57cd5d3b6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990512
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
9db9eb336c
commit
2fab40f274
@@ -8,6 +8,8 @@
|
||||
#ifndef __VIDEO_TEGRA_NVMAP_NVMAP_H
|
||||
#define __VIDEO_TEGRA_NVMAP_NVMAP_H
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mutex.h>
|
||||
@@ -839,8 +841,13 @@ static inline int nvmap_get_user_pages(ulong vaddr,
|
||||
}
|
||||
pr_debug("vaddr %lu is_user_flags %d user_foll_flags %x foll_flags %x.\n",
|
||||
vaddr, is_user_flags?1:0, user_foll_flags, foll_flags);
|
||||
#if defined(NV_GET_USER_PAGES_HAS_ARGS_FLAGS) /* Linux v6.5 */
|
||||
user_pages = get_user_pages(vaddr & PAGE_MASK, nr_page,
|
||||
foll_flags, pages);
|
||||
#else
|
||||
user_pages = get_user_pages(vaddr & PAGE_MASK, nr_page,
|
||||
foll_flags, pages, NULL);
|
||||
#endif
|
||||
}
|
||||
if (user_pages != nr_page) {
|
||||
ret = user_pages < 0 ? user_pages : -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user