Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1582683 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-02-16 17:20 +0100 |
| Last post | 2017-02-16 17:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask Arnd Bergmann <arnd@arndb.de> - 2017-02-16 17:20 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-02-16 17:20 +0100 |
| Subject | Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask |
| Message-ID | <tbwWJ-kC-11@gated-at.bofh.it> |
On Thursday, December 29, 2016 11:45:03 PM CET Nikita Yushchenko wrote:
>
> static int __swiotlb_dma_supported(struct device *hwdev, u64 mask)
> {
> +#ifdef CONFIG_PCI
> + if (dev_is_pci(hwdev)) {
> + struct pci_dev *pdev = to_pci_dev(hwdev);
> + struct pci_host_bridge *br = pci_find_host_bridge(pdev->bus);
> +
> + if (br->dev.dma_mask && (*br->dev.dma_mask) &&
> + (mask & (*br->dev.dma_mask)) != mask)
> + return 0;
> + }
> +#endif
> if (swiotlb)
> return swiotlb_dma_supported(hwdev, mask);
> return 1;
>
I think it's wrong to make this a special case for PCI.
Instead, we should follow the dma-ranges properties during dma_set_mask()
to ensure we don't set a mask that any of the parents up to the root
cannot support.
Arnd
Back to top | Article view | linux.kernel
csiph-web