* [PATCH for-next] RDMA/core: Fix ib_core building error when CONFIG_MMU=n
@ 2024-08-08 7:40 Junxian Huang
2024-08-08 8:13 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Junxian Huang @ 2024-08-08 7:40 UTC (permalink / raw)
To: jgg, leon; +Cc: linux-rdma, linuxarm, linux-kernel, huangjunxian6
zap_vma_ptes() depends on CONFIG_MMU. When CONFIG_MMU=n,
a building error occurs due to the zap_vma_ptes() call in
uverbs_user_mmap_disassociate():
ERROR: modpost: "zap_vma_ptes" [drivers/infiniband/core/ib_core.ko] undefined!
Add "#ifdef CONFIG_MMU" to fix this error.
Fixes: 577b3696166a ("RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap pages")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408072142.mVX227UI-lkp@intel.com/
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
---
drivers/infiniband/core/ib_core_uverbs.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/ib_core_uverbs.c b/drivers/infiniband/core/ib_core_uverbs.c
index 4e27389a75ad..911aec0573cb 100644
--- a/drivers/infiniband/core/ib_core_uverbs.c
+++ b/drivers/infiniband/core/ib_core_uverbs.c
@@ -367,6 +367,7 @@ int rdma_user_mmap_entry_insert(struct ib_ucontext *ucontext,
}
EXPORT_SYMBOL(rdma_user_mmap_entry_insert);
+#ifdef CONFIG_MMU
void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile)
{
struct rdma_umap_priv *priv, *next_priv;
@@ -428,7 +429,6 @@ void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile)
mmput(mm);
}
}
-EXPORT_SYMBOL(uverbs_user_mmap_disassociate);
/**
* rdma_user_mmap_disassociate() - disassociate the mmap from the ucontext.
@@ -449,4 +449,14 @@ void rdma_user_mmap_disassociate(struct ib_ucontext *ucontext)
uverbs_user_mmap_disassociate(ufile);
up_read(&ufile->hw_destroy_rwsem);
}
+#else
+void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile)
+{
+}
+
+void rdma_user_mmap_disassociate(struct ib_ucontext *ucontext)
+{
+}
+#endif
+EXPORT_SYMBOL(uverbs_user_mmap_disassociate);
EXPORT_SYMBOL(rdma_user_mmap_disassociate);
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH for-next] RDMA/core: Fix ib_core building error when CONFIG_MMU=n
2024-08-08 7:40 [PATCH for-next] RDMA/core: Fix ib_core building error when CONFIG_MMU=n Junxian Huang
@ 2024-08-08 8:13 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2024-08-08 8:13 UTC (permalink / raw)
To: Junxian Huang; +Cc: jgg, linux-rdma, linuxarm, linux-kernel
On Thu, Aug 08, 2024 at 03:40:26PM +0800, Junxian Huang wrote:
> zap_vma_ptes() depends on CONFIG_MMU. When CONFIG_MMU=n,
> a building error occurs due to the zap_vma_ptes() call in
> uverbs_user_mmap_disassociate():
>
> ERROR: modpost: "zap_vma_ptes" [drivers/infiniband/core/ib_core.ko] undefined!
>
> Add "#ifdef CONFIG_MMU" to fix this error.
The fix is to return back include which was removed in 577b3696166a ("RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap pages").
I already did it as our wip/* branches are possible to rebase.
Thanks
>
> Fixes: 577b3696166a ("RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap pages")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202408072142.mVX227UI-lkp@intel.com/
> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
> ---
> drivers/infiniband/core/ib_core_uverbs.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/ib_core_uverbs.c b/drivers/infiniband/core/ib_core_uverbs.c
> index 4e27389a75ad..911aec0573cb 100644
> --- a/drivers/infiniband/core/ib_core_uverbs.c
> +++ b/drivers/infiniband/core/ib_core_uverbs.c
> @@ -367,6 +367,7 @@ int rdma_user_mmap_entry_insert(struct ib_ucontext *ucontext,
> }
> EXPORT_SYMBOL(rdma_user_mmap_entry_insert);
>
> +#ifdef CONFIG_MMU
> void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile)
> {
> struct rdma_umap_priv *priv, *next_priv;
> @@ -428,7 +429,6 @@ void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile)
> mmput(mm);
> }
> }
> -EXPORT_SYMBOL(uverbs_user_mmap_disassociate);
>
> /**
> * rdma_user_mmap_disassociate() - disassociate the mmap from the ucontext.
> @@ -449,4 +449,14 @@ void rdma_user_mmap_disassociate(struct ib_ucontext *ucontext)
> uverbs_user_mmap_disassociate(ufile);
> up_read(&ufile->hw_destroy_rwsem);
> }
> +#else
> +void uverbs_user_mmap_disassociate(struct ib_uverbs_file *ufile)
> +{
> +}
> +
> +void rdma_user_mmap_disassociate(struct ib_ucontext *ucontext)
> +{
> +}
> +#endif
> +EXPORT_SYMBOL(uverbs_user_mmap_disassociate);
> EXPORT_SYMBOL(rdma_user_mmap_disassociate);
> --
> 2.33.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-08 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08 7:40 [PATCH for-next] RDMA/core: Fix ib_core building error when CONFIG_MMU=n Junxian Huang
2024-08-08 8:13 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox