video: tegra: nvmap: Disable read/write APIs for prod_nsr

NvRmMemRead/NvRmMemWrite APIs don't have corresponding requirements in
DriveOS 7.0 Linux NSR. We have taken sign-off from the stakeholders to
confirm that they are not using these APIs in T264 Linux Prod NSR
variant. But some of them are using these APIs in dev_nsr and did not
agree to remove it from dev-nsr, L4T, HOS etc. Hence we need to
make sure that they do not accidentally start using these APIs. Add
bug_on when the corresponding ioctl is called in prod_nsr.

Bug 4980658

Change-Id: Ie9aaa9cc52fc1971b82243bb652d0ee9ce1017ca
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315736
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
This commit is contained in:
Ketan Patil
2025-03-07 16:52:35 +00:00
committed by Jon Hunter
parent d38d017e88
commit a477caa895

View File

@@ -540,6 +540,7 @@ int nvmap_ioctl_rw_handle(struct file *filp, int is_read, void __user *arg,
int handle; int handle;
bool is_ro = false; bool is_ro = false;
BUG_ON(nvmap_dev->support_debug_features == 0);
if (copy_from_user(&op, arg, sizeof(op))) if (copy_from_user(&op, arg, sizeof(op)))
return -EFAULT; return -EFAULT;
addr = op.addr; addr = op.addr;