Skip to contentSkip to conversation

acpi: arm64: fix section mismatch warning

PATCH In review Arnd Bergmann 5 participants 8 messages Sep 27, 2021 – Oct 15, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: arm64: fix section mismatch warning

From: Arnd Bergmann <[email protected]>

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.

---
 drivers/acpi/arm64/gtdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +1 -1
index 0a0a982f9c28..c3ad42470a7c 100644
@@ -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;
 
Signature · 1 line
2.29.2
maintainer
#1 lore raw

Hi Arnd,

Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

Quoted 4 lines

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/[email protected]/T/

Thanks
Hanjun

#2 lore raw
Quoted 16 lines · Hanjun Guo
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

Quoted 4 lines

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.

Quoted 5 lines

There was a patch to fix this issue as well [1],
but not merged yet.

[1]:
https://lore.kernel.org/linux-acpi/[email protected]/T/

Right, either of those patches should be fine.

Rafael, can you pick one of them up?

Arnd

#3 lore raw
Quoted 21 lines · Arnd Bergmann
Quoted 19 lines · Hanjun Guo
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

Quoted 4 lines

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.

Quoted 6 lines
Quoted 2 lines

[1]:
https://lore.kernel.org/linux-acpi/[email protected]/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.

maintainer
#5 lore raw
In reply to Hanjun Guo
Quoted 18 lines · Hanjun Guo

Hi Arnd,

Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

Quoted 4 lines

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.

Quoted 4 lines

There was a patch to fix this issue as well [1],
but not merged yet.

[1]: https://lore.kernel.org/linux-acpi/[email protected]/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.

Signature · 1 line
Catalin
maintainer
#4 lore raw
In reply to Rafael J. Wysocki
Quoted 22 lines · Rafael J. Wysocki
Quoted 21 lines · Arnd Bergmann
Quoted 19 lines · Hanjun Guo
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

Quoted 4 lines

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.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

[1]:
https://lore.kernel.org/linux-acpi/[email protected]/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

Signature · 1 line
Catalin
#6 lore raw
In reply to Hanjun Guo
Quoted 18 lines · Hanjun Guo

Hi Arnd,

Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

Quoted 4 lines

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.

Quoted 4 lines

There was a patch to fix this issue as well [1],
but not merged yet.

[1]: https://lore.kernel.org/linux-acpi/[email protected]/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

maintainer
#7 lore raw
Quoted 19 lines · Lorenzo Pieralisi
Quoted 18 lines · Hanjun Guo

Hi Arnd,

Quoted 14 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

Quoted 8 lines
Quoted 4 lines

There was a patch to fix this issue as well [1],
but not merged yet.

[1]: https://lore.kernel.org/linux-acpi/[email protected]/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