Do not rely on mapping's alignment to decide whether to
use DMA_ATTR_SKIP_IOVA_GAP or not, instead, give priority
to DMA_SKIP_IOVA_GAP always.
This patch confirms if the dma paths which are not using
DMA_ATTR_SKIP_IOVA_GAP are still sane.
Bug
1463797
Change-Id: I3cee5d5ab5c63ea61a4ffcbd3c9f745d68d7e6af
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/488091
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
{
int count = 0;
- /*
- * XXX: assume alignment property's presence <=> prefetch and gap
- * properties are correctly filled
- */
- if (!mapping->alignment) {
- if (!dma_get_attr(DMA_ATTR_SKIP_IOVA_GAP, attrs))
- return PG_PAGES;
- return 0;
- }
+ /* XXX: give priority to DMA_ATTR_SKIP_IOVA_GAP */
+ if (dma_get_attr(DMA_ATTR_SKIP_IOVA_GAP, attrs))
+ return 0;
/* XXX: currently we support only 1 prefetch page */
WARN_ON(mapping->num_pf_page > prefetch_page_count);
{
int count = 0;
- /*
- * XXX: assume alignment property's presence <=> prefetch and gap
- * properties are correctly filled
- */
- if (!mapping->alignment) {
- if (!dma_get_attr(DMA_ATTR_SKIP_IOVA_GAP, attrs))
- return PG_PAGES;
+ /* XXX: give priority to DMA_ATTR_SKIP_IOVA_GAP */
+ if (dma_get_attr(DMA_ATTR_SKIP_IOVA_GAP, attrs))
return 0;
- }
/* XXX: currently we support only 1 prefetch page */
WARN_ON(mapping->num_pf_page > prefetch_page_count);