1
votes

I have an output buffer in my kernel driver. And that share with my hardware, which uses it for output.

When I got an interrupt, the kernel driver will copy the data from the output buffer to user space buffer.

How can I invalidate cache after my kernel driver copy the output buffer?

1
Which cache, the CPU dcache or some other cache? If you allocated the buffer with kmalloc and GFP_KERNEL, and used copy_to_user to transfer the data to the userspace buffer then there is no cache problem. - Jonathan Ben-Avraham
Did you read the DMA API documentation? - CL.

1 Answers

0
votes

I used dmac_inv_range(). Pass the beginning and the end of the area you want to invalidate.