From mboxrd@z Thu Jan 1 00:00:00 1970 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 322D1C4332F for ; Tue, 22 Nov 2022 15:13:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9B23D6B0071; Tue, 22 Nov 2022 10:13:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 962BD6B0073; Tue, 22 Nov 2022 10:13:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8529B6B0074; Tue, 22 Nov 2022 10:13:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 743326B0071 for ; Tue, 22 Nov 2022 10:13:51 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F37371401BF for ; Tue, 22 Nov 2022 15:13:50 +0000 (UTC) X-FDA: 80161423062.10.82CFA6F Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf02.hostedemail.com (Postfix) with ESMTP id E764080010 for ; Tue, 22 Nov 2022 15:13:49 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6FC181FB; Tue, 22 Nov 2022 07:13:55 -0800 (PST) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.32.179]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E7C0F3F73D; Tue, 22 Nov 2022 07:13:47 -0800 (PST) Date: Tue, 22 Nov 2022 15:13:39 +0000 From: Mark Rutland To: Steven Rostedt Cc: kernel test robot , oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Will Deacon , Florent Revest , "Masami Hiramatsu (Google)" Subject: Re: [linux-next:master 8539/9537] include/linux/ftrace.h:126:16: error: implicit declaration of function 'arch_ftrace_get_regs'; did you mean 'ftrace_get_regs'? Message-ID: References: <202211212249.livTPi3Y-lkp@intel.com> <20221121124015.31d34642@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221121124015.31d34642@gandalf.local.home> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669130030; a=rsa-sha256; cv=none; b=lyIUNpbuSTejnhU7+KUgvGDM9EmnnB2EgLR/kqVRIJ4+OWId8z/5PWjq0XHNNPJ2oXKaLz E85IOe16IduOZlR5uL2DOjtW6wxL7kuny6au1ymZZFxPi1T8CVTr6tFxoiavlRFvqDcs1j pclsk2QuShge0/HSJ9nmPm490RDwbzU= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf02.hostedemail.com: domain of mark.rutland@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=mark.rutland@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669130030; 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: in-reply-to:in-reply-to:references:references; bh=DZPepkJ9pJ64SO6xo++CsbL6Y/14bAOUmDy0Dpa/hdY=; b=O6O2RG9tse31pa5rfIp10f7tYU2wIs+0IHewLmfUMWmZ8QMx/Z/MasCIKRsvJ1ZsZkOv+Y HsMbuNBDgzBY5u+IE5/gSYJj/lIphrkukMwWvWJH8vuBB6g/lPFZFpHNot3evFy7Dc3iKG 4qsmM3A/XY6b6pdSZFmtALU/1OcVN8A= X-Rspam-User: X-Rspamd-Queue-Id: E764080010 Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf02.hostedemail.com: domain of mark.rutland@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=mark.rutland@arm.com X-Stat-Signature: oq84c45p43ee77eqnapfuq6mxmhcfco6 X-Rspamd-Server: rspam10 X-HE-Tag: 1669130029-283903 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: On Mon, Nov 21, 2022 at 12:40:15PM -0500, Steven Rostedt wrote: > On Mon, 21 Nov 2022 17:26:15 +0000 > Mark Rutland wrote: > > > ... and since arm64 can be built with DYNAMIC_FTRACE=n we end up with: > > > > CONFIG_DYNAMIC_FTRACE=n > > Is there any reason to have CONFIG_DYNAMIC_FTRACE=n and > CONFIG_FUNCTION_TRACE=y? > > The only reason I keep the option to turn off DYNAMIC_FTRACE is for > debugging purposes. > > That is, if you have HAVE_DYNAMIC_FTRACE, then DYNAMIC_FTRACE should be > enabled whenever it is needed by something else. > > The reason for static ftrace is simply to help new architectures work their > way to having DYNAMIC_FTRACE enabled. Perhaps the solution is to get rid of > the DYNAMIC_FRACE prompt, and have it set whenever FUNCTION_TRACER is set > and HAVE_DYNAMIC_FTRACE is set. To be honest, we just didn't think to remove static ftrace; I'm happy to remove that for arm64. That said, I still think it makes sense to change the code to check CONFIG_DYNAMIC_FTRACE_WITH_ARGS rather than CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS, as mentioned below, unless you intend for that to have an effect on static ftrace on x86? Everywhere else with DYNAMIC_FTRACE_WITH_ARGS forces DYNAMIC_FTRACE, so it ends up equivalent; x86 and arm64 are the only exceptions today. Thanks, Mark. > > For debugging purposes, I may add > > HAVE_DEBUG_DYNAMIC_FTRACE > > which brings back the prompt (for x86 only). > > -- Steve > > > > CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y > > CONFIG_DYNAMIC_FTRACE_WITH_ARGS=n > > > > Looking at this some more, ftrace_regs_has_args() should check for > > CONFIG_DYNAMIC_FTRACE_WITH_ARGS rather than > > CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS, or it'll bogusly report we have args when > > CONFIG_DYNAMIC_FTRACE=n. > > > > I'd prefer to change the core ftrace code to check for > > CONFIG_DYNAMIC_FTRACE_WITH_ARGS for consistency with that, but I'll need to > > check how that affects other architectures.