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 0AB3AC4332F for ; Mon, 21 Nov 2022 17:26:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9B8926B0072; Mon, 21 Nov 2022 12:26:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 969BE6B0073; Mon, 21 Nov 2022 12:26:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 83EAE6B0074; Mon, 21 Nov 2022 12:26:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 73A5C6B0072 for ; Mon, 21 Nov 2022 12:26:25 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 47A7D1609D1 for ; Mon, 21 Nov 2022 17:26:25 +0000 (UTC) X-FDA: 80158128330.07.EE38FDA Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf10.hostedemail.com (Postfix) with ESMTP id CBD3AC0005 for ; Mon, 21 Nov 2022 17:26:23 +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 4A47623A; Mon, 21 Nov 2022 09:26:29 -0800 (PST) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.30.141]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C80593F587; Mon, 21 Nov 2022 09:26:21 -0800 (PST) Date: Mon, 21 Nov 2022 17:26:15 +0000 From: Mark Rutland To: kernel test robot Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Will Deacon , Florent Revest , "Masami Hiramatsu (Google)" , "Steven Rostedt (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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202211212249.livTPi3Y-lkp@intel.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669051584; a=rsa-sha256; cv=none; b=sbH8cXu67Fg0IPRGQfypHjH3DfT2YH+3catWaJ7gRXHm0xP+zJ61yn7Da4+PIVqXYuJlFg 22tCXuvyd4WgeVE3FWDSVhcdsj77e4Wm64g1cY1of1j+OD1rbGkbAt8JhbGcMlS6CuJpf3 m0tbVPTWbQk87wa3qak/rMnO40KXu78= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of mark.rutland@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=mark.rutland@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669051584; 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=u9IQ13XfdmoTqJvuRWLiMXXzCGeIwUDWkz0EYkB/b2s=; b=yY1krGQwwJqIld44PvQZyc/1YKEH0dGzSSHxw3ZCfNbk85IRk/5a1mqUOkcYR6Lqto7hP2 1vZMjHDOYbw0BZUcJUoop0ZybAWUGAAKz4hQfb+kVnDEchlmMmhI+KGrf3ciumwkgVw/pU RC5DoVA3wNk4Vb+vnMxAzzOCNtNKJIU= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: CBD3AC0005 Authentication-Results: imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of mark.rutland@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=mark.rutland@arm.com; dmarc=pass (policy=none) header.from=arm.com X-Rspam-User: X-Stat-Signature: bn6wm5k4ze6kqzdyd9u4imqi66sipsrj X-HE-Tag: 1669051583-646374 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 10:55:34PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: e4cd8d3ff7f9efeb97330e5e9b99eeb2a68f5cf9 > commit: 26299b3f6ba26bfc234b73126d14bdf4dec5275a [8539/9537] ftrace: arm64: move from REGS to ARGS > config: arm64-buildonly-randconfig-r003-20221120 > compiler: aarch64-linux-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=26299b3f6ba26bfc234b73126d14bdf4dec5275a > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 26299b3f6ba26bfc234b73126d14bdf4dec5275a > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 prepare > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot > > All error/warnings (new ones prefixed by >>): > > In file included from include/linux/kvm_host.h:32, > from arch/arm64/kernel/asm-offsets.c:15: > include/linux/ftrace.h: In function 'ftrace_get_regs': > >> include/linux/ftrace.h:126:16: error: implicit declaration of function 'arch_ftrace_get_regs'; did you mean 'ftrace_get_regs'? [-Werror=implicit-function-declaration] > 126 | return arch_ftrace_get_regs(fregs); > | ^~~~~~~~~~~~~~~~~~~~ > | ftrace_get_regs > >> include/linux/ftrace.h:126:16: warning: returning 'int' from a function with return type 'struct pt_regs *' makes pointer from integer without a cast [-Wint-conversion] > 126 | return arch_ftrace_get_regs(fregs); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Ah; this is due to some mismatched CPP guards for CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS and CONFIG_DYNAMIC_FTRACE_WITH_ARGS. The core ftrace code provids this under guards: #ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS ... #endif /* CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS */ ... but arm64 defines this under: #ifdef CONFIG_DYNAMIC_FTRACE_WITH_ARGS ... #endif ... and since arm64 can be built with DYNAMIC_FTRACE=n we end up with: CONFIG_DYNAMIC_FTRACE=n 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. Thanks, Mark.