* [PATCH] xtensa: Fix section mismatch between memblock_reserve and mem_reserve
@ 2019-05-30 12:41 Guenter Roeck
2019-05-30 14:13 ` Max Filippov
0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2019-05-30 12:41 UTC (permalink / raw)
To: Chris Zankel; +Cc: Max Filippov, linux-xtensa, linux-kernel, Guenter Roeck
Since commit 9012d011660ea5cf2 ("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>
---
arch/xtensa/kernel/setup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index c0ec24349421..176cb46bcf12 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -310,7 +310,8 @@ extern char _SecondaryResetVector_text_start;
extern char _SecondaryResetVector_text_end;
#endif
-static inline int mem_reserve(unsigned long start, unsigned long end)
+static inline int __init_memblock mem_reserve(unsigned long start,
+ unsigned long end)
{
return memblock_reserve(start, end - start);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xtensa: Fix section mismatch between memblock_reserve and mem_reserve
2019-05-30 12:41 [PATCH] xtensa: Fix section mismatch between memblock_reserve and mem_reserve Guenter Roeck
@ 2019-05-30 14:13 ` Max Filippov
0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2019-05-30 14:13 UTC (permalink / raw)
To: Guenter Roeck
Cc: Chris Zankel, open list:TENSILICA XTENSA PORT (xtensa), LKML
Hi Guenter,
On Thu, May 30, 2019 at 5:41 AM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Since commit 9012d011660ea5cf2 ("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>
> ---
> arch/xtensa/kernel/setup.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Thank you for this fix! Applied to my xtensa tree.
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-30 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 12:41 [PATCH] xtensa: Fix section mismatch between memblock_reserve and mem_reserve Guenter Roeck
2019-05-30 14:13 ` Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).