From patchwork Thu May 18 22:03:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 96072 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp830866vqo; Thu, 18 May 2023 15:13:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dMtNHEkI6AIGwkS20Cq5Gna+uuiK/d2P7JHxZFj7w5VD40A04klVP5/WnY3a0/knefJpx X-Received: by 2002:a05:6a21:7896:b0:104:b7b4:e03b with SMTP id bf22-20020a056a21789600b00104b7b4e03bmr1584434pzc.48.1684447981963; Thu, 18 May 2023 15:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684447981; cv=none; d=google.com; s=arc-20160816; b=ACAvYNHW7QTuDktUden4WoU26Uszp4CO1t3TYcWqJdwearnhkN6g3JEj4JTvzzfPMd BvKxN2SaRA1t/XpZMvAfZ7YHWxpO603HcnTkrxBEn2UGbV6gxT+pIalrC+sIQ7MnDPYY hAo/7/L8DMohgY0Ef4GVCpUrUh3nzlUBNk4tmO9YOAGRHCODc31EUaC2gxZQL2fDbUiQ kJxnSNLipabMlpx1/jP/61EveTC4oZDovqRT7ztG9oBNAMeN62fGnBwgnEvJt1Ah/ZKv SMlMFJ3IvoLRv1i5RS8fXCGJHGXVmffPFtfZGgTY3/Li+qLK3EVmbsXnb7NSULd+h218 Wg3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=ePn0KlrcsrFB7qw1xjxMeBR7TjQc0vuEVBn3rXfEDX8=; b=T/5g4pEfd1t3BvbIpPX3DSTJ6P9RD5ShSEyjT8OGXnucxpDyXsVtCg1uqJut0DxtNA AUp82PpYZFR3G+m1JP9lY1/VKBulNfGd05w0WumXYgl6Y5ujdRNAeV1PBkeaHrIx4jy+ MYog7M7P2nmfX+fU7BPSPzejputoE1FIiM2IrOst15j6F3p7FbE0mjZXcaQ1pWHgCtl8 WIi5bcE4uDseyHI8VfYMTQWsGiDxDujaR1FEMhwQNW0svrIxcKaLwEXtrWj9l6jo41oI MYAf9AwZCMhmeKqSN2EZTZ5Dfzj8CzqED39VyD8+iO1H5D6FiREdZXlZF9PeAG+kqnbH 02Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=K918CxpI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=phFeiGeu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g130-20020a636b88000000b0051fb6ca1e69si2428916pgc.180.2023.05.18.15.12.46; Thu, 18 May 2023 15:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=K918CxpI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=phFeiGeu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbjERWDv (ORCPT + 99 others); Thu, 18 May 2023 18:03:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230323AbjERWDT (ORCPT ); Thu, 18 May 2023 18:03:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DD5DE69; Thu, 18 May 2023 15:03:18 -0700 (PDT) Date: Thu, 18 May 2023 22:03:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684447396; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePn0KlrcsrFB7qw1xjxMeBR7TjQc0vuEVBn3rXfEDX8=; b=K918CxpIa6nMz4ukgBt6iNjz18w8J07IhFsNUiCurwkFEZk2JPe5H9KFYfTzKvnjlfjRKe ZbsUrXiGQUWETpmtuFDv9gKiTSeiz3GvjkM6x3bsFTkaCP14d2K84FnwdZiCrcB5LZAY6T ZEHsE4i9sCeSZs1d8sVmx6f4I30/ya17LHCZzq8ljHkEdSPCa1zvHP26mmsmC4Ar9jh3To 5GqIBjWRZA9mBImmjeGLdBt4Uwbn3BBksMpZmFo7vDg0mSDtwjBGyqRc6GGjt8S4+bzi8Y QvQY4wbpE7ztpGNmjIRjzCoTSVknszO4TYwI3DchoeY4vvCZfywNny2K97ym3A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684447396; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePn0KlrcsrFB7qw1xjxMeBR7TjQc0vuEVBn3rXfEDX8=; b=phFeiGeuOBdFae/7J+BvwploeN69XJEYWeXNfq2bVOt4VrMmgO19zCQvaqwHG5YgNT7/5l ufk/g1xjbmC+rJAQ== From: "tip-bot2 for Arnd Bergmann" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/ftrace: Move prepare_ftrace_return prototype to header Cc: Arnd Bergmann , Dave Hansen , Alexander Lobakin , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <168444739577.404.17746635284480437496.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766271727247848943?= X-GMAIL-MSGID: =?utf-8?q?1766271727247848943?= The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 26c3379a6912ab7f5115cea31123a57de8d2ce8a Gitweb: https://git.kernel.org/tip/26c3379a6912ab7f5115cea31123a57de8d2ce8a Author: Arnd Bergmann AuthorDate: Tue, 16 May 2023 21:35:30 +02:00 Committer: Dave Hansen CommitterDate: Thu, 18 May 2023 11:56:01 -07:00 x86/ftrace: Move prepare_ftrace_return prototype to header On 32-bit builds, the prepare_ftrace_return() function only has a global definition, but no prototype before it, which causes a warning: arch/x86/kernel/ftrace.c:625:6: warning: no previous prototype for ‘prepare_ftrace_return’ [-Wmissing-prototypes] 625 | void prepare_ftrace_return(unsigned long ip, unsigned long *parent, Move the prototype that is already needed for some configurations into a header file where it can be seen unconditionally. Signed-off-by: Arnd Bergmann Signed-off-by: Dave Hansen Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/all/20230516193549.544673-2-arnd%40kernel.org --- arch/x86/include/asm/ftrace.h | 3 +++ arch/x86/kernel/ftrace.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h index 5061ac9..b8d4a07 100644 --- a/arch/x86/include/asm/ftrace.h +++ b/arch/x86/include/asm/ftrace.h @@ -106,6 +106,9 @@ struct dyn_arch_ftrace { #ifndef __ASSEMBLY__ +void prepare_ftrace_return(unsigned long ip, unsigned long *parent, + unsigned long frame_pointer); + #if defined(CONFIG_FUNCTION_TRACER) && defined(CONFIG_DYNAMIC_FTRACE) extern void set_ftrace_ops_ro(void); #else diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 5e7ead5..01e8f34 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c @@ -525,9 +525,6 @@ static void *addr_from_call(void *ptr) return ptr + CALL_INSN_SIZE + call.disp; } -void prepare_ftrace_return(unsigned long ip, unsigned long *parent, - unsigned long frame_pointer); - /* * If the ops->trampoline was not allocated, then it probably * has a static trampoline func, or is the ftrace caller itself.