RE: [PATCH 4/4 v6] iommu/fsl: Freescale PAMU driver and IOMMU API implementation.
From: Sethi Varun-B16395 <hidden>
Date: 2012-12-04 12:11:16
Also in:
linux-iommu, lkml
From: Sethi Varun-B16395 <hidden>
Date: 2012-12-04 12:11:16
Also in:
linux-iommu, lkml
-----Original Message----- From: Tabi Timur-B04825 Sent: Tuesday, December 04, 2012 1:33 AM To: Sethi Varun-B16395 Cc: joerg.roedel@amd.com; iommu@lists.linux-foundation.org; linuxppc- dev@lists.ozlabs.org; linux-kernel@vger.kernel.org; Wood Scott-B07421 Subject: Re: [PATCH 4/4 v6] iommu/fsl: Freescale PAMU driver and IOMMU API implementation. =20 Varun Sethi wrote: =20quoted
+ out_be32(&pamu_regs->ppbah, ((u64)ppaact_phys) >> 32); + out_be32(&pamu_regs->ppbal, ppaact_phys); + ppaact_phys =3D ppaact_phys + PAACT_SIZE; + out_be32(&pamu_regs->pplah, ((u64)ppaact_phys) >> 32); + out_be32(&pamu_regs->pplal, ppaact_phys);=20 Instead of ((u64)ppaact_phys) >> 32, use upper_32_bits() and lower_32_bits(). =20quoted
+#define PAACE_NUMBER_ENTRIES 0xFF=20 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.
This would in any case change with the new LIODN allocation scheme. I inten= d on introducing the new scheme as a separate patch. -Varun