From d57bc533659b6c8670607363b77a67904d76cd55 Mon Sep 17 00:00:00 2001 From: Kartik Rajput Date: Tue, 12 Sep 2023 12:32:37 +0530 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978720 Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/gpu/host1x-nvhost/nvhost.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/host1x-nvhost/nvhost.c b/drivers/gpu/host1x-nvhost/nvhost.c index f6a3f98e..d14fb93a 100644 --- a/drivers/gpu/host1x-nvhost/nvhost.c +++ b/drivers/gpu/host1x-nvhost/nvhost.c @@ -18,6 +18,7 @@ #include #include #include +#include #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->notifier(host1x_cb->notifier_data); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)) + kfree_rcu_mightsleep(host1x_cb); +#else kfree_rcu(host1x_cb); +#endif } int nvhost_intr_register_notifier(struct platform_device *pdev,