[Nouveau] [PATCH 2/6] instmem/gk20a: refer to IOMMU physical translation bit

Alexandre Courbot gnurou at gmail.com
Mon Apr 20 00:38:43 PDT 2015


On Sat, Apr 18, 2015 at 12:14 AM, Terje Bergstrom <tbergstrom at nvidia.com> wrote:
>
> On 04/16/2015 11:26 PM, Alexandre Courbot wrote:
>>
>> Looks good, but I think I would definitely prefer this to be a mask
>> instead of a bit index, i.e:
>>
>>      r->offset &= ~(priv->iommu_addr_mask >> priv->iommu_pgshift);
>>
>> and
>>
>>      r->offset |= (priv->iommu_addr_mask >> priv->iommu_pgshift);
>
> Wouldn't that be just a more complicated way of expressing the same thing?

Right now we have r->offset |= BIT(priv->iommu_phys_addr_bit -
priv->iommu_pgshift), which doesn't look much simpler. :)


More information about the Nouveau mailing list