lkml.org 
[lkml]   [2022]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 1/2] ACPI / scan: Support multiple dma windows with different offsets
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.
> >
>
> [...]
>
>

\
 
 \ /
  Last update: 2022-09-09 10:05    [W:0.049 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site