[lkml]   [2003]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] add new DMA_ADDR_T_SIZE define
On Wed, 2003-02-19 at 08:26, Ion Badulescu wrote:
> This patch adds a new preprocessor define called DMA_ADDR_T_SIZE for all
> architectures, for the benefit of those drivers who care about its size
> (and yes, starfire is one of them).

I don't think you are making things any better by adding
a new ifdef to all the drivers.

> 2. always cast it to u64, which adds unnecessary overhead to 32-bit
> platforms.

Not to HIGHMEM ones. And frankly, trying to super-optimize a driver
because it has two different descriptor format is a mess you as a driver
author choose to get involved in.

Nearly all cards today are 64-bit DMA address descriptors only.
So if anything, this new ifdef will get less and less used over

> 3. use run-time checks all over the place, of the
> "sizeof(dma_addr_t)==sizeof(u64)" kind, which adds unnecessary overhead to
> all platforms.

The compiler optimizes this completely away, it becomes
a compile time test and the unused code block and the test
never make it into the assembler.

So this argument is bogus, as is the define.

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

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