diff options
author | Halil Pasic <pasic@linux.ibm.com> | 2024-03-07 15:28:05 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2024-03-13 11:23:45 +0300 |
commit | 8b19e145e82f1bf1419541de7ad823f5cb7a4ec3 (patch) | |
tree | c3a2d3c2f2f064893464908c96f10a49c3710252 /drivers/s390 | |
parent | 1c2be70e651306073e7ef0983b748465e93e651d (diff) | |
download | linux-8b19e145e82f1bf1419541de7ad823f5cb7a4ec3.tar.xz |
s390/cio: introduce bitwise dma types and helper functions
Introduce dma32_t and dma64_t bitwise types, which are supposed to be used
for 31 and 64 bit DMA capable addresses. This allows to use sparse (make
C=1) for type checking, so that incorrect usages can be easily found.
Also add a couple of helper functions which
- convert virtual to DMA addresses and vice versa
- allow for simple logical and arithmetic operations on DMA addresses
- convert DMA addresses to plain u32 and u64 values
All helper functions exist to avoid excessive casting in C code.
Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Co-developed-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
0 files changed, 0 insertions, 0 deletions