summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2015-04-14 18:44:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:48:59 -0400
commitef2a5153b4d2c48c05b9280491cb5592a46df385 (patch)
tree94f830b753fad9fde7746114a0bf737da3c43209 /mm/migrate.c
parent692297d8f96887f836d9049a653ed05a71cf48fb (diff)
mm/migrate: mark unmap_and_move() "noinline" to avoid ICE in gcc 4.7.3
With gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) : mm/migrate.c: In function `migrate_pages': mm/migrate.c:1148:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:13500 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. Preprocessed source stored into /tmp/ccPoM1tr.out file, please attach this to your bugreport. make[1]: *** [mm/migrate.o] Error 1 make: *** [mm/migrate.o] Error 2 Mark unmap_and_move() (which is used in a single place only) "noinline" to work around this compiler bug. [akpm@linux-foundation.org: make it conditional on gcc-4.7.3 and arm] [khilman@kernel.org: fine-tune compiler versions] [akpm@linux-foundation.org: fix comment] Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reported-by: Kevin Hilman <khilman@kernel.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Tested-by: Kevin Hilman <khilman@linaro.org> Tested-by: Lina Iyer <lina.iyer@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 85e042686031..ec1802d85f05 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -901,12 +901,23 @@ out:
901} 901}
902 902
903/* 903/*
904 * gcc 4.7 and 4.8 on arm get an ICEs when inlining unmap_and_move(). Work
905 * around it.
906 */
907#if (GCC_VERSION >= 40700 && GCC_VERSION < 40900) && defined(CONFIG_ARM)
908#define ICE_noinline noinline
909#else
910#define ICE_noinline
911#endif
912
913/*
904 * Obtain the lock on page, remove all ptes and migrate the page 914 * Obtain the lock on page, remove all ptes and migrate the page
905 * to the newly allocated page in newpage. 915 * to the newly allocated page in newpage.
906 */ 916 */
907static int unmap_and_move(new_page_t get_new_page, free_page_t put_new_page, 917static ICE_noinline int unmap_and_move(new_page_t get_new_page,
908 unsigned long private, struct page *page, int force, 918 free_page_t put_new_page,
909 enum migrate_mode mode) 919 unsigned long private, struct page *page,
920 int force, enum migrate_mode mode)
910{ 921{
911 int rc = 0; 922 int rc = 0;
912 int *result = NULL; 923 int *result = NULL;