mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 20:30:52 +08:00
busdma: Option to round to cache lines on sync
Some targets support only flushing or invalidating complete cache lines. In this cases misaligned buffers might lead to unexpected results. This patch adds a flag that allows drivers to signal to the bus dma driver that it is OK to round a buffer to the next full cache line. That's for example necessary if a driver wants to send out 14 byte via a USB DMA. Only the driver knows whether these 14 bytes are located in an otherwise unused cache line aligned buffer.
This commit is contained in:
@@ -75,6 +75,9 @@ struct bus_dma_tag {
|
||||
struct bus_dmamap {
|
||||
void *buffer_begin;
|
||||
bus_size_t buffer_size;
|
||||
int flags;
|
||||
/* OK to flush / invalidate the complete cache line */
|
||||
#define DMAMAP_CACHE_ALIGNED (1 << 0)
|
||||
};
|
||||
|
||||
int
|
||||
|
Reference in New Issue
Block a user