Re: 64 bit Descriptors in ADMA of Linux SDHost controller driver.

From: Pierre Ossman
Date: Fri Apr 02 2010 - 13:21:32 EST

On Thu, 1 Apr 2010 14:46:14 -0700
"Ramesh.R" <ramesh.kvp@xxxxxxxxx> wrote:

> Hi Pierre Ossman,
> When we go though the Linux Standard SD Host controller driver(Using the
> Kernel 2.6.33), we saw only the 32 bit Descriptors implemented in it.
> We confirmed this status for 32 bit and 64 bit processors.
> Are these observations correct. Please clarify us.

Quite. The hardware I had at my disposal only supported 32-bit
descriptors and I didn't want to write code that I had no way of

> Also how the 64 bit machines will process the data, if the Descriptors are
> implemented with 32 bit. If they are using the 32 bit and don't care about
> the MSB 32 bits, then there is no major difference in performance wise,
> whether it is 32 or 64 bit processors. Please correct me if my understanding
> is wrong.

The only performance impact that might occur is if you try to transfer
to/from an address above 4 GiB, at which point you need a bounce buffer
and an extra memory copy.

(I believe the kernel does this by default if the driver doesn't
explicitly say that it is 64-bit compatible)

> Also please point us, if we need to use 64 bit addressing for DMA
> descriptors is there any way with the current SD host controller or not.

It's been quite some time since I looked at the driver, but I seem to
recall that adding 64-bit support is not a particularly difficult task.
As long as you have hardware for testing then it is something that you
should be able to sort out with less than a week of work.

-- Pierre Ossman

WARNING: This correspondence is being monitored by FRA, a
Swedish intelligence agency. Make sure your server uses
encryption for SMTP traffic and consider using PGP for
end-to-end encryption.

Attachment: signature.asc
Description: PGP signature