pcie: host: tegra: use GFP_DMA32 for MSI mem alloc
Vidya Sagar [Tue, 27 Sep 2016 13:03:03 +0000 (18:03 +0530)]
uses GFP_DMA32 instead of GFP_KERNEL while allocating
memory to be given to PCIe end points to issue write
transactions to generate MSI interrupts.
This fixes issues with PCIe end points that are capable
of generating writes to only 32-bit addresses for generating
MSI interrupts

Bug 200234273

Change-Id: I269cb5c55bcac20fd14deb2311067e8a1f58c49b
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1227735
(cherry picked from commit 11b39e38141e2b862ed79b9b414e0412e0e0e2f4)
Reviewed-on: http://git-master/r/1257027
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

drivers/pci/host/pci-tegra.c

index 9643fc0..5b53856 100644 (file)
@@ -2791,7 +2791,7 @@ static int tegra_pcie_enable_msi(struct tegra_pcie *pcie, bool no_init)
                }
 
                /* setup AFI/FPCI range */
-               msi->pages = __get_free_pages(GFP_KERNEL, 0);
+               msi->pages = __get_free_pages(GFP_DMA32, 0);
        }
        base = virt_to_phys((void *)msi->pages);