lkml.org 
[lkml]   [2017]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH v8 15/18] RISC-V: Device, timer, IRQs, and the SBI
From
On Wed, 13 Sep 2017 08:36:54 PDT (-0700), Arnd Bergmann wrote:
> On Tue, Sep 12, 2017 at 11:57 PM, Palmer Dabbelt <palmer@dabbelt.com> wrote:
>
>> +
>> +/* RISC-V TileLink and PCIe share the share address space */
>> +#define PCI_DMA_BUS_IS_PHYS 1
>
> To be pedantic, the comment here is not helpful.

Ya, you're right: TileLink isn't a RISC-V thing, so the comment doesn't even
make sense.

> PCI_DMA_BUS_IS_PHYS is a misnamed symbol that indicates
> the absence of an IOMMU. When it is zero, the scsi and network
> layers assume that they don't need to use bounce buffers
> since the IOMMU can usually address any RAM even if a
> PCI device cannot.

OK. How does this look?

diff --git a/arch/riscv/include/asm/pci.h b/arch/riscv/include/asm/pci.h
index 285747fa2ef0..0f2fc9ef20fc 100644
--- a/arch/riscv/include/asm/pci.h
+++ b/arch/riscv/include/asm/pci.h
@@ -26,7 +26,7 @@
/* RISC-V shim does not initialize PCI bus */
#define pcibios_assign_all_busses() 1

-/* RISC-V TileLink and PCIe share the share address space */
+/* We do not have an IOMMU */
#define PCI_DMA_BUS_IS_PHYS 1

extern int isa_dma_bridge_buggy;
\
 
 \ /
  Last update: 2017-09-13 19:02    [W:0.224 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site