linux-next: "hugetlb: hugepage migration core" breaks compilation on s390
Subsystems (3)
"hugetlb: hugepage migration core" in linux-next breaks compilation on s390:
CC mm/migrate.omm/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' make[1]: *** [mm/migrate.o] Error 1
make: *** [mm/migrate.o] Error 2
This is simply because a lot of CONFIG_HUGETLB_PAGE dependent code was added to mm/migration.c which does not depend on that config option. Please fix.
Thanks.
Quoted 11 lines · Heiko Carstens
"hugetlb: hugepage migration core" in linux-next breaks compilation on s390:
CC
mm/migrate.omm/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' make[1]: *** [mm/migrate.o] Error 1
make: *** [mm/migrate.o] Error 2This is simply because a lot of
CONFIG_HUGETLB_PAGEdependent code was added tomm/migration.cwhich does not depend on that config option. Please fix.
Most of the functions have inline dummies, just pte_mkhuge() doesn't. Anyways the easiest fix would be a simple #ifdef. Does this patch work for you?
-Andi
From: Andi Kleen <[email protected]>
Subject: [PATCH] Fix migration.c compilation on s390
s390 doesn't have huge pages and failed with
Quoted 3 lines
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
mm/migrate.c +2 -0
@@ -139,8 +139,10 @@ static int remove_migration_pte(struct page *new, struct vm_area_struct *vma, pte =pte_mkold (mk_pte (new, vma->vm_page_prot));if (is_write_migration_entry (entry)) pte =pte_mkwrite (pte); +#ifdef CONFIG_HUGETLB_PAGE if (PageHuge (new)) pte =pte_mkhuge (pte); +#endif flush_cache_page (vma, addr,pte_pfn (pte));set_pte_at (mm, addr, ptep, pte);
Quoted 10 lines · Andi Kleen
Quoted 9 lines · Heiko Carstens
"hugetlb: hugepage migration core" in linux-next breaks compilation on s390:
CC
mm/migrate.omm/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' make[1]: *** [mm/migrate.o] Error 1
make: *** [mm/migrate.o] Error 2
Quoted 6 lines
Quoted 2 lines
This is simply because a lot of
CONFIG_HUGETLB_PAGEdependent code was added tomm/migration.cwhich does not depend on that config option. Please fix.Most of the functions have inline dummies, just
pte_mkhuge()doesn't. Anyways the easiest fix would be a simple #ifdef. Does this patch work for you?
Yes.
Quoted 4 lines
From: Andi Kleen <[email protected]>
Subject: [PATCH] Fixmigration.ccompilation on s390s390 doesn't have huge pages and failed with
s390 has huge pages only in 64 bit mode, but not in 31 bit mode.
Quoted 6 lines
Quoted 4 lines
From: Andi Kleen <[email protected]>
Subject: [PATCH] Fixmigration.ccompilation on s390s390 doesn't have huge pages and failed with
s390 has huge pages only in 64 bit mode, but not in 31 bit mode.
Ok I will fix the commit message.
-Andi