[lkml]   [1999]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] new bus architecture (+ byte-endianess)
> > (2) will you offer some bus_to_bus address translation functions, for
> > example for supporting DMA from one (PCI) bus to another on PowerPC
> > (PowerPC uses translating bridge)?
> Any translation will be probably done via physical addresses, i.e.
> you translate address on the first bus to a physical address and then
> the physical address to address on the second bus.

This won't probably work with IOMMU. E.g. on sparc64 once we kill GFP_DMA
limiting to first 4GB physical. That's why buses using IOMMU will need some
kind of acquire_dma/acquire_dma_sg/release_dma/release_dma_sg, so that IOMMU
page tables can be dynamically filled up. And if you want to go between two
different cards, then you'll have to use some special function which will
fill two IO page tables if necessary (e.g. SBUS and PCI one). I don't know
if SBUS<->SBUS DMA actually works, there are some bits for it but have never
tried, but PCI<->other PCI should definitely work.

> I'd like to hear the opinion of PPC people, because in case we can get
> automatic conversion LE->BE at no extra cost, DaveM's argument about
> readl_be() being just extra complexity with no benefits is perfectly
> correct.

But you need to take care of the bus endianity in case a system has more
buses with different endians. E.g. say you have SBUS and PCI, SBUS is big
endian and PCI little endian.
So you either stick them into bus_ops (I'd recommend that), plus have some
possibly inlineable functions for each different bus e.g. for cases where a
driver is single bus only and will always be (many are).
So you'd have
read_32(bus_t bus, ptr) which would do bus->bus_ops->read_32(ptr) and then
pci_read_32(ptr) which would be the pci version of the same. All these would
work in its bus native order. Plus if desired to have the LE/BE variants of
these (I'd like them but DaveM apparently does not).

Jakub Jelinek | |
Administrator of SunSITE Czech Republic, MFF, Charles University
UltraLinux | |
Linux version 2.3.4 on a sparc64 machine (1343.49 BogoMips)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:52    [W:0.066 / U:2.876 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site