Welcome to the Linux Foundation Forum!

Block driver aligning BIO buffer address

I am developing a block driver for an embedded device. The device has a DMA controller, but it expects the address to be aligned 8 byte boundary. I have using an example ram disk driver to develop my driver. But when I look at the address that is returned from the BIO, there is no alignment. Is there a way to align it? I have included the code I am using below.

rq_for_each_segment(bv, req, iter)
buffer = page_address(BV_PAGE(bv)) + BV_OFFSET(bv);


Upcoming Training