]> git.baikalelectronics.ru Git - kernel.git/commit
xtensa: Fix section mismatch between memblock_reserve and mem_reserve
authorGuenter Roeck <linux@roeck-us.net>
Thu, 30 May 2019 12:41:38 +0000 (05:41 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 30 May 2019 13:53:53 +0000 (06:53 -0700)
commitda2f739650bbf4443e529cd210c3377fc8a03d49
tree41f046afd554a63edf78e75170f0e4e5121aad1d
parent7f3e30282b380958e65348f1509b90f11030d416
xtensa: Fix section mismatch between memblock_reserve and mem_reserve

Since commit f9797d32f5a303ca8 ("compiler: allow all arches to enable
CONFIG_OPTIMIZE_INLINING"), xtensa:tinyconfig fails to build with section
mismatch errors.

WARNING: vmlinux.o(.text.unlikely+0x68): Section mismatch in reference
from the function ___pa()
to the function .meminit.text:memblock_reserve()
WARNING: vmlinux.o(.text.unlikely+0x74): Section mismatch in reference
from the function mem_reserve()
to the function .meminit.text:memblock_reserve()
FATAL: modpost: Section mismatches detected.

This was not seen prior to the above mentioned commit because mem_reserve()
was always inlined.

Mark mem_reserve(() as __init_memblock to have it reside in the same
section as memblock_reserve().

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Message-Id: <1559220098-9955-1-git-send-email-linux@roeck-us.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/kernel/setup.c