LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] acpi: arm64: fix section mismatch warning
@ 2021-09-27 14:19 Arnd Bergmann
2021-10-12 7:03 ` Hanjun Guo
0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2021-09-27 14:19 UTC (permalink / raw)
To: Lorenzo Pieralisi, Hanjun Guo, Sudeep Holla, Rafael J. Wysocki,
Len Brown
Cc: Arnd Bergmann, Catalin Marinas, Marc Zyngier, linux-acpi,
linux-arm-kernel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
In a gcc-11 randconfig build I came across this warning:
WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
The function next_platform_timer() references
the variable __initdata acpi_gtdt_desc.
This is often because next_platform_timer lacks a __initdata
annotation or the annotation of acpi_gtdt_desc is wrong.
This happens when next_platform_timer() fails to get inlined
despite the inline annotation. Adding '__init' solves the issue,
and it seems best to remove the 'inline' in the process seems
better anyway.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/acpi/arm64/gtdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c
index 0a0a982f9c28..c3ad42470a7c 100644
--- a/drivers/acpi/arm64/gtdt.c
+++ b/drivers/acpi/arm64/gtdt.c
@@ -36,7 +36,7 @@ struct acpi_gtdt_descriptor {
static struct acpi_gtdt_descriptor acpi_gtdt_desc __initdata;
-static inline void *next_platform_timer(void *platform_timer)
+static __init void *next_platform_timer(void *platform_timer)
{
struct acpi_gtdt_header *gh = platform_timer;
--
2.29.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: arm64: fix section mismatch warning
2021-09-27 14:19 [PATCH] acpi: arm64: fix section mismatch warning Arnd Bergmann
@ 2021-10-12 7:03 ` Hanjun Guo
2021-10-12 7:20 ` Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Hanjun Guo @ 2021-10-12 7:03 UTC (permalink / raw)
To: Arnd Bergmann, Lorenzo Pieralisi, Sudeep Holla,
Rafael J. Wysocki, Len Brown
Cc: Arnd Bergmann, Catalin Marinas, Marc Zyngier, linux-acpi,
linux-arm-kernel, linux-kernel
Hi Arnd,
On 2021/9/27 22:19, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> In a gcc-11 randconfig build I came across this warning:
>
> WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
> The function next_platform_timer() references
> the variable __initdata acpi_gtdt_desc.
> This is often because next_platform_timer lacks a __initdata
> annotation or the annotation of acpi_gtdt_desc is wrong.
>
> This happens when next_platform_timer() fails to get inlined
> despite the inline annotation. Adding '__init' solves the issue,
> and it seems best to remove the 'inline' in the process seems
> better anyway.
There was a patch to fix this issue as well [1],
but not merged yet.
[1]:
https://lore.kernel.org/linux-acpi/7f29a149-e005-f13f-2cc4-a9eb737107e1@huawei.com/T/
Thanks
Hanjun
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: arm64: fix section mismatch warning
2021-10-12 7:03 ` Hanjun Guo
@ 2021-10-12 7:20 ` Arnd Bergmann
2021-10-12 14:16 ` Rafael J. Wysocki
2021-10-12 16:30 ` Catalin Marinas
2021-10-13 9:02 ` Lorenzo Pieralisi
2 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2021-10-12 7:20 UTC (permalink / raw)
To: Hanjun Guo
Cc: Lorenzo Pieralisi, Sudeep Holla, Rafael J. Wysocki, Len Brown,
Arnd Bergmann, Catalin Marinas, Marc Zyngier,
ACPI Devel Maling List, Linux ARM, Linux Kernel Mailing List
On Tue, Oct 12, 2021 at 9:03 AM Hanjun Guo <guohanjun@huawei.com> wrote:
> On 2021/9/27 22:19, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > In a gcc-11 randconfig build I came across this warning:
> >
> > WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
> > The function next_platform_timer() references
> > the variable __initdata acpi_gtdt_desc.
> > This is often because next_platform_timer lacks a __initdata
> > annotation or the annotation of acpi_gtdt_desc is wrong.
> >
> > This happens when next_platform_timer() fails to get inlined
> > despite the inline annotation. Adding '__init' solves the issue,
> > and it seems best to remove the 'inline' in the process seems
> > better anyway.
>
> There was a patch to fix this issue as well [1],
> but not merged yet.
>
> [1]:
> https://lore.kernel.org/linux-acpi/7f29a149-e005-f13f-2cc4-a9eb737107e1@huawei.com/T/
Right, either of those patches should be fine.
Rafael, can you pick one of them up?
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: arm64: fix section mismatch warning
2021-10-12 7:20 ` Arnd Bergmann
@ 2021-10-12 14:16 ` Rafael J. Wysocki
2021-10-12 16:45 ` Catalin Marinas
0 siblings, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2021-10-12 14:16 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Hanjun Guo, Lorenzo Pieralisi, Sudeep Holla, Rafael J. Wysocki,
Len Brown, Arnd Bergmann, Catalin Marinas, Marc Zyngier,
ACPI Devel Maling List, Linux ARM, Linux Kernel Mailing List
On Tue, Oct 12, 2021 at 9:20 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> On Tue, Oct 12, 2021 at 9:03 AM Hanjun Guo <guohanjun@huawei.com> wrote:
> > On 2021/9/27 22:19, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > In a gcc-11 randconfig build I came across this warning:
> > >
> > > WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
> > > The function next_platform_timer() references
> > > the variable __initdata acpi_gtdt_desc.
> > > This is often because next_platform_timer lacks a __initdata
> > > annotation or the annotation of acpi_gtdt_desc is wrong.
> > >
> > > This happens when next_platform_timer() fails to get inlined
> > > despite the inline annotation. Adding '__init' solves the issue,
> > > and it seems best to remove the 'inline' in the process seems
> > > better anyway.
> >
> > There was a patch to fix this issue as well [1],
> > but not merged yet.
> >
> > [1]:
> > https://lore.kernel.org/linux-acpi/7f29a149-e005-f13f-2cc4-a9eb737107e1@huawei.com/T/
>
> Right, either of those patches should be fine.
>
> Rafael, can you pick one of them up?
I can, but arm54 ACPI changes go in via arm64 as a rule.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: arm64: fix section mismatch warning
2021-10-12 7:03 ` Hanjun Guo
2021-10-12 7:20 ` Arnd Bergmann
@ 2021-10-12 16:30 ` Catalin Marinas
2021-10-13 9:02 ` Lorenzo Pieralisi
2 siblings, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2021-10-12 16:30 UTC (permalink / raw)
To: Hanjun Guo
Cc: Arnd Bergmann, Lorenzo Pieralisi, Sudeep Holla,
Rafael J. Wysocki, Len Brown, Arnd Bergmann, Marc Zyngier,
linux-acpi, linux-arm-kernel, linux-kernel
On Tue, Oct 12, 2021 at 03:03:29PM +0800, Hanjun Guo wrote:
> Hi Arnd,
>
> On 2021/9/27 22:19, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > In a gcc-11 randconfig build I came across this warning:
> >
> > WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
> > The function next_platform_timer() references
> > the variable __initdata acpi_gtdt_desc.
> > This is often because next_platform_timer lacks a __initdata
> > annotation or the annotation of acpi_gtdt_desc is wrong.
> >
> > This happens when next_platform_timer() fails to get inlined
> > despite the inline annotation. Adding '__init' solves the issue,
> > and it seems best to remove the 'inline' in the process seems
> > better anyway.
>
> There was a patch to fix this issue as well [1],
> but not merged yet.
>
> [1]: https://lore.kernel.org/linux-acpi/7f29a149-e005-f13f-2cc4-a9eb737107e1@huawei.com/T/
I haven't seen this one, it was on linux-acpi list which I don't follow.
I usually rely you, Lorenzo or Sudeep to ack such patches and cc
Will/me.
--
Catalin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: arm64: fix section mismatch warning
2021-10-12 14:16 ` Rafael J. Wysocki
@ 2021-10-12 16:45 ` Catalin Marinas
0 siblings, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2021-10-12 16:45 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Arnd Bergmann, Hanjun Guo, Lorenzo Pieralisi, Sudeep Holla,
Len Brown, Arnd Bergmann, Marc Zyngier, ACPI Devel Maling List,
Linux ARM, Linux Kernel Mailing List
On Tue, Oct 12, 2021 at 04:16:09PM +0200, Rafael J. Wysocki wrote:
> On Tue, Oct 12, 2021 at 9:20 AM Arnd Bergmann <arnd@kernel.org> wrote:
> >
> > On Tue, Oct 12, 2021 at 9:03 AM Hanjun Guo <guohanjun@huawei.com> wrote:
> > > On 2021/9/27 22:19, Arnd Bergmann wrote:
> > > > From: Arnd Bergmann <arnd@arndb.de>
> > > >
> > > > In a gcc-11 randconfig build I came across this warning:
> > > >
> > > > WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
> > > > The function next_platform_timer() references
> > > > the variable __initdata acpi_gtdt_desc.
> > > > This is often because next_platform_timer lacks a __initdata
> > > > annotation or the annotation of acpi_gtdt_desc is wrong.
> > > >
> > > > This happens when next_platform_timer() fails to get inlined
> > > > despite the inline annotation. Adding '__init' solves the issue,
> > > > and it seems best to remove the 'inline' in the process seems
> > > > better anyway.
> > >
> > > There was a patch to fix this issue as well [1],
> > > but not merged yet.
> > >
> > > [1]:
> > > https://lore.kernel.org/linux-acpi/7f29a149-e005-f13f-2cc4-a9eb737107e1@huawei.com/T/
> >
> > Right, either of those patches should be fine.
> >
> > Rafael, can you pick one of them up?
>
> I can, but arm54 ACPI changes go in via arm64 as a rule.
Queued as https://git.kernel.org/arm64/c/596143e3aec3
--
Catalin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: arm64: fix section mismatch warning
2021-10-12 7:03 ` Hanjun Guo
2021-10-12 7:20 ` Arnd Bergmann
2021-10-12 16:30 ` Catalin Marinas
@ 2021-10-13 9:02 ` Lorenzo Pieralisi
2021-10-15 8:53 ` Hanjun Guo
2 siblings, 1 reply; 8+ messages in thread
From: Lorenzo Pieralisi @ 2021-10-13 9:02 UTC (permalink / raw)
To: Hanjun Guo
Cc: Arnd Bergmann, Sudeep Holla, Rafael J. Wysocki, Len Brown,
Arnd Bergmann, Catalin Marinas, Marc Zyngier, linux-acpi,
linux-arm-kernel, linux-kernel
On Tue, Oct 12, 2021 at 03:03:29PM +0800, Hanjun Guo wrote:
> Hi Arnd,
>
> On 2021/9/27 22:19, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > In a gcc-11 randconfig build I came across this warning:
> >
> > WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
> > The function next_platform_timer() references
> > the variable __initdata acpi_gtdt_desc.
> > This is often because next_platform_timer lacks a __initdata
> > annotation or the annotation of acpi_gtdt_desc is wrong.
> >
> > This happens when next_platform_timer() fails to get inlined
> > despite the inline annotation. Adding '__init' solves the issue,
> > and it seems best to remove the 'inline' in the process seems
> > better anyway.
>
> There was a patch to fix this issue as well [1],
> but not merged yet.
>
> [1]: https://lore.kernel.org/linux-acpi/7f29a149-e005-f13f-2cc4-a9eb737107e1@huawei.com/T/
My bad, we did not coordinate well - I noticed your Acked-by but as a
rule we should also CC LAKML and Catalin/Will (if they aren't CCed) on
the reply to make sure they can actually see it.
Lorenzo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] acpi: arm64: fix section mismatch warning
2021-10-13 9:02 ` Lorenzo Pieralisi
@ 2021-10-15 8:53 ` Hanjun Guo
0 siblings, 0 replies; 8+ messages in thread
From: Hanjun Guo @ 2021-10-15 8:53 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: Arnd Bergmann, Sudeep Holla, Rafael J. Wysocki, Len Brown,
Arnd Bergmann, Catalin Marinas, Marc Zyngier, linux-acpi,
linux-arm-kernel, linux-kernel
On 2021/10/13 17:02, Lorenzo Pieralisi wrote:
> On Tue, Oct 12, 2021 at 03:03:29PM +0800, Hanjun Guo wrote:
>> Hi Arnd,
>>
>> On 2021/9/27 22:19, Arnd Bergmann wrote:
>>> From: Arnd Bergmann <arnd@arndb.de>
>>>
>>> In a gcc-11 randconfig build I came across this warning:
>>>
>>> WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
>>> The function next_platform_timer() references
>>> the variable __initdata acpi_gtdt_desc.
>>> This is often because next_platform_timer lacks a __initdata
>>> annotation or the annotation of acpi_gtdt_desc is wrong.
>>>
>>> This happens when next_platform_timer() fails to get inlined
>>> despite the inline annotation. Adding '__init' solves the issue,
>>> and it seems best to remove the 'inline' in the process seems
>>> better anyway.
>>
>> There was a patch to fix this issue as well [1],
>> but not merged yet.
>>
>> [1]: https://lore.kernel.org/linux-acpi/7f29a149-e005-f13f-2cc4-a9eb737107e1@huawei.com/T/
>
> My bad, we did not coordinate well - I noticed your Acked-by but as a
> rule we should also CC LAKML and Catalin/Will (if they aren't CCed) on
> the reply to make sure they can actually see it.
It's my bad. I will make sure LAKML and Catalin/Will are CCed next time
when I reply the email.
Thanks
Hanjun
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-10-15 8:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 14:19 [PATCH] acpi: arm64: fix section mismatch warning Arnd Bergmann
2021-10-12 7:03 ` Hanjun Guo
2021-10-12 7:20 ` Arnd Bergmann
2021-10-12 14:16 ` Rafael J. Wysocki
2021-10-12 16:45 ` Catalin Marinas
2021-10-12 16:30 ` Catalin Marinas
2021-10-13 9:02 ` Lorenzo Pieralisi
2021-10-15 8:53 ` Hanjun Guo
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).