Re: [PATCH V3 1/2] ACPI / scan: Support multiple dma windows with different offsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2022/9/9 下午4:04, Lorenzo Pieralisi wrote:
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

Ok, I'll send V4 today.

Thanks,
Jianmin

Reviewed-by: Robin Murphy <robin.murphy@xxxxxxx>

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.


[...]






[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux