Skip to content
Commit 8b19e145 authored by Halil Pasic's avatar Halil Pasic Committed by Heiko Carstens
Browse files

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: default avatarHalil Pasic <pasic@linux.ibm.com>
Co-developed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Reviewed-by: default avatarSteffen Maier <maier@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 1c2be70e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment