]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
iommu/tegra: modify SMMU_EX_PTBL_PAGE to avoid pfn
authorSri Krishna chowdary K <schowdary@nvidia.com>
Thu, 22 Jan 2015 12:32:56 +0000 (04:32 -0800)
committerSri Krishna Chowdary <schowdary@nvidia.com>
Sat, 7 Feb 2015 06:54:36 +0000 (22:54 -0800)
commit24e6a131f851b8c564faf52f8b6f7de9c80ecdd6
treeff797cbbe221632c2bf27ff7bf40f5c5088582d6
parent51fe5f8c4464c24b1672b39e169d1aae8fa3e290
iommu/tegra: modify SMMU_EX_PTBL_PAGE to avoid pfn

SMMU_MK_PDE converts physical address to SMMU PDE.
So, when extracting the page, first extract the physical address
of the page and convert to page by using phys_to_page. This makes the
macro independent of PAGE_SIZE.

If this is not done, locate_pte() gives us invalid virtual address
and kernel panic occurs when dereferencing it.

Bug 1526131

Change-Id: Id44031939df88eeb2593ed68442bef03f5383f0a
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/676518
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
drivers/iommu/tegra-smmu.h