lkml.org 
[lkml]   [2015]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask
On (07/19/15 22:25), Rasmus Villemoes wrote:
>
> Wouldn't GENMASK(align_order-1, 0) work for all cases (assuming
> align_order has a sane value)?

Devices with limits on DMA masks are uncommon, so I'm personally
not an expert at all the variations in this space, but I was thinking
that this doing

align_mask = 0xffffffffffffffffull >> (64 - align_order);

would be the compact answer for both 32 and 64 bit cases here?

--Sowmini



\
 
 \ /
  Last update: 2015-07-19 23:01    [W:0.115 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site