| 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).
|
| Alternatives are:
|
| 1. a really ugly #ifdef in every single driver, which is error-prone and
| likely to break (see drivers/net/starfire.c around line 274 and have a
| barf bag ready).
|
| 2. always cast it to u64, which adds unnecessary overhead to 32-bit
| platforms.
|
| 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.
|
| 4. use the results from pci_set_dma_mask(), which still amounts to
| unnecessary run-time overhead on platforms which have a 32-bit dma_addr_t
| to begin with.
|
| So I think a define in each architecture's types.h file is the cleanest
| way to approach this, and that's what my patch does.
|
| Comments and/or suggestions are appreciated.
| --
Does this help with being able to printk() a <dma_addr_t>? How?
Always use a cast to (u64) or something else?
-- ~Randy - 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/