55 const char *file,
unsigned int line ) {
60 okx ( iobuf !=
NULL, file, line );
61 DBGC ( &iobuf_test,
"IOBUF %p (%#08lx+%#zx) for %#zx align %#zx " 66 okx ( ( ( (
intptr_t ) iobuf ) & ( __alignof__ ( *iobuf ) - 1 ) ) == 0,
79 #define alloc_iob_ok( len, align, offset ) \ 80 alloc_iob_okx ( len, align, offset, __FILE__, __LINE__ ) 92 const char *file,
unsigned int line ) {
97 okx ( iobuf ==
NULL, file, line );
99 #define alloc_iob_fail_ok( len, align, offset ) \ 100 alloc_iob_fail_okx ( len, align, offset, __FILE__, __LINE__ ) static __always_inline void struct dma_mapping size_t size_t align
#define iob_put(iobuf, len)
static void iobuf_test_exec(void)
Perform I/O buffer self-tests.
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
struct io_buffer * alloc_iob_raw(size_t len, size_t align, size_t offset)
Allocate I/O buffer with specified alignment and offset.
Self-test infrastructure.
const char * name
Test set name.
static __always_inline unsigned long virt_to_phys(volatile const void *addr)
Convert virtual address to a physical address.
#define okx(success, file, line)
Report test result.
#define alloc_iob_fail_ok(len, align, offset)
static size_t iob_tailroom(struct io_buffer *iobuf)
Calculate available space at end of an I/O buffer.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static void alloc_iob_fail_okx(size_t len, size_t align, size_t offset, const char *file, unsigned int line)
Report I/O buffer allocation failure test result.
void * data
Start of data.
uint16_t offset
Offset to command line.
static void alloc_iob_okx(size_t len, size_t align, size_t offset, const char *file, unsigned int line)
Report I/O buffer allocation test result.
struct self_test iobuf_test __self_test
I/O buffer self-test.
#define NULL
NULL pointer (VOID *)
#define alloc_iob_ok(len, align, offset)
void * memset(void *dest, int character, size_t len) __nonnull