Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271134
| From | Catalin Marinas <catalin.marinas@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC] ARM64: simplify dma_get_ops |
| Date | 2015-11-17 13:30 +0100 |
| Message-ID | <qvNyy-4XK-13@gated-at.bofh.it> (permalink) |
| References | <qvuPg-1bQ-7@gated-at.bofh.it> <qvwR4-2pG-21@gated-at.bofh.it> <qvy6v-3b3-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Nov 16, 2015 at 08:57:41PM +0100, Arnd Bergmann wrote:
> On Monday 16 November 2015 18:39:41 Catalin Marinas wrote:
> > On Mon, Nov 16, 2015 at 05:25:48PM +0100, Arnd Bergmann wrote:
> > > @@ -985,7 +977,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
> > > struct iommu_ops *iommu, bool coherent)
> > > {
> > > if (!acpi_disabled && !dev->archdata.dma_ops)
> > > - dev->archdata.dma_ops = dma_ops;
> > > + dev->archdata.dma_ops = &swiotlb_dma_ops;
> >
> > Why do we still keep the !acpi_disabled check here? If I remove it, the
> > WARN_ON() above disappears.
>
> Ah, good. That must be my mistake then. This looks much better.
I merged this patch with the above change. Thanks.
> On a related note, we should also urgently fix the
> arch_setup_dma_ops() function to no longer ignore the base and size
> arguments. For dma_base, we can simply WARN_ON(dma_base != 0), so we
> can implement support for that whenever we need it,
I think we should, at least until we implement support for
dev->dma_pfn_offset. I'm not sure about iommu though, maybe there are
working configurations with dma_base != 0.
> but for the size we need to prevent drivers from calling
> dma_set_mask() with an argument larger than the size we pass in here,
> unless the size is also larger than max_pfn.
We have a default mask set up in of_dma_configure() based on size and
dma_base. Can we check the new mask against the default one?
--
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC] ARM64: simplify dma_get_ops Arnd Bergmann <arnd@arndb.de> - 2015-11-16 17:30 +0100
Re: [RFC] ARM64: simplify dma_get_ops Catalin Marinas <catalin.marinas@arm.com> - 2015-11-16 19:40 +0100
Re: [RFC] ARM64: simplify dma_get_ops Arnd Bergmann <arnd@arndb.de> - 2015-11-16 21:00 +0100
Re: [RFC] ARM64: simplify dma_get_ops Catalin Marinas <catalin.marinas@arm.com> - 2015-11-17 13:30 +0100
Re: [RFC] ARM64: simplify dma_get_ops Arnd Bergmann <arnd@arndb.de> - 2015-11-17 14:00 +0100
Re: [RFC] ARM64: simplify dma_get_ops Catalin Marinas <catalin.marinas@arm.com> - 2015-11-27 18:00 +0100
Re: [RFC] ARM64: simplify dma_get_ops Arnd Bergmann <arnd@arndb.de> - 2015-11-27 21:50 +0100
csiph-web