pcie: host: tegra: use GFP_DMA32 for MSI mem alloc
Martin Chi [Fri, 24 Feb 2017 02:10:01 +0000 (10:10 +0800)]
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

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

drivers/pci/host/pci-tegra.c

index 6c070a9..0ff4576 100644 (file)
@@ -5,7 +5,7 @@
  * Author: Mike Rapoport <mike@compulab.co.il>
  *
  * Based on NVIDIA PCIe driver
- * Copyright (c) 2008-2016, NVIDIA Corporation. All rights reserved.
+ * Copyright (c) 2008-2017, NVIDIA Corporation. All rights reserved.
  *
  * Bits taken from arch/arm/mach-dove/pcie.c
  *
@@ -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);