mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
tegra: nvmap: fix build for kernel 6.0
Fix build for kernel 6.0 onwards. "register_shrinker" expects shrinker name, hence pass the name string. PAGE_KERNEL's Page Protection value needs to be set. Bug 3767126 Change-Id: I71a54891999d0554eaccac6f37d0f1d9c2a65ace Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2776872 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
a2338fa761
commit
a28927a2c2
@@ -159,7 +159,7 @@ int nvmap_cache_maint_phys_range(unsigned int op, phys_addr_t pstart,
|
|||||||
void *base;
|
void *base;
|
||||||
next = min(next, pend);
|
next = min(next, pend);
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||||
io_addr = ioremap_prot(loop, PAGE_SIZE, (unsigned long)PAGE_KERNEL);
|
io_addr = ioremap_prot(loop, PAGE_SIZE, pgprot_val(PAGE_KERNEL));
|
||||||
#else
|
#else
|
||||||
io_addr = __ioremap(loop, PAGE_SIZE, PG_PROT_KERNEL);
|
io_addr = __ioremap(loop, PAGE_SIZE, PG_PROT_KERNEL);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -744,8 +744,11 @@ int nvmap_page_pool_init(struct nvmap_device *dev)
|
|||||||
NULL, "nvmap-bz");
|
NULL, "nvmap-bz");
|
||||||
if (IS_ERR(background_allocator))
|
if (IS_ERR(background_allocator))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||||
|
register_shrinker(&nvmap_page_pool_shrinker, "nvmap_pp_shrinker");
|
||||||
|
#else
|
||||||
register_shrinker(&nvmap_page_pool_shrinker);
|
register_shrinker(&nvmap_page_pool_shrinker);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
fail:
|
fail:
|
||||||
|
|||||||
Reference in New Issue
Block a user