Lines Matching refs:flat_buf
599 struct etr_flat_buf *flat_buf; in tmc_etr_alloc_flat_buf() local
606 flat_buf = kzalloc(sizeof(*flat_buf), GFP_KERNEL); in tmc_etr_alloc_flat_buf()
607 if (!flat_buf) in tmc_etr_alloc_flat_buf()
610 flat_buf->vaddr = dma_alloc_noncoherent(real_dev, etr_buf->size, in tmc_etr_alloc_flat_buf()
611 &flat_buf->daddr, in tmc_etr_alloc_flat_buf()
613 if (!flat_buf->vaddr) { in tmc_etr_alloc_flat_buf()
614 kfree(flat_buf); in tmc_etr_alloc_flat_buf()
618 flat_buf->size = etr_buf->size; in tmc_etr_alloc_flat_buf()
619 flat_buf->dev = &drvdata->csdev->dev; in tmc_etr_alloc_flat_buf()
620 etr_buf->hwaddr = flat_buf->daddr; in tmc_etr_alloc_flat_buf()
622 etr_buf->private = flat_buf; in tmc_etr_alloc_flat_buf()
628 struct etr_flat_buf *flat_buf = etr_buf->private; in tmc_etr_free_flat_buf() local
630 if (flat_buf && flat_buf->daddr) { in tmc_etr_free_flat_buf()
631 struct device *real_dev = flat_buf->dev->parent; in tmc_etr_free_flat_buf()
634 flat_buf->vaddr, flat_buf->daddr, in tmc_etr_free_flat_buf()
637 kfree(flat_buf); in tmc_etr_free_flat_buf()
642 struct etr_flat_buf *flat_buf = etr_buf->private; in tmc_etr_sync_flat_buf() local
643 struct device *real_dev = flat_buf->dev->parent; in tmc_etr_sync_flat_buf()
661 dma_sync_single_for_cpu(real_dev, flat_buf->daddr, in tmc_etr_sync_flat_buf()
665 flat_buf->daddr + etr_buf->offset, in tmc_etr_sync_flat_buf()
672 struct etr_flat_buf *flat_buf = etr_buf->private; in tmc_etr_get_data_flat_buf() local
674 *bufpp = (char *)flat_buf->vaddr + offset; in tmc_etr_get_data_flat_buf()