]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
powerpc/mm: Fix build break when CMA=n && SPAPR_TCE_IOMMU=y
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 14 Feb 2017 02:44:05 +0000 (13:44 +1100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:45:56 +0000 (10:45 +0200)
BugLink: http://bugs.launchpad.net/bugs/1691369
commit a05ef161cdd22faccffe06f21fc8f1e249565385 upstream.

Currently the build breaks if CMA=n and SPAPR_TCE_IOMMU=y:

  arch/powerpc/mm/mmu_context_iommu.c: In function ‘mm_iommu_get’:
  arch/powerpc/mm/mmu_context_iommu.c:193:42: error: ‘MIGRATE_CMA’ undeclared (first use in this function)
  if (get_pageblock_migratetype(page) == MIGRATE_CMA) {
  ^~~~~~~~~~~

Fix it by using the existing is_migrate_cma_page(), which evaulates to
false when CMA=n.

Fixes: 2e5bbb5461f1 ("KVM: PPC: Book3S HV: Migrate pinned pages out of CMA")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/powerpc/mm/mmu_context_iommu.c

index 104bad029ce9b98afff249f5441515c6b4d625f5..7de7124ac91bf939ef26aa9f25d5bd8f88d0f57e 100644 (file)
@@ -184,7 +184,7 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries,
                 * of the CMA zone if possible. NOTE: faulting in + migration
                 * can be expensive. Batching can be considered later
                 */
-               if (get_pageblock_migratetype(page) == MIGRATE_CMA) {
+               if (is_migrate_cma_page(page)) {
                        if (mm_iommu_move_page_from_cma(page))
                                goto populate;
                        if (1 != get_user_pages_fast(ua + (i << PAGE_SHIFT),