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: 13243591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F81EC77B7F for ; Tue, 16 May 2023 19:36:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 950CF900002; Tue, 16 May 2023 15:36:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 900CD280002; Tue, 16 May 2023 15:36:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7C8BD900004; Tue, 16 May 2023 15:36:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6D50E900002 for ; Tue, 16 May 2023 15:36:17 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 275D61C6A44 for ; Tue, 16 May 2023 19:36:17 +0000 (UTC) X-FDA: 80797124394.08.EB63953 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf22.hostedemail.com (Postfix) with ESMTP id 33795C0009 for ; Tue, 16 May 2023 19:36:14 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=AOBuVWv8; spf=pass (imf22.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684265775; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=09HS3N3BG3mFDsnmcglGWjIO5wPbWbrqny4ROWXLtWE=; b=G288WFzx3ObL980BHtsqlazNbtLXXCdLXdJyMFkWUpDlsCb5MO7cZVTowUAcx8BBXI5lV9 EHYAHhejXznynZzUvLryHeH2j4/oit0wTY/NldNbPSslajfsGDuKoNxa/O0JFSr13pCG+X 7I1MTeXQZKDo2vg7rDS093PYOhdGhTg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684265775; a=rsa-sha256; cv=none; b=iCDY+Pj84K53z3R9p1p2KGg112UK7vp0YLIkmoBZqL1m+aUM7WhMit5yb6pKN6tL79+6Ab 3/Ma/sga+wvgZ1xisIQvRW1PuZQdfC3X1ePB443w1jIO79s8JzUEWjTPgam0WwJZNdGnpi DseZpxXNcLyRf0z8tDU3BOP9s7KXk/s= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=AOBuVWv8; spf=pass (imf22.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org 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 1FE2E63E71; 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-Rspamd-Queue-Id: 33795C0009 X-Stat-Signature: ds4e4cw4m8twxuzcqj4meqknpgeuwrgz X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1684265774-698558 X-HE-Meta: U2FsdGVkX1/8aPC4sx3DTlyd+YcZLTPrBO4OQyAq3E52W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mdeter6FuLlHFb1FAVf3i6QQPnmJn8xCaB9QxhgWSq1qZ+FAhEapJ6UBeTIHBCS2cBYzc+ApX53Ru132p79S/XT9Ya79SzQaH70prEH6IqSHS4M1bvvj8rK6t+nk4J5uYZb1bD0ag5FaCLyfKMFfNniBSLtG0J9ptxz29GlHNed9KJgWhGzkwb1Gl9Kgnnq4cjkPAsTxF47qtg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.