Messages in this thread | | | Subject | Re: [PATCH] add new DMA_ADDR_T_SIZE define | From | "David S. Miller" <> | Date | 19 Feb 2003 14:01:58 -0800 |
| |
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 time.
> 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |