lkml.org 
[lkml]   [2012]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4 v6] iommu/fsl: Freescale PAMU driver and IOMMU API implementation.
Varun Sethi wrote:

> + out_be32(&pamu_regs->ppbah, ((u64)ppaact_phys) >> 32);
> + out_be32(&pamu_regs->ppbal, ppaact_phys);
> + ppaact_phys = ppaact_phys + PAACT_SIZE;
> + out_be32(&pamu_regs->pplah, ((u64)ppaact_phys) >> 32);
> + out_be32(&pamu_regs->pplal, ppaact_phys);

Instead of ((u64)ppaact_phys) >> 32, use upper_32_bits() and lower_32_bits().

> +#define PAACE_NUMBER_ENTRIES 0xFF

This is going to break with large LIODNs. Instead of hard-coding the size
of the PPAACT, you need to scan the device tree for the largest LIODN, and
make the array dynamically sized.

--
Timur Tabi
Linux kernel developer at Freescale



\
 
 \ /
  Last update: 2012-12-03 21:41    [W:0.063 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site