Re: [PATCH] RFC: kills consistent_dma_mask

From: Krzysztof Halasa
Date: Fri Aug 22 2003 - 07:52:19 EST


I think we should do it the following way:
- adding pci_alloc_consistent_mask(..., u64 mask), pci_map_*_mask(..., mask)
and DMA API friends
- adding a routine checking if a mask is valid on given system
- renaming existing routines to *_nomask and aliasing old names to them.

then:

- migrating drivers from old ones to _mask (the non-trivial part)

then:

- dropping support for _nomasks and then probably renaming _masks to
old names.


alternative, probably a cleaner one - using "int bits" instead of "u64 mask".
Devices tend to be X-bit (32-bit, 64-bit, 28-bit etc) rather than to have
0xFFFFFFFFFFFFFFFFFFFFF masks anyway. And the dma_mask has to be
continuous, right? The "bits" value is much more readable, too. Of course,
moving from bits to mask and vice versa is easy, it could even be a macro.

Unless there are objections I'm going to start with *_bits.
--
Krzysztof Halasa
Network Administrator
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/