gpu: host1x-nvhost: Fix compilation issues with Kernel-6.5

Upstream commit "7e3f926bf453"

[rcu/kvfree: Eliminate k[v]free_rcu() single argument macro]

Removes the single-argument kvfree_rcu() and kfree_rcu() macros. Code
that would have previously used these single-argument kvfree_rcu() and
kfree_rcu() macros should instead use kvfree_rcu_mightsleep() or
kfree_rcu_mightsleep().

Use kfree_rcu_mightsleep() instead of kfree_rcu() if using Kernel-6.5 or
newer.

Bug 4276500

Change-Id: I5f948dd0d658cf4875a2e0010818f7dde856e55c
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978720
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Kartik Rajput
2023-09-12 12:32:37 +05:30
committed by mobile promotions
parent c563f4b4e4
commit d57bc53365

View File

@@ -18,6 +18,7 @@
#include <linux/reset.h> #include <linux/reset.h>
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/version.h>
#include "falcon.h" #include "falcon.h"
@@ -703,7 +704,11 @@ static void nvhost_intr_do_work(struct work_struct *work)
host1x_cb = container_of(work, struct nvhost_host1x_cb, work); host1x_cb = container_of(work, struct nvhost_host1x_cb, work);
host1x_cb->notifier(host1x_cb->notifier_data); host1x_cb->notifier(host1x_cb->notifier_data);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0))
kfree_rcu_mightsleep(host1x_cb);
#else
kfree_rcu(host1x_cb); kfree_rcu(host1x_cb);
#endif
} }
int nvhost_intr_register_notifier(struct platform_device *pdev, int nvhost_intr_register_notifier(struct platform_device *pdev,