[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8009432a10549bbbda802021562a28b@AcuMS.aculab.com>
Date: Fri, 14 Jun 2019 15:16:43 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Robin Murphy' <robin.murphy@....com>,
'Christoph Hellwig' <hch@....de>
CC: Maxime Ripard <maxime.ripard@...tlin.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
David Airlie <airlied@...ux.ie>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
Intel Linux Wireless <linuxwifi@...el.com>,
"intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
"Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Ian Abbott <abbotti@....co.uk>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Sean Paul <sean@...rly.run>,
"moderated list:ARM PORT" <linux-arm-kernel@...ts.infradead.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
H Hartley Sweeten <hsweeten@...ionengravers.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
Daniel Vetter <daniel@...ll.ch>
Subject: RE: [PATCH 16/16] dma-mapping: use exact allocation in
dma_alloc_contiguous
From: Robin Murphy
> Sent: 14 June 2019 16:06
...
> Well, apart from the bit in DMA-API-HOWTO which has said this since
> forever (well, before Git history, at least):
>
> "The CPU virtual address and the DMA address are both
> guaranteed to be aligned to the smallest PAGE_SIZE order which
> is greater than or equal to the requested size. This invariant
> exists (for example) to guarantee that if you allocate a chunk
> which is smaller than or equal to 64 kilobytes, the extent of the
> buffer you receive will not cross a 64K boundary."
I knew it was somewhere :-)
Interestingly that also implies that the address returned for a size
of (say) 128 will also be page aligned.
In that case 128 byte alignment should probably be ok - but it is still
an API change that could have horrid consequences.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists