public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Leon Romanovsky <leon@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Easwar Hariharan <eahariha@linux.microsoft.com>,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
	Jason Gunthorpe <jgg@nvidia.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v4 2/2] dma: add IOMMU static calls with clear default ops
Date: Fri, 16 Aug 2024 09:11:34 +0200	[thread overview]
Message-ID: <20240816071134.GA2943@lst.de> (raw)
In-Reply-To: <20369981-37c8-482a-9ffa-cf54d12dad2d@arm.com>

On Thu, Aug 15, 2024 at 05:54:49PM +0100, Robin Murphy wrote:
>>   +#ifdef CONFIG_DMA_OPS_HELPERS
>> +#include <asm/dma-mapping.h>
>
> What needs a definition of get_arch_dma_ops() in this scope?
>
>> +struct page *dma_common_alloc_pages(struct device *dev, size_t size,
>> +		dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp);
>> +void dma_common_free_pages(struct device *dev, size_t size, struct page *vaddr,
>> +		dma_addr_t dma_handle, enum dma_data_direction dir);
>
> Why not bring the rest of the dma_common_* declarations in here as well? 
> (Or more literally, add the #ifdef around where they all are already)

We actually don't need the ifdef at all, the calls in mapping.c are
all keyed off compile time constants, so just leaving the stray
prorotypes for this code that won't ever be called around should be
just fine.

>>   	depends on !NO_DMA
>>   	default y
>>   +# DMA IOMMU uses common ops helpers for certain operations, so let's 
>> allow to build
>> +# ops_helpers.c even if DMA_OPS is not enabled
>
> Hmm, but actually dma-direct also uses dma_common_contiguous_remap(), so 
> something seems a little inconsistent here...

Yes, but that's not really new.  I'll look into a patch to select
the helpers based on the conditions that make dma-direct use it.

I'll fix up all style issues and will apply the patch with that over
the weekend so that we can get it into this merge window.


  parent reply	other threads:[~2024-08-16  7:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 18:04 [PATCH v4 0/2] DMA IOMMU static calls Leon Romanovsky
2024-07-24 18:04 ` [PATCH v4 1/2] dma: call unconditionally to unmap_page and unmap_sg callbacks Leon Romanovsky
2024-08-13 12:23   ` Robin Murphy
2024-07-24 18:04 ` [PATCH v4 2/2] dma: add IOMMU static calls with clear default ops Leon Romanovsky
2024-08-15 16:54   ` Robin Murphy
2024-08-15 17:06     ` Leon Romanovsky
2024-08-16  7:11     ` Christoph Hellwig [this message]
2024-08-16  8:13       ` Christoph Hellwig
2024-08-19 13:16       ` Robin Murphy
2024-08-20 12:22         ` Christoph Hellwig
2024-08-27 11:57           ` Robin Murphy
2024-09-04 14:59   ` Nícolas F. R. A. Prado
2024-09-04 15:45     ` Leon Romanovsky
2024-09-04 17:58       ` Nícolas F. R. A. Prado
2024-09-04 18:02         ` Leon Romanovsky
2024-09-10 19:01   ` Nícolas F. R. A. Prado
2024-09-11  6:43     ` Leon Romanovsky
2024-09-11  8:04       ` Christoph Hellwig
2024-09-11  9:05         ` Leon Romanovsky
2024-08-05 12:20 ` [PATCH v4 0/2] DMA IOMMU static calls Leon Romanovsky
2024-08-13  9:58   ` Greg Kroah-Hartman
2024-08-13 11:50     ` Christoph Hellwig

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=20240816071134.GA2943@lst.de \
    --to=hch@lst.de \
    --cc=eahariha@linux.microsoft.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=leon@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox