Skip to contentSkip to conversation

acpi/arm64: fix next_platform_timer() section mismatch error

PATCH Applied Jackie Liu 3 participants 5 messages Aug 23, 2021 – Oct 12, 2021

Subsystems (2)
lore
Share & tools
lore

Jackie Liu

author
#0 lore raw

PATCH 1/1 acpi/arm64: fix next_platform_timer() section mismatch error

From: Jackie Liu <[email protected]>

Fix modpost Section mismatch error in next_platform_timer().

[...]
WARNING: modpost: vmlinux.o(.text.unlikely+0x26e60): 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.

WARNING: modpost: vmlinux.o(.text.unlikely+0x26e64): 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.

ERROR: modpost: Section mismatches detected.
Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. make[1]: *** [scripts/Makefile.modpost:59: vmlinux.symvers] Error 1 make[1]: *** Deleting file 'vmlinux.symvers'
make: *** [Makefile:1176: vmlinux] Error 2
[...]

Fixes a712c3ed9b8a ("acpi/arm64: Add memory-mapped timer support in GTDT driver")
---
 drivers/acpi/arm64/gtdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +1 -1
index 0a0a982f9c28..c0e77c1c8e09 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 inline __init void *next_platform_timer(void *platform_timer)
 {
 	struct acpi_gtdt_header *gh = platform_timer;
 
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 35 lines · Jackie Liu

From: Jackie Liu <[email protected]>

Fix modpost Section mismatch error in next_platform_timer().

[...]
WARNING: modpost: vmlinux.o(.text.unlikely+0x26e60): 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.

WARNING: modpost: vmlinux.o(.text.unlikely+0x26e64): 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.

ERROR: modpost: Section mismatches detected.
Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. make[1]: *** [scripts/Makefile.modpost:59: vmlinux.symvers] Error 1 make[1]: *** Deleting file 'vmlinux.symvers'
make: *** [Makefile:1176: vmlinux] Error 2
[...]

Fixes a712c3ed9b8a ("acpi/arm64: Add memory-mapped timer support in GTDT driver")
---
  drivers/acpi/arm64/gtdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +0 -0
index 0a0a982f9c28..c0e77c1c8e09 100644

drivers/acpi/arm64/gtdt.c struct acpi_gtdt_descriptor { · line 41

Quoted 7 lines
drivers/acpi/arm64/gtdt.c +1 -1
@@ -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 inline __init void *next_platform_timer(void *platform_timer)
  {
  	struct acpi_gtdt_header *gh = platform_timer;

Looks good to me,

Thanks
Hanjun

author
#2 lore raw

Friendly ping...

August 23, 2021 9:33 PM, "Hanjun Guo" <[email protected]> 写到:

Quoted 45 lines · Jackie Liu
Quoted 32 lines

From: Jackie Liu <[email protected]>
Fix modpost Section mismatch error in next_platform_timer().
[...]
WARNING: modpost: vmlinux.o(.text.unlikely+0x26e60): 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.
WARNING: modpost: vmlinux.o(.text.unlikely+0x26e64): 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.
ERROR: modpost: Section mismatches detected.
Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
make[1]: *** [scripts/Makefile.modpost:59: vmlinux.symvers] Error 1
make[1]: *** Deleting file 'vmlinux.symvers'
make: *** [Makefile:1176: vmlinux] Error 2

[...]
Fixes a712c3ed9b8a ("acpi/arm64: Add memory-mapped timer support in GTDT driver")

---
drivers/acpi/arm64/gtdt.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +0 -0
index 0a0a982f9c28..c0e77c1c8e09 100644

drivers/acpi/arm64/gtdt.c struct acpi_gtdt_descriptor { · line 40

Quoted 5 lines
drivers/acpi/arm64/gtdt.c +1 -0
@@ -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 inline __init void *next_platform_timer(void *platform_timer)
 {
 struct acpi_gtdt_header *gh = platform_timer;

Looks good to me,

Thanks
Hanjun

maintainer
#3 lore raw
Quoted 1 line · Jackie Liu

Friendly ping...

Lorenzo, would you mind take this patch?

Thanks
Hanjun

maintainer Applied
#4 lore raw
In reply to Jackie Liu
Quoted 10 lines · Jackie Liu

Fix modpost Section mismatch error in next_platform_timer().

[...]
WARNING: modpost: vmlinux.o(.text.unlikely+0x26e60): 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.

[...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] acpi/arm64: fix next_platform_timer() section mismatch error

      https://git.kernel.org/arm64/c/596143e3aec3
Signature · 1 line
Catalin