From patchwork Tue May 16 19:35:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp659008vqo; Tue, 16 May 2023 12:38:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5BNA+nq61fH+VZ6rx5XKnlNwJ8vis5FKYWXEAOFcQJ+P0sy+f0YaqykfP1PpAB/INo16GN X-Received: by 2002:a05:6a20:8416:b0:ec:d7cf:bcf7 with SMTP id c22-20020a056a20841600b000ecd7cfbcf7mr48141003pzd.17.1684265890690; Tue, 16 May 2023 12:38:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684265890; cv=none; d=google.com; s=arc-20160816; b=LkAa7cZ3gb+YSlVoFEuSEe6MUmraAW6T1CJcqRBgdK61DmwEhXS0gyCkSallVPYKYI yAvLkNPLuhYwO45W8V63mmSLKYy9W4RTCU75Bzl9j9lGHtCwN/nY3uR8wgvKwELuNGlC eRmKTbNTFaPVVw/Uwgzt6X+PQUORfyh3huqmGQwzIKrvAkbQFOkLP4THFMmBGlxn2LOP 1fx+qfiNlTW/dV4O9wcq22wSssWvjFn98OXIu/kHtaaT7Sz3EMPNs5lmo//KQ1zZAFzT gao4Ba8mgp8HBGqoGUSp167o/CZs7C64ZehcmkDqer7QXGw9SUambkD6LRdkYzR8ikLQ SRRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=09HS3N3BG3mFDsnmcglGWjIO5wPbWbrqny4ROWXLtWE=; b=CobqN/KXavkGDuWi6CPVSVotIeIqrXf+3mzljpjoQEnL4AAvfwxrlpyO+5VYiSNw8y WWPzFLKQfSSwES7trVRO1Y3SKiNVfi2/ZOxaDDRlUg+y2zJ8yM3IU0xhsGk/qz7pji4B lyg1i/6gVHDX8QAFjsk0dGEsJtODX0X8HBeFYEWY0AVBqKVbhJLelOTmLMHAL5bRf1jr AQlzZO1sugRqHHFTnOf0dSJtfopWnuR1Dlf7YoQhFn+vIOnbaCI+X2dKCfJOSIrbq3i2 tG1cwL1OjB09cuXP4qQby32zMbm36uNbwhS1EL6AUhIsJtEQFGbdEs+rQPveg9Pxo7Ns ud4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AOBuVWv8; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v15-20020a63b64f000000b00524eefa6d61si19417425pgt.736.2023.05.16.12.37.57; Tue, 16 May 2023 12:38:10 -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=@kernel.org header.s=k20201202 header.b=AOBuVWv8; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbjEPTgU (ORCPT + 99 others); Tue, 16 May 2023 15:36:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbjEPTgS (ORCPT ); Tue, 16 May 2023 15:36:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB9EC86AE; Tue, 16 May 2023 12:36:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4DC4063E8A; Tue, 16 May 2023 19:36:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06C9EC4339B; Tue, 16 May 2023 19:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684265773; bh=+r42W67OGDQQqAy2PIbpqRJtm86RNedMVE1BNsE+HVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AOBuVWv84dy+YEirfBc0rOgB6n5+cRsHG61qC/Lnfi2dGn7Jv+JKh/H02eWWfMUF3 Ex2ZkwkMb7pU24/iLpb6Y8hKTZK4ttU1eJ2NobvkypPk2O2EnpVw+0yr+dF/PpkZQx 3eL/opgEW1QD86klpYN2w8CV+JEExP433BmmgiImAub0k+8is2vhhwVU/VPp6XDlfH 3XztpmqkQ5qaQ29gLQgBc9KgSs6vC4RdNI63NsfmLz+6t5LxvmdPqe41UvKb/ArBhl S7oIwLXWs1/hwyZUUfG2KjSn5ZNqk85FsE1YOlhxhVLrZXk744pPU+X1xr/Njx6aQp zQ2/DkqcjEvOQ== From: Arnd Bergmann To: x86@kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Juergen Gross , "Srivatsa S. Bhat (VMware)" , Alexey Makhalov , VMware PV-Drivers Reviewers , Peter Zijlstra , Darren Hart , Andy Shevchenko , Boris Ostrovsky , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-pci@vger.kernel.org, platform-driver-x86@vger.kernel.org, xen-devel@lists.xenproject.org, linux-pm@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 01/20] x86: move prepare_ftrace_return prototype to header Date: Tue, 16 May 2023 21:35:30 +0200 Message-Id: <20230516193549.544673-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516193549.544673-1-arnd@kernel.org> References: <20230516193549.544673-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1766080790505795861?= X-GMAIL-MSGID: =?utf-8?q?1766080790505795861?= From: Arnd Bergmann 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 Acked-by: Steven Rostedt (Google) --- 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 5061ac98ffa1..b8d4a07f9595 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 5e7ead52cfdb..01e8f34daf22 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.