All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Tianyu Lan <ltykernel@gmail.com>
Cc: hch@infradead.org, m.szyprowski@samsung.com,
	robin.murphy@arm.com, michael.h.kelley@microsoft.com,
	kys@microsoft.com, Tianyu Lan <Tianyu.Lan@microsoft.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	vkuznets@redhat.com, brijesh.singh@amd.com,
	konrad.wilk@oracle.com, hch@lst.de, wei.liu@kernel.org,
	parri.andrea@gmail.com, thomas.lendacky@amd.com,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] Swiotlb: Add CONFIG_HAS_IOMEM check around memremap() in the swiotlb_mem_remap()
Date: Sun, 2 Jan 2022 23:54:46 -0800	[thread overview]
Message-ID: <YdKrxgnpT0Dc0t2T@infradead.org> (raw)
In-Reply-To: <20211231165640.1245751-1-ltykernel@gmail.com>

On Fri, Dec 31, 2021 at 11:56:40AM -0500, Tianyu Lan wrote:
> From: Tianyu Lan <Tianyu.Lan@microsoft.com>
> 
> HAS_IOMEM option may not be selected on some platforms(e.g, s390) and this
> will cause compile error due to miss memremap() implementation. Fix it via
> adding HAS_IOMEM check around memremap() in the swiotlb.c.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
> ---
>  kernel/dma/swiotlb.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> index b36c1cdd0c4f..3de651ba38cc 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
> @@ -167,6 +167,7 @@ static void *swiotlb_mem_remap(struct io_tlb_mem *mem, unsigned long bytes)
>  {
>  	void *vaddr = NULL;
>  
> +#ifdef CONFIG_HAS_IOMEM

Please stub out all of swiotlb_mem_remap instead of the ifdef inside the
function.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Tianyu Lan <ltykernel@gmail.com>
Cc: parri.andrea@gmail.com, michael.h.kelley@microsoft.com,
	wei.liu@kernel.org, Tianyu Lan <Tianyu.Lan@microsoft.com>,
	kernel test robot <lkp@intel.com>,
	konrad.wilk@oracle.com, linux-kernel@vger.kernel.org,
	hch@infradead.org, iommu@lists.linux-foundation.org,
	thomas.lendacky@amd.com, brijesh.singh@amd.com,
	vkuznets@redhat.com, kys@microsoft.com, robin.murphy@arm.com,
	hch@lst.de
Subject: Re: [PATCH] Swiotlb: Add CONFIG_HAS_IOMEM check around memremap() in the swiotlb_mem_remap()
Date: Sun, 2 Jan 2022 23:54:46 -0800	[thread overview]
Message-ID: <YdKrxgnpT0Dc0t2T@infradead.org> (raw)
In-Reply-To: <20211231165640.1245751-1-ltykernel@gmail.com>

On Fri, Dec 31, 2021 at 11:56:40AM -0500, Tianyu Lan wrote:
> From: Tianyu Lan <Tianyu.Lan@microsoft.com>
> 
> HAS_IOMEM option may not be selected on some platforms(e.g, s390) and this
> will cause compile error due to miss memremap() implementation. Fix it via
> adding HAS_IOMEM check around memremap() in the swiotlb.c.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
> ---
>  kernel/dma/swiotlb.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> index b36c1cdd0c4f..3de651ba38cc 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
> @@ -167,6 +167,7 @@ static void *swiotlb_mem_remap(struct io_tlb_mem *mem, unsigned long bytes)
>  {
>  	void *vaddr = NULL;
>  
> +#ifdef CONFIG_HAS_IOMEM

Please stub out all of swiotlb_mem_remap instead of the ifdef inside the
function.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2022-01-03  7:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31 16:56 [PATCH] Swiotlb: Add CONFIG_HAS_IOMEM check around memremap() in the swiotlb_mem_remap() Tianyu Lan
2021-12-31 16:56 ` Tianyu Lan
2022-01-02 16:23 ` Wei Liu
2022-01-02 16:23   ` Wei Liu
2022-01-03  7:54 ` Christoph Hellwig [this message]
2022-01-03  7:54   ` Christoph Hellwig
2022-01-04 14:51   ` Wei Liu
2022-01-04 14:51     ` Wei Liu
2022-01-04 15:03     ` Christoph Hellwig
2022-01-04 15:03       ` Christoph Hellwig
2022-01-04 16:10       ` Wei Liu
2022-01-04 16:10         ` Wei Liu

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=YdKrxgnpT0Dc0t2T@infradead.org \
    --to=hch@infradead.org \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=brijesh.singh@amd.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=ltykernel@gmail.com \
    --cc=m.szyprowski@samsung.com \
    --cc=michael.h.kelley@microsoft.com \
    --cc=parri.andrea@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vkuznets@redhat.com \
    --cc=wei.liu@kernel.org \
    /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.