Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[linux-drm-fsl-dcu.git] / arch / powerpc / mm / hugetlbpage.c
index 1bb20d841080cb0cbdb739bfd0facd9f5ef496bd..8c77c791f87eacafaf33899e3908457ed9ecb28f 100644 (file)
@@ -1014,7 +1014,6 @@ repeat:
 
                /* Primary is full, try the secondary */
                if (unlikely(slot == -1)) {
-                       new_pte |= _PAGE_F_SECOND;
                        hpte_group = ((~hash & htab_hash_mask) *
                                      HPTES_PER_GROUP) & ~0x7UL; 
                        slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags,
@@ -1033,7 +1032,7 @@ repeat:
                if (unlikely(slot == -2))
                        panic("hash_huge_page: pte_insert failed\n");
 
-               new_pte |= (slot << 12) & _PAGE_F_GIX;
+               new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX);
        }
 
        /*