[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, 19 Feb 2003 11:26:27 -0500 (EST)
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).
| 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?

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    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean