mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
video: tegra: nvmap: Fix build for Linux v6.12
In Linux v6.12, commit ("4ffca5a96678 mm: support only one page_type per
page") removed the definition PAGE_MAPCOUNT_RESERVE and this breaks the
build for NVMAP. The function 'page_has_type()' was added in Linux v5.0
and performs the necessary check and so use this instead to fix the
build.
Bug 4593750
Change-Id: Iaa7393ae11de9730b4ec876a971223e62a7f3f7d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217428
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -784,7 +784,7 @@ static int nvmap_page_mapcount(struct page *page)
|
||||
int mapcount = atomic_read(&page->_mapcount) + 1;
|
||||
|
||||
/* Handle page_has_type() pages */
|
||||
if (mapcount < PAGE_MAPCOUNT_RESERVE + 1)
|
||||
if (page_has_type(page))
|
||||
mapcount = 0;
|
||||
if (unlikely(PageCompound(page)))
|
||||
#if defined(NV_FOLIO_ENTIRE_MAPCOUNT_PRESENT) /* Linux v5.18 */
|
||||
|
||||
Reference in New Issue
Block a user