mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lpieralisi@kernel.org>
To: Jianmin Lv <lvjianmin@loongson.cn>
Cc: Robin Murphy <robin.murphy@arm.com>,
	chenhuacai@loongson.cn, guohanjun@huawei.com,
	sudeep.holla@arm.com, rafael@kernel.org, lenb@kernel.org,
	robert.moore@intel.com, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org, loongarch@lists.linux.dev
Subject: Re: [PATCH V3 1/2] ACPI / scan: Support multiple dma windows with different offsets
Date: Fri, 9 Sep 2022 10:04:44 +0200	[thread overview]
Message-ID: <YxrznBoBQycR8xCA@lpieralisi> (raw)
In-Reply-To: <66baf6f8-0f18-e0a6-4ed4-e2f783497d2d@loongson.cn>

On Tue, Sep 06, 2022 at 08:40:48PM +0800, Jianmin Lv wrote:
> 
> 
> On 2022/9/5 下午8:20, Robin Murphy wrote:
> > On 2022-08-30 04:01, Jianmin Lv wrote:
> > > For DT, of_dma_get_range returns bus_dma_region typed dma regions,
> > > which makes multiple dma windows with different offset available
> > > for translation between dma address and cpu address.
> > > 
> > > But for ACPI, acpi_dma_get_range doesn't return similar dma regions,
> > > causing no path for setting dev->dma_range_map conveniently. So the
> > > patch changes acpi_dma_get_range and returns bus_dma_region typed
> > > dma regions according to of_dma_get_range.
> > > 
> > > After changing acpi_dma_get_range, acpi_arch_dma_setup is changed for
> > > ARM64, where original dma_addr and size are removed as these
> > > arguments are now redundant, and pass 0 and U64_MAX for dma_base
> > > and size of arch_setup_dma_ops, so this is a simplification consistent
> > > with what other ACPI architectures also pass to iommu_setup_dma_ops().
> > 
> > Other than a micro-nit that acpi_dma_get_range() could probably use
> > resource_size(),
> > 
> 
> Ok, thanks, I'll use resource_size() in acpi_dma_get_range().

Are you reposting this shortly ? We are almost at -rc5, it would
be good if we can proceed promptly.

Thanks,
Lorenzo

> > Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> > 
> > It took me longer than I care to admit to figure out where the implicit
> > declaration of struct bus_dma_region in the scope of acpi.h and
> > acpi_bus.h comes from, but in the end I guess it's sufficiently
> > well-defined by the C spec to be reliable.
> > 
> > Thanks for getting this done!
> > 
> 
> It's a pleasure!
> 
> 
> > Robin.
> > 
> 
> [...]
> 
> 

  reply	other threads:[~2022-09-09  8:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30  3:01 [PATCH V3 0/2] DMA: update acpi_dma_get_range to return dma map regions Jianmin Lv
2022-08-30  3:01 ` [PATCH V3 1/2] ACPI / scan: Support multiple dma windows with different offsets Jianmin Lv
2022-09-05 12:20   ` Robin Murphy
2022-09-06 12:40     ` Jianmin Lv
2022-09-09  8:04       ` Lorenzo Pieralisi [this message]
2022-09-09  9:23         ` Jianmin Lv
2022-08-30  3:01 ` [PATCH V3 2/2] LoongArch: Remove ARCH_HAS_PHYS_TO_DMA Jianmin Lv
2022-09-05 14:42   ` Huacai Chen
2022-09-06 12:34     ` Jianmin Lv
2022-09-05  2:55 ` [PATCH V3 0/2] DMA: update acpi_dma_get_range to return dma map regions Jianmin Lv

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=YxrznBoBQycR8xCA@lpieralisi \
    --to=lpieralisi@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=guohanjun@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=lvjianmin@loongson.cn \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --cc=robin.murphy@arm.com \
    --cc=sudeep.holla@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®