All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Junxian Huang <huangjunxian6@hisilicon.com>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org, linuxarm@huawei.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH for-next] RDMA/core: Fix ib_core building error when CONFIG_MMU=n
Date: Thu, 8 Aug 2024 11:13:55 +0300	[thread overview]
Message-ID: <20240808081355.GF22826@unreal> (raw)
In-Reply-To: <20240808074026.3535706-1-huangjunxian6@hisilicon.com>

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
> 

      reply	other threads:[~2024-08-08  8:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240808081355.GF22826@unreal \
    --to=leon@kernel.org \
    --cc=huangjunxian6@hisilicon.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.