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);

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training