mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: API updates for newer kernel
access_ok, totalram_pages and zap_vma_ptes are updated in the newer kernel. Update accordingly. Bug 2834141 Change-Id: I3097308740f1af3092ac0a5ac2f0146db8148e12 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2294097 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
d0d8ef79d1
commit
6c4a0bb6cd
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Virtualized GPU for Linux
|
||||
*
|
||||
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -470,7 +470,11 @@ int vgpu_probe(struct platform_device *pdev)
|
||||
vgpu_create_sysfs(dev);
|
||||
nvgpu_gr_init(gk20a);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
nvgpu_log_info(gk20a, "total ram pages : %lu", totalram_pages());
|
||||
#else
|
||||
nvgpu_log_info(gk20a, "total ram pages : %lu", totalram_pages);
|
||||
#endif
|
||||
gk20a->max_comptag_mem = totalram_size_in_mb;
|
||||
|
||||
nvgpu_ref_init(&gk20a->refcount);
|
||||
|
||||
Reference in New Issue
Block a user