From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C38552566 for ; Tue, 18 Apr 2023 12:29:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47551C433D2; Tue, 18 Apr 2023 12:29:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681820995; bh=gmW944o7DcwZ/rUiZO8Hn7nDwrDi2oWWytE3DszOy/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wx3X1bHsYP4PCTS16dUESzgNKqFc824Hd+D+vQnVNmfp1B9rG2qyJxIz5nuKGZ9vd t4S9wVJBKa8yIy+uDQ2sdVLMNMCEMfTLH0WF0tt9uQ7gw19+wqtQ8gPJRC71Q7amEM UR1K3akqZyYEnXNi01jz0GmFnEVDdcyHZyGdHaow= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Masami Hiramatsu , Mark Rutland , John Keeping , "Steven Rostedt (Google)" Subject: [PATCH 5.4 34/92] ftrace: Mark get_lock_parent_ip() __always_inline Date: Tue, 18 Apr 2023 14:21:09 +0200 Message-Id: <20230418120306.041237421@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230418120304.658273364@linuxfoundation.org> References: <20230418120304.658273364@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: John Keeping commit ea65b41807a26495ff2a73dd8b1bab2751940887 upstream. If the compiler decides not to inline this function then preemption tracing will always show an IP inside the preemption disabling path and never the function actually calling preempt_{enable,disable}. Link: https://lore.kernel.org/linux-trace-kernel/20230327173647.1690849-1-john@metanate.com Cc: Masami Hiramatsu Cc: Mark Rutland Cc: stable@vger.kernel.org Fixes: f904f58263e1d ("sched/debug: Fix preempt_disable_ip recording for preempt_disable()") Signed-off-by: John Keeping Signed-off-by: Steven Rostedt (Google) Signed-off-by: Greg Kroah-Hartman --- include/linux/ftrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -712,7 +712,7 @@ static inline void __ftrace_enabled_rest #define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5)) #define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6)) -static inline unsigned long get_lock_parent_ip(void) +static __always_inline unsigned long get_lock_parent_ip(void) { unsigned long addr = CALLER_ADDR0;