Home
last modified time | relevance | path

Searched hist:"4620 a06e4b3c5d076feb9a42ab43dce77c385358" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/mm/
H A Dshmem.cdiff 4620a06e4b3c5d076feb9a42ab43dce77c385358 Wed Aug 03 12:58:19 CDT 2016 Geert Uytterhoeven <geert@linux-m68k.org> shmem: Fix link error if huge pages support is disabled

If CONFIG_TRANSPARENT_HUGE_PAGECACHE=n, HPAGE_PMD_NR evaluates to
BUILD_BUG_ON(), and may cause (e.g. with gcc 4.12):

mm/built-in.o: In function `shmem_alloc_hugepage':
shmem.c:(.text+0x17570): undefined reference to `__compiletime_assert_1365'

To fix this, move the assignment to hindex after the check for huge
pages support.

Fixes: 800d8c63b2e9 ("shmem: add huge pages support")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>