From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751657AbdFILio (ORCPT ); Fri, 9 Jun 2017 07:38:44 -0400 Received: from foss.arm.com ([217.140.101.70]:37664 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbdFILin (ORCPT ); Fri, 9 Jun 2017 07:38:43 -0400 Date: Fri, 9 Jun 2017 12:38:50 +0100 From: Will Deacon To: Arnd Bergmann Cc: Catalin Marinas , Steven Rostedt , Ingo Molnar , Jessica Yu , Rusty Russell , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: ftrace: fix building without CONFIG_MODULES Message-ID: <20170609113850.GF13955@arm.com> References: <20170609102807.2992510-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170609102807.2992510-1-arnd@arndb.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Fri, Jun 09, 2017 at 12:27:06PM +0200, Arnd Bergmann wrote: > When CONFIG_MODULES is disabled, we cannot dereference a module pointer: > > arch/arm64/kernel/ftrace.c: In function 'ftrace_make_call': > arch/arm64/kernel/ftrace.c:107:36: error: dereferencing pointer to incomplete type 'struct module' > trampoline = (unsigned long *)mod->arch.ftrace_trampoline; > > Also, the within_module() function is not defined: > > arch/arm64/kernel/ftrace.c: In function 'ftrace_make_nop': > arch/arm64/kernel/ftrace.c:171:8: error: implicit declaration of function 'within_module'; did you mean 'init_module'? [-Werror=implicit-function-declaration] > > This addresses both by adding the appropriate stubs. > > Fixes: e71a4e1bebaf ("arm64: ftrace: add support for far branches to dynamic ftrace") > Signed-off-by: Arnd Bergmann > --- > arch/arm64/include/asm/module.h | 6 ++++++ > arch/arm64/kernel/ftrace.c | 2 +- > include/linux/module.h | 5 +++++ > 3 files changed, 12 insertions(+), 1 deletion(-) I can't seem to reproduce this simply by disabling MODULES in defconfig. Could you share your .config, please? Will