Skip to contentSkip to conversation

RISC-V: Remove __init on unaligned_emulation_finish()

PATCH Applied Evan Green 2 participants 2 messages Nov 6, 2023 – Nov 8, 2023 RISC-V

lore
Share & tools
lore

Evan Green

author
#0 lore raw

PATCH 1/1 RISC-V: Remove __init on unaligned_emulation_finish()

This function shouldn't be __init, since it's called during hotplug. The warning says it well enough:

WARNING: modpost: vmlinux: section mismatch in reference:
check_unaligned_access_all_cpus+0x13a (section: .text) -> unaligned_emulation_finish (section: .init.text)

Fixes 71c54b3d169d ("riscv: report misaligned accesses emulation to hwprobe")

---

 arch/riscv/kernel/traps_misaligned.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/traps_misaligned.c +1 -1
index bba301b5194d..5eba37147caa 100644
@@ -625,7 +625,7 @@ bool check_unaligned_access_emulated(int cpu)
 	return misaligned_emu_detected;
 }
 
-void __init unaligned_emulation_finish(void)
+void unaligned_emulation_finish(void)
 {
 	int cpu;
 
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 8 lines · On Mon, 6 Nov 2023 15:11:05 -0800 you wrote:

This function shouldn't be __init, since it's called during hotplug. The warning says it well enough:

WARNING: modpost: vmlinux: section mismatch in reference:
check_unaligned_access_all_cpus+0x13a (section: .text) -> unaligned_emulation_finish (section: .init.text)

[...]

Here is the summary with links:
- RISC-V: Remove __init on unaligned_emulation_finish()

    https://git.kernel.org/riscv/c/6eb7a6445b76

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html