arch-xtensa-always_inline-get_current-and-current_thread_info.patch removed from -mm tree
The quilt patch titled
Subject: arch/xtensa: always_inline get_current() and current_thread_info()
has been removed from the -mm tree. Its filename was
arch-xtensa-always_inline-get_current-and-current_thread_info.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Suren Baghdasaryan <[email protected]>
Subject: arch/xtensa: always_inline get_current() and current_thread_info()
Date: Thu, 4 Jul 2024 06:25:06 -0700
Mark get_current() and current_thread_info() functions as always_inline to fix the following modpost warning:
WARNING: modpost: vmlinux: section mismatch in reference: get_current+0xc (section: .text.unlikely) -> initcall_level_names (section: .init.data)
The warning happens when these functions are called from an __init function and they don't get inlined (remain in the .text section) while the value they return points into .init.data section. Assuming get_current() always returns a valid address, this situation can happen only during init stage and accessing .init.data from .text section during that stage should pose no issues.
---
arch/xtensa/include/asm/current.h | 2 +- arch/xtensa/include/asm/thread_info.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/xtensa/include/asm/current.h renamed from arch/xtensa/include/asm/current.h~arch-xtensa-always_inline-get_current-and-current_thread_info +1 -1
@@ -19,7 +19,7 @@struct task_struct ; -static inline struct task_struct *get_current (void ) +static __always_inline struct task_struct *get_current(void) {return current_thread_info ()->task; }
arch/xtensa/include/asm/thread_info.h renamed from arch/xtensa/include/asm/thread_info.h~arch-xtensa-always_inline-get_current-and-current_thread_info +1 -1
@@ -91,7 +91,7 @@ struct thread_info { }/* how to get the thread information struct from C */ -static inline struct thread_info *current_thread_info (void ) +static __always_inline struct thread_info *current_thread_info(void) {struct thread_info *ti; __asm__("extui %0, a1, 0, "__stringify(CURRENT_SHIFT)"\n\t"
_
Patches currently in -mm which might be from [email protected] are
mm-add-comments-for-allocation-helpers-explaining-why-they-are-macros.patch