Skip to content

Commit 3ef8fd7

Browse files
author
Andi Kleen
committed
Fix migration.c compilation on s390
31bit s390 doesn't have huge pages and failed with: > mm/migrate.c: In function 'remove_migration_pte': > mm/migrate.c:143:3: error: implicit declaration of function 'pte_mkhuge' > mm/migrate.c:143:7: error: incompatible types when assigning to type 'pte_t' from type 'int' Put that code into a ifdef. Reported by Heiko Carstens Signed-off-by: Andi Kleen <ak@linux.intel.com>
1 parent f672b49 commit 3ef8fd7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎mm/migrate.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ static int remove_migration_pte(struct page *new, struct vm_area_struct *vma,
139139
pte = pte_mkold(mk_pte(new, vma->vm_page_prot));
140140
if (is_write_migration_entry(entry))
141141
pte = pte_mkwrite(pte);
142+
#ifdef CONFIG_HUGETLB_PAGE
142143
if (PageHuge(new))
143144
pte = pte_mkhuge(pte);
145+
#endif
144146
flush_cache_page(vma, addr, pte_pfn(pte));
145147
set_pte_at(mm, addr, ptep, pte);
146148

0 commit comments

Comments
 (0)