From patchwork Tue May 16 19:35:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13243597 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 39338C7EE23 for ; Tue, 16 May 2023 19:36:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CFA94280006; Tue, 16 May 2023 15:36:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C82BF280001; Tue, 16 May 2023 15:36:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4B47280006; Tue, 16 May 2023 15:36:54 -0400 (EDT) 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 A4657280001 for ; Tue, 16 May 2023 15:36:54 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6E4391403A8 for ; Tue, 16 May 2023 19:36:54 +0000 (UTC) X-FDA: 80797125948.25.8584845 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id 7715A18000D for ; Tue, 16 May 2023 19:36:51 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="JMo/H+dc"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684265811; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qA7GrlyyzY3262ALnRWQWCdmNK1kJ5E5LfUfbn9Dzs8=; b=naxdFPEwvKT8JFVliSWh5fHvVCigL2WvVi331EF7VUfZj5jNEcxFMw25ldlcX8pyeKj72T f4xDl1IL6NE2WpECTwAJxhpQhSRsGd/Z6PVKC18nYIPM8Go7Xt6a5u8Ik8MZdwSjGlqYak cbcOrzghH1J+ubpKs5OZEdENsWpKql0= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="JMo/H+dc"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684265811; a=rsa-sha256; cv=none; b=kQxznKPKDsm7qjIoYKAk7uvEwP/jYDnG01TAvxWe5Ofa/iqJVCTp937jMRjRcB/PtXJbnu 3RTRPCGPiqWMbidxNBmNlu9jsTSKdbQ17g3ASjan4sEOatoyVWjigpMxbKibWHNjBDvkA+ HxHWSbARcUgJNFgjrx6WsZ/rlsJk9fw= 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 7895663DB9; Tue, 16 May 2023 19:36:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB288C433D2; Tue, 16 May 2023 19:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684265810; bh=UIw2cpO0M7mgQJomy8Z1KQIbzqHPSHzZkNPw0ZSZdik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JMo/H+dcAwoiU2BvKT+/qzV35hAeKJ89YTDQRfZVp5VuxZ7AAwO6XIq6mGKGPLHPM n9Kgl0NxgfysUuyDXpoIpuKvgQDWBsj4qr+esrqhkg9QY7EaCjoIEcFFWSEs2pEGzA FnkLwXZ2J/6v8Go5SZJp9S7qOEGXEQwUg5o1OEKHvC0coA5trawZlHiYQ1s91VRsLo WQUb4Fjw53QsgtZj9Y0iaE8RIw4x3ZsPuMC/axFjq2EAqnJ7Ryi+ghY1T0ksu98x57 czRJOOwVX2pWrVR691opbv/O3yATTIWa99EE41FEQBTMfS2DReIvbrilOoBUrVW/Kl t+ouxwrQLLJeA== 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 07/20] x86: doublefault: avoid missing-prototype warnings Date: Tue, 16 May 2023 21:35:36 +0200 Message-Id: <20230516193549.544673-8-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-Stat-Signature: uco9h6fjzxb8udsycmdtutg99ps4q15z X-Rspam-User: X-Rspamd-Queue-Id: 7715A18000D X-Rspamd-Server: rspam07 X-HE-Tag: 1684265811-988671 X-HE-Meta: U2FsdGVkX1/EX8mIQAq5HlFnr3EopUCuJlrF+J4+C76sSe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tu2xunfrWdvYCnJWt2x1iN7ciQfMvlXLxGMzkVdM5MuggxXIPY10zAYOZgrbs3z6t8zqkTu1et0mIzVetMuERMWWGgXdXRCu4wDEtXaMbmMNiuTNhow/OIyXV1J77RgE+eyiavWW2adMA4+l22U0TBODe0l3QCAghpQ== 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 Two functions in the 32-bit doublefault code are lacking a prototype: arch/x86/kernel/doublefault_32.c:23:36: error: no previous prototype for 'doublefault_shim' [-Werror=missing-prototypes] 23 | asmlinkage noinstr void __noreturn doublefault_shim(void) | ^~~~~~~~~~~~~~~~ arch/x86/kernel/doublefault_32.c:114:6: error: no previous prototype for 'doublefault_init_cpu_tss' [-Werror=missing-prototypes] 114 | void doublefault_init_cpu_tss(void) The first one is only called from assembler, while the second one is declared in doublefault.h, but this file is not included. Include the header file and add the other declaration there as well. Signed-off-by: Arnd Bergmann --- arch/x86/include/asm/doublefault.h | 4 ++++ arch/x86/kernel/doublefault_32.c | 1 + 2 files changed, 5 insertions(+) diff --git a/arch/x86/include/asm/doublefault.h b/arch/x86/include/asm/doublefault.h index 54a6e4a2e132..de0e88b32207 100644 --- a/arch/x86/include/asm/doublefault.h +++ b/arch/x86/include/asm/doublefault.h @@ -2,6 +2,8 @@ #ifndef _ASM_X86_DOUBLEFAULT_H #define _ASM_X86_DOUBLEFAULT_H +#include + #ifdef CONFIG_X86_32 extern void doublefault_init_cpu_tss(void); #else @@ -10,4 +12,6 @@ static inline void doublefault_init_cpu_tss(void) } #endif +asmlinkage void __noreturn doublefault_shim(void); + #endif /* _ASM_X86_DOUBLEFAULT_H */ diff --git a/arch/x86/kernel/doublefault_32.c b/arch/x86/kernel/doublefault_32.c index 3b58d8703094..6eaf9a6bc02f 100644 --- a/arch/x86/kernel/doublefault_32.c +++ b/arch/x86/kernel/doublefault_32.c @@ -9,6 +9,7 @@ #include #include #include +#include #define ptr_ok(x) ((x) > PAGE_OFFSET && (x) < PAGE_OFFSET + MAXMEM)