From patchwork Tue May 16 15:45:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94766 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp529346vqo; Tue, 16 May 2023 08:52:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Lth85e2/OFHCOrlC8RQ/kSi2e9oxsEx233/F2ypB0M9MIvC1iJZTKK2gk855TqV3b+NS7 X-Received: by 2002:a17:90b:33cf:b0:247:2152:6391 with SMTP id lk15-20020a17090b33cf00b0024721526391mr37840208pjb.17.1684252376475; Tue, 16 May 2023 08:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252376; cv=none; d=google.com; s=arc-20160816; b=bRzPWDmRrjyjtHwEH5dFpI6dBnAcZtJYcEJ4wU/0c/RJHTmsHCGISjLjwe1DMtWBuS NQ4gGdSIrwIZT78FvDx0q0JGlgBfu77/7WuoJi74w8Lod7SDNhXZCKFQC+pBGBo+Ok/I mld3LIjE2s/qoiTNeBO0C7GfFFn4fgMW14YtboMLtBQFB2Gj3Z6XXsmmaql3vqBks6wS Gu0a4yMJbUTEjfckVm/1TvHzBiwj2ev9NXoL8jyUlWR9ko8qqY/Ul8DiwUN1yxD55nbl OkA61y8Myn0lWL9AC3juVQxWK2sLKMGsZcTARXmE7c6ikhyBN7//Ks7eR432yUwHbzAO Ayhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=otL5yOvnrR3g1TNiIP0mxT8Be4Er8ACG37vWEfxRtL0=; b=zWUHDzUe9QmCll5FCFi5s2is4GpeYMbRGVveO94aMNb9iOU4W7FeZNjWnpgKNjZGx8 oYuPU7QzWBOMWDJhxEpv4UTkxParuGRqrvoycBaGaFw3ABWHzUNkLD4it3c3okYGG5TC oQrdbm8FEtZrPB5nCx7fBMykOZ3usaiMc3jSuYgXhw1arR9n+EiP7ls54Lk3kGwXUj0R F08I+Aa3R9teiwLtRDC0gqh/fEjFEN77qleCcxcF0LvFmaq7XEXGEzX3ytjmVD1tB1tl 7sJf6ALV1W8unsDXaMJ2SlgXdTXxaNGFjZ0JZhU2Qc6kfy/1d8tcxY8vha0LEGrnrp7y KSnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=atImyQCL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 3-20020a17090a19c300b00240ad93edfesi2028987pjj.5.2023.05.16.08.52.41; Tue, 16 May 2023 08:52:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=atImyQCL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233481AbjEPPrZ (ORCPT + 99 others); Tue, 16 May 2023 11:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234115AbjEPPrX (ORCPT ); Tue, 16 May 2023 11:47:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3CBF9EC2; Tue, 16 May 2023 08:46:59 -0700 (PDT) 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 D40DB63278; Tue, 16 May 2023 15:46:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0851EC433A0; Tue, 16 May 2023 15:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684251980; bh=RmbFIhpMNElq8ZkpNfEGRuhnV3uNnxxGxG17h/UHJGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=atImyQCL9jgkPIb7HW0By+bWCRzkUSWQ8RVamtL4cFJzOUPUmO+faoEujXoK+Si5a zx2WlozINWvxSz+xwAglfp8G2uB9FBan4qsDVnAWPBUU1vD+GoUszoNWjHVLtiVcPZ UujkQhv8ULrWuc2TGKi16vpgj2Qq+iUlbtprJqAH/3/j1+uc26xynSbh5cU035CW+I cFfcdAfxPiJuLxjgiKfthyG2t8VGJX//4ONUV6834gMa0UYqdWF9H8tVGctW3+O3kz WNOxNYFvjg+BA+yjighlvpQOozjJF4UwCQM7YuQ1RIqh4yYcXfA7sB0hFK3lHZAjVr nPQW6GxUJD41w== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 01/16] ARM: dma-mapping: hide unused dma_contiguous_early_fixup function Date: Tue, 16 May 2023 17:45:50 +0200 Message-Id: <20230516154605.517690-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066619693292803?= X-GMAIL-MSGID: =?utf-8?q?1766066619693292803?= From: Arnd Bergmann The dma_contiguous_early_fixup() function is a global __weak stub with an arm specific override, but the declaration is in an #ifdef. If CONFIG_DMA_CMA is disabled, there is no caller and no prototype, which adds a warning for the definition: arm/mm/dma-mapping.c:261:13: error: no previous prototype for 'dma_contiguous_early_fixup' [-Werror=missing-prototypes] Enclose the definition in the same #ifdef as the prototype to avoid that and save a few bytes of .init.text. Signed-off-by: Arnd Bergmann --- arch/arm/mm/dma-mapping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index b4a33358d2e9..bc4ed5ce3e00 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -258,12 +258,14 @@ static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS] __initdata; static int dma_mmu_remap_num __initdata; +#ifdef CONFIG_DMA_CMA void __init dma_contiguous_early_fixup(phys_addr_t base, unsigned long size) { dma_mmu_remap[dma_mmu_remap_num].base = base; dma_mmu_remap[dma_mmu_remap_num].size = size; dma_mmu_remap_num++; } +#endif void __init dma_contiguous_remap(void) { From patchwork Tue May 16 15:45:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94768 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp530157vqo; Tue, 16 May 2023 08:54:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oK62ygHTef0jH7KfzX/HdE1tHqXd2Pn2uv7Y1XXNykymXpj6cdfMOTtmapFG+ONAbg4dU X-Received: by 2002:a05:6a00:2401:b0:63d:2c2f:e3a2 with SMTP id z1-20020a056a00240100b0063d2c2fe3a2mr49079621pfh.18.1684252462386; Tue, 16 May 2023 08:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252462; cv=none; d=google.com; s=arc-20160816; b=YBXI2FsEoPUXfRdfIgFMY+b38+W8yxI8BoqXFNLy0C7VBz+YMhilyNG3VGudbeokO+ tPR0NKdW2RomSuP9pWZ5bhV9aftb9gsHDAPXvaqS5HIVzfFkQjuLLygwyZ4yOXQfBVaR z5n9US9oc1tZ4zbkvr+miwLDkmoR6MRmoeo7S/lm6SDqk9Af5gyB2dLAajJsZO/gRipB fRzuS9Tk6IRHRoMtmwhit09py3OFUzPenhqLqfGxx0B6PR/6WK89wkDtoIt0KJPbaZT1 oe3fVuSI4Epg6ZlK+ohJKKU+LpmwM3BRrZOl7SxHyr/pHzRtYAlzwARjlDZnmKO+85zl pdnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uDI7Sj9mBaC3wqeVq4cdSpw75EqJ06RL/CtCM2ri1ws=; b=Tt7D9odkw2CCVRjw+AWKg8XXQ0AX+VDiTJFZOIVuqWJkWLdKonoBMeMEYqqtifxvjm jzDtHqLzAZ14YgqYFmZr5XYfM4ZedftrdaKHLtAgO/qV2ZAOiig0KO3bHqzOzE6w9/3V hvmi+k/i0H6Z7tsuYqhQcOypHQY9L+TT/XIOk+9WO5lzYqkWYi3hkG8Rt92GTzjcDV1C 8lJEEpTlcfwt9cTQAWq3gDhiUSTl/ulqfAEQO42xIs3A44JA9jX1mrpn2l+BDBew98TM tDkLHVqcOGrVdC86vC+kCciVbqv2IqPIy5OzEp7Nd9UYomTKceOFEg1x6mnxqG1jcNoB IC9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=htRLSIuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020aa78e89000000b006430adc8138si20122039pfr.170.2023.05.16.08.54.07; Tue, 16 May 2023 08:54:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=htRLSIuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234044AbjEPPq6 (ORCPT + 99 others); Tue, 16 May 2023 11:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233481AbjEPPq5 (ORCPT ); Tue, 16 May 2023 11:46:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B067F8A6A; Tue, 16 May 2023 08:46:25 -0700 (PDT) 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 87F1C63B8E; Tue, 16 May 2023 15:46:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8394C4339E; Tue, 16 May 2023 15:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684251984; bh=QS657WnsM8vdXz+21VxN72PAoIydoXyXYs6qMuHutIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=htRLSIukiytswKjvEU7b5krt5Y3Y7ljURy8QF8CGb+x2h1ssvwjVk6Pwqv4ut3Esw CB1OiulX7s10M9KVGVETJOiHcuxpyhee8hUZkmO5UEaMi+KR8LO8hYWzalhm3RlHqo 09xGWJMYFj2+fN7HqZvVXQrPQTX7Y7qmuRJ61d3Y/JHUn94ohkbZ4djv+Oyi/Mtl+w XedetTwh9Y23tsy+DfBDvhPwgSkMUwAXkk+Ad6STis8PVcvL9li3Po/5JkWHc9yLNX Yq2AjCQlVGQybK9eMHfvOn6iETC5ttftvRPasbRn7XnG8UUlUFRX/e9rR3DVFZu0bl cIvS1mbMNeQRw== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 02/16] ARM: traps: hide unused functions on NOMMU Date: Tue, 16 May 2023 17:45:51 +0200 Message-Id: <20230516154605.517690-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066710041915771?= X-GMAIL-MSGID: =?utf-8?q?1766066710041915771?= From: Arnd Bergmann A couple of functions in this file are only used on MMU-enabled builds, and never even declared otherwise, causing these build warnings: arch/arm/kernel/traps.c:759:6: error: no previous prototype for '__pte_error' [-Werror=missing-prototypes] arch/arm/kernel/traps.c:764:6: error: no previous prototype for '__pmd_error' [-Werror=missing-prototypes] arch/arm/kernel/traps.c:769:6: error: no previous prototype for '__pgd_error' [-Werror=missing-prototypes] Protect these in an #ifdef to avoid the warnings and save a little bit of .text space. Signed-off-by: Arnd Bergmann --- arch/arm/kernel/traps.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 40c7c807d67f..3bad79db5d6e 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -756,6 +756,7 @@ void __readwrite_bug(const char *fn) } EXPORT_SYMBOL(__readwrite_bug); +#ifdef CONFIG_MMU void __pte_error(const char *file, int line, pte_t pte) { pr_err("%s:%d: bad pte %08llx.\n", file, line, (long long)pte_val(pte)); @@ -770,6 +771,7 @@ void __pgd_error(const char *file, int line, pgd_t pgd) { pr_err("%s:%d: bad pgd %08llx.\n", file, line, (long long)pgd_val(pgd)); } +#endif asmlinkage void __div0(void) { From patchwork Tue May 16 15:45:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94771 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp531868vqo; Tue, 16 May 2023 08:57:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7XiAkk3D9TLBSuOnRmN+a8WJzP7YHI1Nyz2uB8LgSB4/kwyPrnGhamJSgKKL70M60yfHVB X-Received: by 2002:a05:6a00:1a06:b0:645:e008:d7ba with SMTP id g6-20020a056a001a0600b00645e008d7bamr40632431pfv.27.1684252637320; Tue, 16 May 2023 08:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252637; cv=none; d=google.com; s=arc-20160816; b=ZdBpXG8hwRLKm6x4ju6l01l8jYhN8zPcFCA3/An4ziYrsSG+SMuZDuIBx0vm6z68Op Pq5Jy7RsKC/J9eBAzNiH4BoYpWSuMNU1uCpBXuqWTAPVj7laFzqd+kpvFCnZir1Q3mNu SkzzlfGpow5DQsfg0Bd3nw4O708zEgJk/lpggormWSJWMJgY7V/AQg6AwTOU/mnKT19O /Twcp1s2QN+VMfuT1Y0nd/XSczY0owAiwBqsCS4BtiwR87gs7PnwXmGlOFIM1Pi3JvYK M/x8JQAvOU4Otevcap+zL7Bjf3ZWIs3nLCyNRYRa7nCfDt10fa7bFTo3m0Hi6THCfVEa pSCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8gfPtizz6dsjfyqXkzp87HRChpZO+AMuuO+Rq7TH6Ag=; b=YU/6j1vNRlf5CZLm9WqH/nk8oWJtkr7GyknwX0evVKJkf+Nujed7NR0UrLrU3EmXjf BZsfWDXHoYhQM8+YH7e7gPzJOU9tqLYcLmQY75VVukwKpgn6QFaNUgQSru7FNLsFXm15 p629sj9H6OJmnwcO8V/oQ7OeXIRZBtBP0lw05U4rxsJ9jH/HfKwKYCgpz2+WTRP/cXrZ xxSNW+Z3IPLI87W64dal/nqHV9uZxCB8Eda0WlcuHNDWaua31p/gMBFCzNWFD5md+vxY fHQBSHAtnUdUHfrquF+0CoumLYc9RHCizw6AY2QH5jS1IjcqbV1MKCcphIddW4W++eNI m0RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K23LPUi1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a63b912000000b00517aa9db92dsi18236433pge.396.2023.05.16.08.57.01; Tue, 16 May 2023 08:57:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K23LPUi1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234195AbjEPPrt (ORCPT + 99 others); Tue, 16 May 2023 11:47:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234194AbjEPPrf (ORCPT ); Tue, 16 May 2023 11:47:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE9FE8A48; Tue, 16 May 2023 08:47:11 -0700 (PDT) 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 3183A634FA; Tue, 16 May 2023 15:46:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69CF2C433A0; Tue, 16 May 2023 15:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684251987; bh=+PXaRTBSn60jQ/X7Rv0TDk12fsmWqv5PZ6FzfOCld7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K23LPUi1cGEmRv5eV1Nv/q8aasoK1fyVpkve5eGfHtw3d/bIG+h+wHe+0CwHSxL4k 36dMGKcxmRgmRfKSKV20BQknak7j5m2zroRfqznnoNuOdeQN5nWwNOND4omv0084mB otqjvUSxNEouxQl6gNzZgIXjU1Q6CyNMEa7VPLZW8G0+VnWgB4Kn3Wmb8hR6kx2NtC 9GOrPVKyBicSYc14OJABRBn/5ctmu6ro61sOKq+nkN8OFZWT2Rqmq1aaVzu0Fftm/A AnMS1nqKi0fOpcQp6ASMbji/5Or0BlQ9Zcwer7L1VwLmD3ttvxFfge0gm+PJeRhPOT s0YH+0qJMW7hg== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 03/16] ARM: vfp: include asm/neon.h in vfpmodule.c Date: Tue, 16 May 2023 17:45:52 +0200 Message-Id: <20230516154605.517690-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066893788181431?= X-GMAIL-MSGID: =?utf-8?q?1766066893788181431?= From: Arnd Bergmann Two functions defined here need the declaration in a header to avoid W=1 warnings: arch/arm/vfp/vfpmodule.c:735:6: error: no previous prototype for 'kernel_neon_begin' [-Werror=missing-prototypes] arch/arm/vfp/vfpmodule.c:768:6: error: no previous prototype for 'kernel_neon_end' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/arm/vfp/vfpmodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 349dcb944a93..1ba5078c1025 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "vfpinstr.h" #include "vfp.h" From patchwork Tue May 16 15:45:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94785 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp541032vqo; Tue, 16 May 2023 09:08:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5IGSdV6LmOBAUMJstzOKkcfNuHuulDdXDaTDGD127z0qbkYIcSmClCxWtCr6dMvuGv8bFb X-Received: by 2002:a05:6870:1a93:b0:18e:9bf1:758b with SMTP id ef19-20020a0568701a9300b0018e9bf1758bmr18152139oab.12.1684253308813; Tue, 16 May 2023 09:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253308; cv=none; d=google.com; s=arc-20160816; b=o9MrieLduX+ludFJ1InqA70mtER8SOMdfv/rNqXjhi2ZixuxIAy6AFF+itRrvsWmMh qg9gd2F9ydvS8w1LaoDax00p4+Ma5xsIxmZknyvLNu8C58h7V6z1GqgCJ1e9YffrHx17 Dadv6C1l10reb7j90eadhZvC9GSrYggLX/oGb7BS6v3lmQM5hI1Mvn1j3gr/vYSIXGna CmzOeA6PB+yFttCdYsAmBC7hSKsj5eKXsuTRUyhUZ2czCUFuIdYeoOSgwiM+fxXVIS6i UADi64W1nISeZCtO/HIkFtIS/wfb94HzHFiG/LP8I0/xTdERdoTXr7Ckj9m6a8zcbM7e weyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qiCgNG555XDxSJk8aF0COJDSZjelNPHsNtfY5bFT6rI=; b=eTMPQ0IlV1o0/s/ZeKhmxzfqFLIn/eBFueazAk5//QvM03DHQJYKA6ajHFX4wCxl/5 pBYg7A88ACVNnrC7QrodwWQR4C7mEOiYOVPF0VnKgey6elN9RpKhWSuO9rABPCDjbjR7 9a0kiiEfbe8kjAOeV9TF3M7U72OOIrjOHCzvkJ4C8Whr5FwzfX3E/o8n/p2/pjqjP9Bc 8AbF3+oDhsCF6bFQNANJ2o7nFFPMlXPcVuhWVYB3sAeiPYOWr8gIDy8RtOY+GZ5KZeyi j7PAw3WJ+msKexCS+W2dOdPrEZAviiilcbfy1ayRnwceKvtvCssB1XAdOTz4uPoFJkT+ 5Sdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sxSO5s1R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm13-20020a056870b60d00b0019640f81059si11082772oab.211.2023.05.16.09.08.15; Tue, 16 May 2023 09:08:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sxSO5s1R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234265AbjEPPr6 (ORCPT + 99 others); Tue, 16 May 2023 11:47:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234201AbjEPPrj (ORCPT ); Tue, 16 May 2023 11:47:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0004F7EC4; Tue, 16 May 2023 08:47:14 -0700 (PDT) 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 CF61163BA3; Tue, 16 May 2023 15:46:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17F63C4331D; Tue, 16 May 2023 15:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684251991; bh=6a4E3hOiBRNKm/YMm19jLYIBcL0Rao1gaj6adOyNw3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sxSO5s1RLwegkfthAeCa+WE9I4fFrht8PmKA36QXkndW/TCG288ZCdOB08/bAT4vG GmclOMl9Z2rdOGDS2k7j/tSZ93+cbrmb6yvIcTFP1Bum86FrHxdQEZgpODOflL2Q46 tyfSk0Oc65tXezH+YTfDQY6nXIURh8n7qCHYaq65FtXKX43DlE9b2yOpIkStHO/eoD fB7dnQjIsF/Y01PffnYMc4OChQWX17gfK4kOR2kWc5Zj8xwsPS0rNzl3/idXx/CLYs GAMMBMMCMkBObjh5gv8Wjh3YDKb5pBPmW613+YuEo9Ci7L+xaeNzU67YbxH86PszAM F2jOvpboazMhg== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 04/16] ARM: vdso: add missing prototypes Date: Tue, 16 May 2023 17:45:53 +0200 Message-Id: <20230516154605.517690-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766067597427123225?= X-GMAIL-MSGID: =?utf-8?q?1766067597427123225?= From: Arnd Bergmann The __vdso_clock_* functions have no prototype, and the __eabi_unwind_cpp_pr* functions have a prototype in a header that is not included before the definition: arch/arm/vdso/vgettimeofday.c:10:5: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes] arch/arm/vdso/vgettimeofday.c:16:5: error: no previous prototype for '__vdso_clock_gettime64' [-Werror=missing-prototypes] arch/arm/vdso/vgettimeofday.c:22:5: error: no previous prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes] arch/arm/vdso/vgettimeofday.c:28:5: error: no previous prototype for '__vdso_clock_getres' [-Werror=missing-prototypes] arch/arm/vdso/vgettimeofday.c:36:6: error: no previous prototype for '__aeabi_unwind_cpp_pr0' [-Werror=missing-prototypes] arch/arm/vdso/vgettimeofday.c:40:6: error: no previous prototype for '__aeabi_unwind_cpp_pr1' [-Werror=missing-prototypes] arch/arm/vdso/vgettimeofday.c:44:6: error: no previous prototype for '__aeabi_unwind_cpp_pr2' [-Werror=missing-prototypes] Add the prototypes in an appropriate header and ensure that both are included here. Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/vdso.h | 5 +++++ arch/arm/vdso/vgettimeofday.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/arch/arm/include/asm/vdso.h b/arch/arm/include/asm/vdso.h index 5b85889f82ee..422c3afa806a 100644 --- a/arch/arm/include/asm/vdso.h +++ b/arch/arm/include/asm/vdso.h @@ -24,6 +24,11 @@ static inline void arm_install_vdso(struct mm_struct *mm, unsigned long addr) #endif /* CONFIG_VDSO */ +int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts); +int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts); +int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz); +int __vdso_clock_getres(clockid_t clock_id, struct old_timespec32 *res); + #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c index 1976c6f325a4..a003beacac76 100644 --- a/arch/arm/vdso/vgettimeofday.c +++ b/arch/arm/vdso/vgettimeofday.c @@ -6,6 +6,8 @@ */ #include #include +#include +#include int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts) From patchwork Tue May 16 15:45:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp527883vqo; Tue, 16 May 2023 08:50:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5R4tVfyYLEhF/cSXyMagdmL97/QAVEcnPmZnPK+GPeUAuT66iLqltg63Jk2Q3bFE8iLFr+ X-Received: by 2002:a17:902:e5c1:b0:1ab:1bb0:126d with SMTP id u1-20020a170902e5c100b001ab1bb0126dmr51488873plf.23.1684252223118; Tue, 16 May 2023 08:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252223; cv=none; d=google.com; s=arc-20160816; b=sk79pLdsHiDxvGQR5HgSSfllEYLzwVh62roqFeK0/coZSOiDTY4RnlUcjjb7eXQyeg 4YwzTWpmXp3J9cekflK2/HwtYZdLYEh0rt2+vJwnW5k8Ue0ByuUo2DlQLgYVGvWzTLYK /x6P/nNmseKyscJUDsR1FsAIpiRRs6mFW87zQ+BxWH5YWwVPicri68FAjHx2lUnYzJDB UT5t/xmm7aYyMH7fU404AIg2h5JFQCOfAqnElcOeuzK7HpnZJ1d43hV4ZZw2RFs6Ihe1 OdlxwjdOK7IQj3L+BL/5JV4WDotz9WoMofkGK9PfNAtgbAXR2hOkPu6rehzp4c5Df3FH keSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SrZ5mdvPCnSFzvLJ4y+AOOABNWmLRnmyWfGYCsVCP2U=; b=w2PkqMvNfc6q99bYUHjk76JlhQZnSokxswz4mDGkbpvRTtGuVkAyXc/IWqEw60nFNj QRzqjZ/R7zgYiKfAHJMwu8a3aGEkh+cf4knv6r2dLm4RKFyrOQs7S59uqgn/icIjAYsQ g1NBP/DJvsFwBvRFV+yftCu728j347NiZGpRBESsGCqVwLobKCB14PVMyLHSPnl3OyqR db16fJFoKVkH+QZ2A4wR1DVvaqJrOEaXOfpgiGyUdbn861TGX8OWfKfW5zJvvrTtPnQR N/PHTwb7XP3Ekmn2rV+GKWcHhVFLEhaRd2Sd6cWLckENz9rTgiLkkWQxQsGKnXc408QI oiDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ekO8uOzS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a170902f54700b001adc5bc4d8asi14924029plf.572.2023.05.16.08.50.08; Tue, 16 May 2023 08:50:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ekO8uOzS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234136AbjEPPrm (ORCPT + 99 others); Tue, 16 May 2023 11:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234123AbjEPPrb (ORCPT ); Tue, 16 May 2023 11:47:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B468729B; Tue, 16 May 2023 08:47:06 -0700 (PDT) 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 7B3D863B8A; Tue, 16 May 2023 15:46:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B61C1C433EF; Tue, 16 May 2023 15:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684251994; bh=dXBlQ/V//CAld9Zb0TbDNQnCZz81ajEyrr7yhy/j8jk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ekO8uOzS8UOBScCg/Eh5rmcljFMrzvgoFeydWN9s7Ug6v4YpN5EjcFc7ItImF46UX csbTFJ1XI5ClMr6WUYgu1zQ06BkjA0Hfi5zf/XSWCqngzJdgK2qGraMs5u3Kp+XHYF 2VxYNEAdnVKZI84Bi1390uylmUVmpcgAiAlmrw6mFN/u1kmIqArSy2RBMA9agzdHzJ jfmQhITUEAiE2FVI2bP6BaT/qAHp87HicOfHVpAuPrb/ki6SPIN5o2EIw2mEdDoU/r Zzoemkp11xwa4EI/lLeUkPxZrABeYu8yF2MCq+QuQG7GESwmZizdtO5iQ628kfFFSL Br9U7WFehk8IQ== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 05/16] ARM: kprobes: avoid missing-declaration warnings Date: Tue, 16 May 2023 17:45:54 +0200 Message-Id: <20230516154605.517690-6-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066459453994245?= X-GMAIL-MSGID: =?utf-8?q?1766066459453994245?= From: Arnd Bergmann checker_stack_use_t32strd() and kprobe_handler() can be made static since they are not used from other files, while coverage_start_registers() and __kprobes_test_case() are used from assembler code, and just need a declaration to avoid a warning with the global definition. arch/arm/probes/kprobes/checkers-common.c:43:18: error: no previous prototype for 'checker_stack_use_t32strd' arch/arm/probes/kprobes/core.c:236:16: error: no previous prototype for 'kprobe_handler' arch/arm/probes/kprobes/test-core.c:723:10: error: no previous prototype for 'coverage_start_registers' arch/arm/probes/kprobes/test-core.c:918:14: error: no previous prototype for '__kprobes_test_case_start' arch/arm/probes/kprobes/test-core.c:952:14: error: no previous prototype for '__kprobes_test_case_end_16' arch/arm/probes/kprobes/test-core.c:967:14: error: no previous prototype for '__kprobes_test_case_end_32' Fixes: 6624cf651f1a ("ARM: kprobes: collects stack consumption for store instructions") Fixes: 454f3e132d05 ("ARM/kprobes: Remove jprobe arm implementation") Signed-off-by: Arnd Bergmann Acked-by: Masami Hiramatsu (Google) --- arch/arm/probes/kprobes/checkers-common.c | 2 +- arch/arm/probes/kprobes/core.c | 2 +- arch/arm/probes/kprobes/opt-arm.c | 2 -- arch/arm/probes/kprobes/test-core.c | 2 +- arch/arm/probes/kprobes/test-core.h | 4 ++++ 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/probes/kprobes/checkers-common.c b/arch/arm/probes/kprobes/checkers-common.c index 4d720990cf2a..eba7ac4725c0 100644 --- a/arch/arm/probes/kprobes/checkers-common.c +++ b/arch/arm/probes/kprobes/checkers-common.c @@ -40,7 +40,7 @@ enum probes_insn checker_stack_use_imm_0xx(probes_opcode_t insn, * Different from other insn uses imm8, the real addressing offset of * STRD in T32 encoding should be imm8 * 4. See ARMARM description. */ -enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn, +static enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn, struct arch_probes_insn *asi, const struct decode_header *h) { diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c index 88999ed2cfc4..3ee0e3024ff0 100644 --- a/arch/arm/probes/kprobes/core.c +++ b/arch/arm/probes/kprobes/core.c @@ -233,7 +233,7 @@ singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb) * kprobe, and that level is reserved for user kprobe handlers, so we can't * risk encountering a new kprobe in an interrupt handler. */ -void __kprobes kprobe_handler(struct pt_regs *regs) +static void __kprobes kprobe_handler(struct pt_regs *regs) { struct kprobe *p, *cur; struct kprobe_ctlblk *kcb; diff --git a/arch/arm/probes/kprobes/opt-arm.c b/arch/arm/probes/kprobes/opt-arm.c index dbef34ed933f..7f65048380ca 100644 --- a/arch/arm/probes/kprobes/opt-arm.c +++ b/arch/arm/probes/kprobes/opt-arm.c @@ -145,8 +145,6 @@ __arch_remove_optimized_kprobe(struct optimized_kprobe *op, int dirty) } } -extern void kprobe_handler(struct pt_regs *regs); - static void optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs) { diff --git a/arch/arm/probes/kprobes/test-core.c b/arch/arm/probes/kprobes/test-core.c index c562832b8627..171c7076b89f 100644 --- a/arch/arm/probes/kprobes/test-core.c +++ b/arch/arm/probes/kprobes/test-core.c @@ -720,7 +720,7 @@ static const char coverage_register_lookup[16] = { [REG_TYPE_NOSPPCX] = COVERAGE_ANY_REG | COVERAGE_SP, }; -unsigned coverage_start_registers(const struct decode_header *h) +static unsigned coverage_start_registers(const struct decode_header *h) { unsigned regs = 0; int i; diff --git a/arch/arm/probes/kprobes/test-core.h b/arch/arm/probes/kprobes/test-core.h index 56ad3c0aaeea..c7297037c162 100644 --- a/arch/arm/probes/kprobes/test-core.h +++ b/arch/arm/probes/kprobes/test-core.h @@ -454,3 +454,7 @@ void kprobe_thumb32_test_cases(void); #else void kprobe_arm_test_cases(void); #endif + +void __kprobes_test_case_start(void); +void __kprobes_test_case_end_16(void); +void __kprobes_test_case_end_32(void); From patchwork Tue May 16 15:45:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94773 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp532646vqo; Tue, 16 May 2023 08:58:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vgp8vImkkaN2pKOITueLPSG2SgsULHbHW1izjfFTd7RDHhIXAwxJfAWH5F+YJioBHn0UD X-Received: by 2002:a05:6a00:1251:b0:64b:50:2410 with SMTP id u17-20020a056a00125100b0064b00502410mr15825504pfi.19.1684252723093; Tue, 16 May 2023 08:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252723; cv=none; d=google.com; s=arc-20160816; b=vL0aiSieMMLwLLv2b+Nvc4G0K1zTTweSFxZF/AlBDvgPJUtMtI7OD4N4mvWvq26JSf UmmMJemrJY04aMrton54Vt5TCihfg+oizHHacWO95cvO3eCXbpMzNKx57+Ez1rL1sVjw RJ2fxo8piceWd40IEj8mRJzx+LNHV8yVqWZnndpdXnZdZxDrtXSFWRP6uJpTv5KMqHNa vr9i6DCIU95/swyfy3p9pJyffW1yspHcpLLFaoStJPf64tUi06lElHleg/G3kWmFIhY0 xRQtUDaX4P2yUQkqL22D7xJUa8bCDepTPcEhbJ2RVIRpKUVVKcHFn6+SDITy/XDMWxcT HhlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Jp9cFMxgWR10SnxAYEb7jyc00dA9cWwQ0PoozACwoxA=; b=Omje5W9vxfVyNtA3uUp1GKEOQnZvViSQxUAU4Wagip9vg95Urrxqqhoa2UL7/FZY1m OFKUY34oLgYZl7IZY8+5oCGpkvDl2pqPvoCgazhbQfLWmdsxWZtBJLpeYF05Jh8GOW/r dJqRLH2OPBl6S7pjJuxhJx6ifK47fV92WXuDKd29wAazEnHHDkIixI93bi9a5+/ZfeEB S9vOQbVoxKRADGRntmxFo2wa1cd5E/FKR+G/tDfyhNrMlZN67XmoZP8WL24r2v2R/E7a OPTaR72F/stl87ZjzCJ5owsMw35w5LIdtwVwjBxWwb5YbKD6+a3/DowbzvbpW1zdPf8D qQiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u8ce39x0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11-20020aa7962b000000b0064309ecbad9si19377223pfg.30.2023.05.16.08.58.28; Tue, 16 May 2023 08:58:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u8ce39x0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234218AbjEPPrk (ORCPT + 99 others); Tue, 16 May 2023 11:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234142AbjEPPra (ORCPT ); Tue, 16 May 2023 11:47:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1FFD9009; Tue, 16 May 2023 08:47:05 -0700 (PDT) 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 289B56199D; Tue, 16 May 2023 15:46:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 622B5C433A1; Tue, 16 May 2023 15:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684251998; bh=bb4tLM7F7LcxwwEo0PKA82PjYT5xeKwmGZrmJ2KR1Mc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u8ce39x0iL4VHXseEGqG0JIzbnLLnqNL/0pzr0qYvUxVaZ8NJ4MQ1LZaWaWaGYxjz k7eseCM1DeE6sB51PtFOtE+loAd/Q7L/Upvbf302nIuitTZSjgAgoGlL5OA67qLTU8 JBZbJyQ3IGejsPcW14ZnIKNRYDRaWaEynLLz+kYNVTD8n+4c8QqwvjtKMSWvBv+cT2 T+fPHjwVLaDtlNONHS0Ts6ZOYg1cykE2dbGdGQfR/OmniqrO2P57LBFf+xvjGSlpCf zG6SpiGr4NGe4Eh8LrrsZI6PX8qymD76AWPG680zqwEjWTC04mlal+NncPDzd4a3kg kqW3/ADTQzuWA== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 06/16] ARM: tcm: move tcm_init() prototype to asm/tcm.h Date: Tue, 16 May 2023 17:45:55 +0200 Message-Id: <20230516154605.517690-7-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066983315910320?= X-GMAIL-MSGID: =?utf-8?q?1766066983315910320?= From: Arnd Bergmann The function definition is in a file that does not include the header with the declaration: arch/arm/kernel/tcm.c:256:13: error: no previous prototype for 'tcm_init' Move the declaration to a global header where it can actually be included. Fixes: de40614e92bf ("ARM: 7694/1: ARM, TCM: initialize TCM in paging_init(), instead of setup_arch()") Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- arch/arm/include/asm/tcm.h | 11 ++++++++--- arch/arm/mm/mmu.c | 2 +- arch/arm/mm/tcm.h | 17 ----------------- 3 files changed, 9 insertions(+), 21 deletions(-) delete mode 100644 arch/arm/mm/tcm.h diff --git a/arch/arm/include/asm/tcm.h b/arch/arm/include/asm/tcm.h index d8bd8a4b0ede..e1f7dca86a22 100644 --- a/arch/arm/include/asm/tcm.h +++ b/arch/arm/include/asm/tcm.h @@ -9,9 +9,7 @@ #ifndef __ASMARM_TCM_H #define __ASMARM_TCM_H -#ifndef CONFIG_HAVE_TCM -#error "You should not be including tcm.h unless you have a TCM!" -#endif +#ifdef CONFIG_HAVE_TCM #include @@ -29,4 +27,11 @@ void tcm_free(void *addr, size_t len); bool tcm_dtcm_present(void); bool tcm_itcm_present(void); +void __init tcm_init(void); +#else +/* No TCM support, just blank inlines to be optimized out */ +static inline void tcm_init(void) +{ +} +#endif #endif diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 463fc2a8448f..f3a52c08a200 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +38,6 @@ #include "fault.h" #include "mm.h" -#include "tcm.h" extern unsigned long __atags_pointer; diff --git a/arch/arm/mm/tcm.h b/arch/arm/mm/tcm.h deleted file mode 100644 index 6b80a760d875..000000000000 --- a/arch/arm/mm/tcm.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) 2008-2009 ST-Ericsson AB - * TCM memory handling for ARM systems - * - * Author: Linus Walleij - * Author: Rickard Andersson - */ - -#ifdef CONFIG_HAVE_TCM -void __init tcm_init(void); -#else -/* No TCM support, just blank inlines to be optimized out */ -static inline void tcm_init(void) -{ -} -#endif From patchwork Tue May 16 15:45:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp532153vqo; Tue, 16 May 2023 08:57:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ61pcdoV5Gt79nu2M2h+ostEI4xh/+lD5r3UGJrHxrzY5a12KBoPRnC0cYJQays8hf5Ct4l X-Received: by 2002:a17:90a:5a47:b0:253:3930:b86 with SMTP id m7-20020a17090a5a4700b0025339300b86mr569951pji.8.1684252671951; Tue, 16 May 2023 08:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252671; cv=none; d=google.com; s=arc-20160816; b=e+0lXdXOMNpCTzJVnPKH2DH9YjWjCHJoUtzP1ouHKCyzApYz4+VC1t79KyzqfUWB2X Unz25eTBrNCSOHhMXq7lot4qTYPFtxjxjF1DR5+I+ircK4uT3spSD98+EzPvdTW3RiI4 pFGph0siiL7R4Gk3KqgayKkaC2hYrBHHWOkUi92aNnF2TRwMlox3v5gJGICdJtpxgTpj vXBPaCmOZyabnHzAgiqGrbb+t0i5oDOKcjDZUvwYL0ZhyB1bEJhLYQf36wQBtnCFma87 zNclesSgKah5VE1iBzt04A2ePMQk4Ih9/HTtUv22ywHyeqww0UGGHSuQ9VEngWR6zq5G +ONQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ByZ7zcpDAMzWfMV2vrItX8QvtRSqvMWF3Dp473zktWw=; b=Ego/v6K2WF1QioUmvfybiIyr87bSSY4RWgvvcUhEyeG4wA/VHYbrqx/kIFAffwshNc WET/v4SLFHB0m56WHJgjymbyyus3QJwuM1WB935NcT/ovHtkqZbpP8ZYoCxigafzUTyh Tl5rW9YCye4r9GMypW1GJ56e9+S7ZCIk1wryVswU+dQs+TcGCjCScDZ44Dhd+5yXUfMm MHoTQVzGN3LB+a+p2yR4nfefOIOmfLdKBsYPTIhqqaLOeg/9RCd+DDm7McKTTCNTzUXS BmWyg43+ysrC0ZQNq5VIB/oxciZa1N6XMlr0RxJwrfQh88GUkBn4bWKnO+rVQPGYVcrC +WbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XupDrLYZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e62-20020a17090a6fc400b0025330a420ffsi854017pjk.186.2023.05.16.08.57.35; Tue, 16 May 2023 08:57:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XupDrLYZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234198AbjEPPs1 (ORCPT + 99 others); Tue, 16 May 2023 11:48:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234294AbjEPPsD (ORCPT ); Tue, 16 May 2023 11:48:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B29769ED1; Tue, 16 May 2023 08:47:43 -0700 (PDT) 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 C815F63B99; Tue, 16 May 2023 15:46:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10D8FC433D2; Tue, 16 May 2023 15:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252002; bh=KLWXUkA+xw6ufIF2Y6Rrjld4fO8/uWU2onDLin/MBKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XupDrLYZfz0Ho8oARZnpqlV7xaLVt+1SYX+Rw9GsFzYijEbjeT3Fc29pymQBw2kun S46mkDG+ogDR5ZzG2DeBnrbJEjreYn1tdgGC42+VNYBRz+PnMnC1A93y6G17a0dBqd /71Le/zYCKvn3XuVjeeyuL2WYkt5EQnNSCKUFjijliubp5V8krFUKrnbdpYmfHjdNp OwlZ3MsP8J9aRERPsdfRrww1xfsOKIPo1bsN2dyVzufqWxlG33Ef6aTAst+NJwUUku WFbsGGc/WBmluku+L3eIJnNql2v60EpQSjdsufl8imSMZXbEvj+zi2zGJPc71Upc7U kRpmvCR1blZUw== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 07/16] ARM: add prototype for function called only from asm Date: Tue, 16 May 2023 17:45:56 +0200 Message-Id: <20230516154605.517690-8-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066929566024369?= X-GMAIL-MSGID: =?utf-8?q?1766066929566024369?= From: Arnd Bergmann When building with 'make W=1', the compiler warns about any function definition that does not come with a prototype in a header, to ensure it matches what the caller expects. This includes functions that are only ever caller from assembly code and don't technically need a declaration: arch/arm/kernel/ftrace.c:227:6: error: no previous prototype for 'prepare_ftrace_return' arch/arm/kernel/ptrace.c:850:16: error: no previous prototype for 'syscall_trace_enter' arch/arm/kernel/ptrace.c:878:17: error: no previous prototype for 'syscall_trace_exit' arch/arm/kernel/signal.c:601:1: error: no previous prototype for 'do_work_pending' arch/arm/kernel/signal.c:672:17: error: no previous prototype for 'do_rseq_syscall' arch/arm/kernel/suspend.c:75:6: error: no previous prototype for '__cpu_suspend_save' arch/arm/kernel/traps.c:451:17: error: no previous prototype for 'do_undefinstr' arch/arm/kernel/traps.c:516:39: error: no previous prototype for 'handle_fiq_as_nmi' arch/arm/kernel/traps.c:535:17: error: no previous prototype for 'bad_mode' arch/arm/kernel/traps.c:608:16: error: no previous prototype for 'arm_syscall' arch/arm/kernel/traps.c:734:1: error: no previous prototype for 'baddataabort' arch/arm/kernel/traps.c:774:17: error: no previous prototype for '__div0' arch/arm/kernel/traps.c:97:6: error: no previous prototype for 'dump_backtrace_stm' arch/arm/kernel/unwind.c:40:6: error: no previous prototype for '__aeabi_unwind_cpp_pr0' arch/arm/kernel/unwind.c:45:6: error: no previous prototype for '__aeabi_unwind_cpp_pr1' arch/arm/kernel/unwind.c:50:6: error: no previous prototype for '__aeabi_unwind_cpp_pr2' arch/arm/mm/fault.c:554:1: error: no previous prototype for 'do_DataAbort' arch/arm/mm/fault.c:584:1: error: no previous prototype for 'do_PrefetchAbort' arch/arm/mm/proc-v7-bugs.c:280:6: error: no previous prototype for 'cpu_v7_ca8_ibe' arch/arm/mm/proc-v7-bugs.c:293:6: error: no previous prototype for 'cpu_v7_bugs_init' arch/arm/vdso/vgettimeofday.c:36:6: error: no previous prototype for '__aeabi_unwind_cpp_pr0' arch/arm/vdso/vgettimeofday.c:40:6: error: no previous prototype for '__aeabi_unwind_cpp_pr1' arch/arm/vdso/vgettimeofday.c:44:6: error: no previous prototype for '__aeabi_unwind_cpp_pr2' arch/arm/vfp/vfpmodule.c:323:6: error: no previous prototype for 'VFP_bounce' Add the prototypes anyway, to allow enabling this warning by default in the future. Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/ftrace.h | 4 ++++ arch/arm/include/asm/ptrace.h | 3 +++ arch/arm/include/asm/signal.h | 5 +++++ arch/arm/include/asm/spectre.h | 4 ++++ arch/arm/include/asm/suspend.h | 1 + arch/arm/include/asm/traps.h | 9 +++++++++ arch/arm/include/asm/unwind.h | 4 ++++ arch/arm/include/asm/vfp.h | 1 + arch/arm/mm/fault.h | 4 ++++ 9 files changed, 35 insertions(+) diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index 4e29bff7556d..3b2d84ec11f3 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h @@ -73,6 +73,10 @@ static inline bool arch_syscall_match_sym_name(const char *sym, return !strcasecmp(sym, name); } +void prepare_ftrace_return(unsigned long *parent, unsigned long self, + unsigned long frame_pointer, + unsigned long stack_pointer); + #endif /* ifndef __ASSEMBLY__ */ #endif /* _ASM_ARM_FTRACE */ diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 483b8ddfcb82..7f44e88d1f25 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h @@ -193,5 +193,8 @@ static inline unsigned long it_advance(unsigned long cpsr) return cpsr; } +int syscall_trace_enter(struct pt_regs *regs); +void syscall_trace_exit(struct pt_regs *regs); + #endif /* __ASSEMBLY__ */ #endif diff --git a/arch/arm/include/asm/signal.h b/arch/arm/include/asm/signal.h index 430be7774402..8b84092d1518 100644 --- a/arch/arm/include/asm/signal.h +++ b/arch/arm/include/asm/signal.h @@ -22,4 +22,9 @@ typedef struct { #define __ARCH_HAS_SA_RESTORER #include + +void do_rseq_syscall(struct pt_regs *regs); +int do_work_pending(struct pt_regs *regs, unsigned int thread_flags, + int syscall); + #endif diff --git a/arch/arm/include/asm/spectre.h b/arch/arm/include/asm/spectre.h index 85f9e538fb32..d9c28b3b6b62 100644 --- a/arch/arm/include/asm/spectre.h +++ b/arch/arm/include/asm/spectre.h @@ -35,4 +35,8 @@ static inline void spectre_v2_update_state(unsigned int state, int spectre_bhb_update_vectors(unsigned int method); +void cpu_v7_ca8_ibe(void); +void cpu_v7_ca15_ibe(void); +void cpu_v7_bugs_init(void); + #endif diff --git a/arch/arm/include/asm/suspend.h b/arch/arm/include/asm/suspend.h index 506314265c6f..be81b9ca2ea1 100644 --- a/arch/arm/include/asm/suspend.h +++ b/arch/arm/include/asm/suspend.h @@ -13,5 +13,6 @@ extern void cpu_resume(void); extern void cpu_resume_no_hyp(void); extern void cpu_resume_arm(void); extern int cpu_suspend(unsigned long, int (*)(unsigned long)); +extern void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr); #endif diff --git a/arch/arm/include/asm/traps.h b/arch/arm/include/asm/traps.h index 987fefb0a4db..0aaefe3e1700 100644 --- a/arch/arm/include/asm/traps.h +++ b/arch/arm/include/asm/traps.h @@ -35,4 +35,13 @@ extern void ptrace_break(struct pt_regs *regs); extern void *vectors_page; +asmlinkage void dump_backtrace_stm(u32 *stack, u32 instruction, const char *loglvl); +asmlinkage void do_undefinstr(struct pt_regs *regs); +asmlinkage void handle_fiq_as_nmi(struct pt_regs *regs); +asmlinkage void bad_mode(struct pt_regs *regs, int reason); +asmlinkage int arm_syscall(int no, struct pt_regs *regs); +asmlinkage void baddataabort(int code, unsigned long instr, struct pt_regs *regs); +asmlinkage void __div0(void); +asmlinkage void handle_bad_stack(struct pt_regs *regs); + #endif diff --git a/arch/arm/include/asm/unwind.h b/arch/arm/include/asm/unwind.h index b51f85417f58..d60b09a5acfc 100644 --- a/arch/arm/include/asm/unwind.h +++ b/arch/arm/include/asm/unwind.h @@ -40,6 +40,10 @@ extern void unwind_table_del(struct unwind_table *tab); extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk, const char *loglvl); +void __aeabi_unwind_cpp_pr0(void); +void __aeabi_unwind_cpp_pr1(void); +void __aeabi_unwind_cpp_pr2(void); + #endif /* !__ASSEMBLY__ */ #ifdef CONFIG_ARM_UNWIND diff --git a/arch/arm/include/asm/vfp.h b/arch/arm/include/asm/vfp.h index 157ea3426158..5b57b8768bac 100644 --- a/arch/arm/include/asm/vfp.h +++ b/arch/arm/include/asm/vfp.h @@ -102,6 +102,7 @@ #ifndef __ASSEMBLY__ void vfp_disable(void); +void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs); #endif #endif /* __ASM_VFP_H */ diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h index 54927ba1fa6e..e8f8c1902544 100644 --- a/arch/arm/mm/fault.h +++ b/arch/arm/mm/fault.h @@ -37,5 +37,9 @@ static inline int fsr_fs(unsigned int fsr) void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs); void early_abt_enable(void); +asmlinkage void do_DataAbort(unsigned long addr, unsigned int fsr, + struct pt_regs *regs); +asmlinkage void do_PrefetchAbort(unsigned long addr, unsigned int ifsr, + struct pt_regs *regs); #endif /* __ARCH_ARM_FAULT_H */ From patchwork Tue May 16 15:45:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94767 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp529535vqo; Tue, 16 May 2023 08:53:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KmwBLIgRFxuMRmQqFbtXF1Bt3uY5bKt0GOc5cCf4EC4ggkiybJ3wJdh7u7z3dF400Z4Rd X-Received: by 2002:a05:6a20:4320:b0:f4:24e6:1065 with SMTP id h32-20020a056a20432000b000f424e61065mr32235825pzk.39.1684252398314; Tue, 16 May 2023 08:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252398; cv=none; d=google.com; s=arc-20160816; b=lkshTFUXE13LOn2vf+qp0HPfA5MtkMmn0AHEaR2apSauXZ/eZzELnsz8HpDv5ojT2A eE2KthbX3bAf8fKpQ5x6b2d2UpnaESpLNemb517p8VILTHske5dS3qJy6GA00/7TH0st OavqRBsDSNLJW66iSE4XGCvruDSBrD0766mzIu0Zfg6KqH5e0dHu6Oo0DrKcMF4WB02H 3qdLsBxrYkJmvsLmZQpqzwaJ2iooDSzmwFvzJ5SOw7NL80f3SHobghIPViT6FL+HeSl2 iM0GR4pMAT5qjyA3N6Phh2kGJfCmG1+jzud3ivXmeRFPoEHQ3dW788nF+mHkaNbEPc7W 33fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/uQr/EqUOg4xrYVGaB9SZx/HwDroMva0smqr4ShjeDI=; b=lDrZFVGRV7vwmF/6E9nUIrTtgB/lxs/eeIdnBmnapSf2meGpd2IERb/04al15p6tSP ePk/vf/yawg4ffGObp5x1fyQGTKSJmDzPK4ZnYfK4tl3hHQIb0swcp14wwenRBX1gDay k+KdsXk6TlLSD0JCr4ylj5QsvxQoNMV8fttDK5402UsFypw3W5yMph5VRAp5GBJnPgsY /W6VUff4OUAgxzLtrlVos7cqo7l4Jq64URjFeK5bG4muOLZbfck8Fdd8+cgBscVauR15 DNmmEMggMZasaAySbWbc5s0gL02heOVYkKZcBumyARjL9Q7qROO2qAQMUgpzL/KU6/JC 8J/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kzAdBbWl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k189-20020a6384c6000000b00533fce755adsi6762311pgd.130.2023.05.16.08.53.03; Tue, 16 May 2023 08:53:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kzAdBbWl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234224AbjEPPsA (ORCPT + 99 others); Tue, 16 May 2023 11:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234205AbjEPPrj (ORCPT ); Tue, 16 May 2023 11:47:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 586847EDD; Tue, 16 May 2023 08:47:15 -0700 (PDT) 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 6C09463B9D; Tue, 16 May 2023 15:46:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB8BDC433A0; Tue, 16 May 2023 15:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252005; bh=1m6Ec7twcC2NaPKOcuVM9lqODfTf5Y70mYt0kY6b7Xc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kzAdBbWlRCx5TDu2jFFXn3n3DHysi9+vGwC0OBd7f12eUbKsSemdnlSDW3q6NrJGx Sx1LPRHBbeaaOIGPV5Oqn4wHxc9Wy+tYfs5RtyzErb6id1wcUuT6v87ecvr23dchZc 3nqiENT39Md26RlUzH+95As0vTZcHfmJn+NuGWomLfwdG/9BranS8XX98YuzvfMB9V sdAVg1wVi5/qeBf8CYTB+VHKQfI+VRnnVOehKeLaGk5QS6VrzNnXggzacrI7WO3M6k VurEaGGym4T17vwJ7/3+mb0OxWk2rD1XpLWU6JFQMC34XlrQvpGLhuBjj1n/wwozc0 rS1sgWSyPmm/g== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 08/16] ARM: add clear/copy_user_highpage declarations Date: Tue, 16 May 2023 17:45:57 +0200 Message-Id: <20230516154605.517690-9-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066643025518717?= X-GMAIL-MSGID: =?utf-8?q?1766066643025518717?= From: Arnd Bergmann The CPU specific helpers have to be global functions when building a kernel for just one CPU, but are called through indirect function pointers in a multi-CPU kernel. This config currently lacks the declarations for the individual helpers, e.g.: arch/arm/mm/copypage-v4wb.c:47:6: error: no previous prototype for 'v4wb_copy_user_highpage' [-Werror=missing-prototypes] arch/arm/mm/copypage-v4wb.c:65:6: error: no previous prototype for 'v4wb_clear_user_highpage' [-Werror=missing-prototypes] Add the complete set of prototypes in asm/page.h to allow building iwth -Wmissing-prototypes. Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/page.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 74bb5947b387..28c63d172a96 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h @@ -113,6 +113,28 @@ struct cpu_user_fns { unsigned long vaddr, struct vm_area_struct *vma); }; +void fa_copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); +void fa_clear_user_highpage(struct page *page, unsigned long vaddr); +void feroceon_copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); +void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr); +void v4_mc_copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); +void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr); +void v4wb_copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); +void v4wb_clear_user_highpage(struct page *page, unsigned long vaddr); +void v4wt_copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); +void v4wt_clear_user_highpage(struct page *page, unsigned long vaddr); +void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); +void xsc3_mc_clear_user_highpage(struct page *page, unsigned long vaddr); +void xscale_mc_copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma); +void xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr); + #ifdef MULTI_USER extern struct cpu_user_fns cpu_user; From patchwork Tue May 16 15:45:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94787 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp541392vqo; Tue, 16 May 2023 09:08:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7J8v6Xk/cM8fDx6ORXN78I6RGjr7iJG8nnUGJ0iqDD3Gr6+gFHA8HE71HOuL85h7uXRsIt X-Received: by 2002:a05:6a00:2e85:b0:63b:6d4d:4c9 with SMTP id fd5-20020a056a002e8500b0063b6d4d04c9mr54062460pfb.9.1684253337135; Tue, 16 May 2023 09:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253337; cv=none; d=google.com; s=arc-20160816; b=LmYKwBl5b/0BqXVOdZ8ddqUwtE8RZE0fX/jMz5ZHog+xkDQC03YI45I8tZoNcGIB6P xYCVDVj3pkb8L3hTZAQsSAKU10u2zlJh3r+qJeXLt5mW1Z++iidtp9yajY789z9dfH3F BhpydubyNJpS1rSXbQX2Q0qXque8hgDM3HamwKuiIi6yjqSVs7BBG6VjPUazut1BPiL9 LKQAIOg5vWvWSSaaIA5sNxzNE3YgS7Dm5x8dsraJjocpAQq1JieTrNmcqRvIyltQ0wQC 9C/ZBM2g0yixm2OS0CQuLWW9dLRdMjhtBN1V7hHzgeuxIv2edetnJbWE9BgIck+fTnXS T2mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PfYkT+oNOEYs3DY4auJezqwjp91RD9t/WeMP9FwTQjA=; b=CN4Da2XxinF4pVB4lssaagEeZ8lK+yHmYVB7OchI1dTERqsVhjUe7RA+uQs7L4fNQD 31Z15vJ+KZizSkna/Y6Vt7II6KKy4r5q6svdVRmOAXKrBdMaIWG2qZDPa9vKrhe1RI8q OxM4cNfc2753dTxYF+PywbQeUYoeMlgqEFc5wHFChGIJsivdNhh1JiL17Pop5MviYHKR 9GwPWfZkr8eoydAbj3OfLynepddnxs6BN0X2Gb6A4VNowLoShM+eBMvRe4R2YJ2xmkog mHhk+wGQTQ+qkF80YVJsuNU2g+LvEqOLqzRcpSOHvyIeYGR/7PrT1oWvZPIMP2FEkDfC sCfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mr8YfsTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a71-20020a63904a000000b005303db0ebebsi18788839pge.313.2023.05.16.09.08.41; Tue, 16 May 2023 09:08:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mr8YfsTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234300AbjEPPsF (ORCPT + 99 others); Tue, 16 May 2023 11:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234151AbjEPPrt (ORCPT ); Tue, 16 May 2023 11:47:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22B8D7DB4; Tue, 16 May 2023 08:47:25 -0700 (PDT) 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 1A7F763BA4; Tue, 16 May 2023 15:46:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5187BC433D2; Tue, 16 May 2023 15:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252009; bh=hEUlhy3x74ptZihWpTN1KOaQRhy1uwVK0q8Cu7Mv2w0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mr8YfsTNoulwGWvD0tgfBs0wwbldurQP87cM+bffA6WAgrco/DCyut4Dk70ezgjb3 s+rcP0dVrALpiBxiwpppiZJCgDuNbXrQSlgKiqUzYbO7Rp9FPZky/idQVj59srnUR/ rU5ySRLhnEFvMtEDm3VCLjjON95rItlQ0ofQSzC6qTpwmt7yv2NA5bbccWy1G95VpL Ni6quHY5h7Rellf3j00PpuwafyY7yuh5yx53gzMJhUU4h9EnUWGtc5RnodHFsYa6Xa 9o7hMEhJE2nmTZm4FB9Rxq6yXF+IouUgEI4K7ghU/pF44VvDOSr8LtHs/0OrY9bcJe M2bdA3bv1aK7Q== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 09/16] ARM: cacheflush: avoid __flush_anon_page() missing-prototype warning Date: Tue, 16 May 2023 17:45:58 +0200 Message-Id: <20230516154605.517690-10-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766067627401398126?= X-GMAIL-MSGID: =?utf-8?q?1766067627401398126?= From: Arnd Bergmann The prototype for __flush_anon_page() is intentionally hidden inside the flush_anon_page() inline function to prevent it from being called from drivers. When building with 'W=1', this causes a warning: arch/arm/mm/flush.c:358:6: error: no previous prototype for '__flush_anon_page' [-Werror=missing-prototypes] Work around this by adding a prototype directly next to the function definition. Signed-off-by: Arnd Bergmann --- arch/arm/mm/flush.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 9b112009c708..43678137a9b2 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -355,6 +355,7 @@ EXPORT_SYMBOL(flush_dcache_page); * memcpy() to/from page * if written to page, flush_dcache_page() */ +void __flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr); void __flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) { unsigned long pfn; From patchwork Tue May 16 15:45:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp539421vqo; Tue, 16 May 2023 09:06:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6OiNunGhVhcFH5Qw6Dwk7nula8NL1FN9BEUPHG+Ges4eqq26sLmlcuI/qFJwlIxPq5FoEw X-Received: by 2002:a05:6870:37c4:b0:195:65eb:57ba with SMTP id p4-20020a05687037c400b0019565eb57bamr14910420oai.11.1684253197949; Tue, 16 May 2023 09:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253197; cv=none; d=google.com; s=arc-20160816; b=d2rjMFrQbDpEjzbgvcHavt1R9G6nEt/K2tk9HtiM+gzeISTUSv5YELzM2Wzrm39eE1 L0FwPs6rBR3f8qpZPVOYRSYZtpgdJyde/ZWSTvSHk8d4XOXMbbw8B/B1p+zwCRJbnmZ1 kMsqlt2XlCNsBkQErZPV3e7YXqhOHScxacq+I7lxrgCqvpCzSX4dFTBVUrKjLrcOPGET mbaINOXexWIKqvDOfkequXJswVvB6Ag6OmNgEpdV1DpdCxdI3P2Xr0DhquVpvpRwbYmg 4O+NVxLziyYWc9B/IwQas4G6M+JSPJc3v8mzQZ3H0vHeZ8PtBAVx1L2cez1WJ1wpYbOp lmgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GPG07Mtc8L3z9wY22zkDH7IdXrlU+gsNLzN18a1VBes=; b=lZNRBgnMx3N8bTzSLRkeA9b+19VOS5B3x+XOGNCyQMm4WuPwSg+Wx2lsB15e6FPUEW Q7dsozfDUcKMGw9DxhjFBqrEaN7sqJTnGrRtobB352Or4P5C5wOAychEzdcetySby+ka 8FxZz2R+qXBjs1a+JW0agIpRygmbEnp1X/tUha2srcGajLtaJBOwqrd1n+fZdAj8nHIz a/9OlYN7fjtk6epQoznTj4IIswfO1pcM9Pb8GuA2MHP8JqqKmjnVfSOSleJc3tyWw+r4 LvUCe6AeNq2PxNNd1Xtm1thoDHie4QcFmPp1oLXnpvOAIzkUTmNuDHwcaZJJDSuG9ah2 XhFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cFT7/bXo"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c17-20020a056870b29100b001965ad4d990si10047328oao.179.2023.05.16.09.06.09; Tue, 16 May 2023 09:06:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cFT7/bXo"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234339AbjEPPs3 (ORCPT + 99 others); Tue, 16 May 2023 11:48:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234297AbjEPPsD (ORCPT ); Tue, 16 May 2023 11:48:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 770F2A5D7; Tue, 16 May 2023 08:47:45 -0700 (PDT) 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 B164C63BA1; Tue, 16 May 2023 15:46:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF635C433A1; Tue, 16 May 2023 15:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252013; bh=Cpt8gD1DG91vSJDrfbt4Hrl17RTrQOpd+8m0dG4DdQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cFT7/bXodGtbqNhpbxA6rLR7H1Ne7v2c2QMRA6uuV1m+dtzvyi75WbAjVRMg99NqS o2ceMU63IhrPRo0CcVXXeGF2Hv3n8lhgD3ahh1EWLou27UjIcjkS0H3jDAivSRKdLs 6Aftg255gYT4bl976C5uxerdFY9f94joSJux3id1TJ44D2uoMoeu+hOpaUYOktvdC4 il8SGAa58aUJN9ehp7ezXkDm1ox8DesMBqNmQvf0XKZymPlK3Ici78OFBfZVAQJnR9 8V2d593UtJAyx9p6KtrFHVGNy8oq2UifngtIjXdibQ4VOHf1hjA0Z617i8Gd//dknq U3dNTlQCB/9uA== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 10/16] ARM: nommu: include asm/idmap.h Date: Tue, 16 May 2023 17:45:59 +0200 Message-Id: <20230516154605.517690-11-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766067481267421366?= X-GMAIL-MSGID: =?utf-8?q?1766067481267421366?= From: Arnd Bergmann setup_mm_for_reboot() is declared in asm/idmap.h but that is not included for the definition, causing a W=1 warning: arch/arm/mm/nommu.c:178:6: error: no previous prototype for 'setup_mm_for_reboot' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/arm/mm/nommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 53f2d8774fdb..43cfd06bbeba 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "mm.h" From patchwork Tue May 16 15:46:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94784 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp541022vqo; Tue, 16 May 2023 09:08:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5jrvfsNFcqa6SM+28Fh2wilalDfjzxUZ2aNSM1SoAroSxMYYMEe/MTaHrUissVyh+MYaIc X-Received: by 2002:a17:902:d510:b0:1ac:7ae7:3fdf with SMTP id b16-20020a170902d51000b001ac7ae73fdfmr37629519plg.41.1684253307749; Tue, 16 May 2023 09:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253307; cv=none; d=google.com; s=arc-20160816; b=JmV9IxMI4XHU9nu/1q0ep1LkqIWCCMFufIr39HHyG962B4Hbq6rdH+d1mM2RpbIhYG hdBG8+Fbo0xsDz14zm0tAClC7mW1D1J6GBPFESTMRA2LTWGe96IRaaKN0HRnr4wDGbCA H1ll7kn71tLfWVYuHjZET+ooTdTTpUXuk8lf0OHi0RCEyKP1+lOXVWvpxBVqRq52/WFa afgUG/hpjBVTGvZOq9IwESW0xh+jdSF8NXQf9OCh0JZZpQ3YIdiT17r2LhYYLHUZvp09 Y1IRcZ1O6fH2o+MyGSnSdo8ma5VRN5exSIZX6m4swfxMQHFWb0zZIdn2j/87psKdCAfG 6W9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0gpeRKCjDPWq7no1xz+3mGYuoxwUUFVz6liOokZnVNw=; b=n1h8oP3FgTs36z8CnoH/SAvaSkpwdd05+yqDaBcH6pB906Gj4/rjdJvIrcwfse1Z8w UQomAbbYOVZp5M9dl8sRq7WB1MVwZwOin27LwmM/7AL0dCKRZH/uA0f358uJRA1waKhd qZ3ThYgeWdR8L/w4ynWlSV06tqxI+GJWeSySXkII6+56Iy/5DcgJMe1n0mY2IBXWPSBz JYnCthS+HWEbZblTyozOjT2m5cOX8zNly0Rd5q8jCXO3L9mf0m5XT9hE/tJEhP+sMS8B /GZQZYM3pL4U4AThaPdSJvmqUmiQCovfYJvcOphPCJjREO+cTw3PncGHJly1HwEDa0Em J85g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pl+zExTT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a17090322ce00b001aada12d628si19309418plg.585.2023.05.16.09.08.11; Tue, 16 May 2023 09:08:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pl+zExTT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234269AbjEPPsM (ORCPT + 99 others); Tue, 16 May 2023 11:48:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234206AbjEPPr5 (ORCPT ); Tue, 16 May 2023 11:47:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ED0B8A4C; Tue, 16 May 2023 08:47:29 -0700 (PDT) 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 6615063BA7; Tue, 16 May 2023 15:46:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AA8AC4339C; Tue, 16 May 2023 15:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252016; bh=bqx6S1zj75BZV7GkFI5F7m35pIzL0uAA+EcyqyJVBbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pl+zExTT7Seum5jw84Hath8EhW8XZl7y7ykf6GyNZGhiiuKgf40tRtoIsqwPQ0ebH pRTSoJQbG0O4di6rjIBv3hj/Jjw8N0hXgwy3//vBKEtgokV+dMcvrW9502msvdbNjj TdTs9Tnmv+Nz2fpWs+kVl1xjG34VN5rVC7hOEj26bS7ECtRooC40ClNmmVOmRCze7v ZTZEwElgudJSE1aSqS9wEv9zi9/odbmBhCRiGwpv4To33saLRSw+nhQ8u+M62UjEbo OK3hUZehXq1MqRikGqeNs66/NIA1eGGJwzaajtbB+NtGUzSGdiYM9qxfXuZNzcdTwJ kO6e7aGswN36w== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 11/16] ARM: move setup functions to header Date: Tue, 16 May 2023 17:46:00 +0200 Message-Id: <20230516154605.517690-12-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766067596523812176?= X-GMAIL-MSGID: =?utf-8?q?1766067596523812176?= From: Arnd Bergmann A couple of functions are declared in arch/arm/mm/mmu.c rather than in a header, which causes W=1 build warnings: arch/arm/mm/init.c:97:13: error: no previous prototype for 'setup_dma_zone' [-Werror=missing-prototypes] arch/arm/mm/mmu.c:118:13: error: no previous prototype for 'init_default_cache_policy' [-Werror=missing-prototypes] arch/arm/mm/mmu.c:1195:13: error: no previous prototype for 'adjust_lowmem_bounds' [-Werror=missing-prototypes] arch/arm/mm/mmu.c:1761:13: error: no previous prototype for 'paging_init' [-Werror=missing-prototypes] arch/arm/mm/mmu.c:1794:13: error: no previous prototype for 'early_mm_init' [-Werror=missing-prototypes] Move the declaratsion to asm/setup.h so they can be seen by the compiler while building the definition. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- arch/arm/include/asm/setup.h | 7 +++++++ arch/arm/kernel/setup.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index ba0872a8dcda..28ca2a17394a 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h @@ -28,4 +28,11 @@ extern void save_atags(const struct tag *tags); static inline void save_atags(const struct tag *tags) { } #endif +struct machine_desc; +void init_default_cache_policy(unsigned long); +void paging_init(const struct machine_desc *desc); +void early_mm_init(const struct machine_desc *); +void adjust_lowmem_bounds(void); +void setup_dma_zone(const struct machine_desc *desc); + #endif diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 75cd4699e7b3..703233a7bfe3 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -76,13 +76,6 @@ static int __init fpe_setup(char *line) __setup("fpe=", fpe_setup); #endif -extern void init_default_cache_policy(unsigned long); -extern void paging_init(const struct machine_desc *desc); -extern void early_mm_init(const struct machine_desc *); -extern void adjust_lowmem_bounds(void); -extern enum reboot_mode reboot_mode; -extern void setup_dma_zone(const struct machine_desc *desc); - unsigned int processor_id; EXPORT_SYMBOL(processor_id); unsigned int __machine_arch_type __read_mostly; From patchwork Tue May 16 15:46:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94780 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp540621vqo; Tue, 16 May 2023 09:07:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4j3MAZifQlLhZd1QV5WOf26higQB84dM3g7Z8YSZsJOg+/WlW8U+oDgCZnyjkFtLUmXjkg X-Received: by 2002:a05:6870:3a07:b0:18b:12ce:f5d4 with SMTP id du7-20020a0568703a0700b0018b12cef5d4mr19811862oab.41.1684253278831; Tue, 16 May 2023 09:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253278; cv=none; d=google.com; s=arc-20160816; b=gvKiKjf/5fGE6yxyUAHfpOdN8c2D8bevuGrXvVMAetLyqHiSdfylmrlp5EUnqAlmLT fj7SDE8QvzjrwJgKWvgqP9X7x4z/mVCtSFUssx3y/nSBCZUfl8vSDZIcnfU8PniOWOW5 eyMZMrunKk5bcg2uSQQYATqxcSw6HEJh5AMnmCBNWxUTlPow4Nh4Giz8FpprFiHipy71 f9jaLmr4rxnX6fIPaPnushylbvzYvbSuGodPq3ynqKq5NJ2FO4WVrnEq65UdzbuA7Zwv PrGrRoPtFyb+kLhO98uXjvwz/crdMg6ih43tPctahjlkXF9JCx3gItjy2M+JrxFi6tZo kKsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iNWp3VdnbJFjdZ4pODARQLtMq6HglUjYG29ELp8TR+k=; b=D/wRA2vuWbvzr+qoMBqRTC+Tt3oouiZAAbYqO12JG/e4zkKbIFzRg7uKSyXSsf7mzQ PzgY1O+mPi/biT9l7mW5qUcUipO61WsTeNyqPah0zioM/8LlztHAclZ5BILnGs7BTAba c+7AIY5XRfhguRdqQ3+NzKmaz21MqW3rZqcLobrKW2wsb4wwAj1QXz5RWaU63qekTwkR 8zNXWXIEJpqI2gOiqwQmp26q2oIag48BE96ULLmnaeRY3CfG1G7FI3xa+eNhbEcIS6H+ o/B7y8iTSCSD9fOEqVuUUscGBEwBdH0vCy4tbDH7dMTLedzw11I8WMALYrN5n3eIyFPw h8Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nxtqi0Wv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c17-20020a056870b29100b001965ad4d990si10047328oao.179.2023.05.16.09.07.45; Tue, 16 May 2023 09:07:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nxtqi0Wv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234346AbjEPPtK (ORCPT + 99 others); Tue, 16 May 2023 11:49:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234249AbjEPPsK (ORCPT ); Tue, 16 May 2023 11:48:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08BB49EEB; Tue, 16 May 2023 08:47:52 -0700 (PDT) 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 16A5663BAF; Tue, 16 May 2023 15:47:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47E2EC433D2; Tue, 16 May 2023 15:46:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252020; bh=Npxydn52yNm/V36pPXxMeglIGETaw+vXx4GeRAC3zdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nxtqi0WvFSlHGYKBv/f3fm7o9hL3K1bNtnja2ASbeAJIlcaB8frJ16v2Tr5vxA72j QIS2ucqJFlN3AvvuNr8oWbDkrwt3zlx+O/pDzwLuCC1X9AGzOcn1QOLG5uEq/scTET 4OBbIcE4bPK+GoIgPoPRvQUY0iB4N7WNY98jlmvm4V05vrUT+Y2pV11HVT9na/eaNl XYSOnhzIijZvTI7jf5VXiZbCSY4NSqPqqJX5v9LtKgjUtrvu9n0IOTyZy9o6h0y8FB iRaAiSUG88ROpRuVU2V2rWeA/jn3gSomOm3+LFP3uG+HNumJ4SH3FmP8QxJFPmCAq/ cls4GlKSlcD3g== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 12/16] ARM: fiq: include asm/mach/irq.h for prototypes Date: Tue, 16 May 2023 17:46:01 +0200 Message-Id: <20230516154605.517690-13-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766067566142407260?= X-GMAIL-MSGID: =?utf-8?q?1766067566142407260?= From: Arnd Bergmann There are two global functions in fiq.c that get called from other files through an extern declaration, but a W=1 build warns about the header not being included before the definition: arch/arm/kernel/fiq.c:85:5: error: no previous prototype for 'show_fiq_list' [-Werror=missing-prototypes] arch/arm/kernel/fiq.c:159:13: error: no previous prototype for 'init_FIQ' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/arm/kernel/fiq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index 98ca3e3fa847..d2c8e5313539 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include From patchwork Tue May 16 15:46:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94769 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp530913vqo; Tue, 16 May 2023 08:55:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ca50Gp2/31vo+WdbIqtt9YtQOGuxVgvVoXL5UnwWg/Eb/Ld9Fy+OZWCc+ZjA+LOrq5qeh X-Received: by 2002:a17:90a:7e90:b0:24e:272:2469 with SMTP id j16-20020a17090a7e9000b0024e02722469mr37276985pjl.18.1684252530862; Tue, 16 May 2023 08:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684252530; cv=none; d=google.com; s=arc-20160816; b=ZgqLSkciWCG/wG4XwOCcVKZosX3IpKzqEkZLaDgqmsBVXOETjxeHBSkuItWajgDNeg 8JfX/L3/vCU5GyCcFyBQsSKXEfMZLHcuYXwUAmzKp41Nzbl1q898VPqMY3krjJKLM8m7 RWuWw+AAeKKQVInSK3AfMHnyUoLwPD0P3SUL5svvBndFEhHFsRT+muY+lXfvSeiwD0VN zbR+IWcjQfMIEysda2X86FukbgqfTbilhUVA4Tnv5WE9yDMzcyU0PzLF5zGl8L2C6aTN RI/xWjAzstYRDrbdSVVeyaaSk2YQ5TG2amU/M09YJm22F3haINY2dfmnHf4ZMRyi49ye 7VDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4tQMOwPygzfdn1atydFKSek1cSUxq5Kpcptkuq81d2c=; b=i2zeJYWIr9bC1KfPgfF8RJwJ5ZchsEldTeQnZHNfbOjl/PDOICqKR5ZeDxBIWSZl9q WzwXovqZzRMJ4fnFmj1mWxqmSttUW9GKroa+IdXNzVBtIKvgc/WGNTq7XBWhU3xkFI3c tibfkBGpe2S6WgfIvHONtorQ+6o0wJP61M4zjN9xDW2lV3soRiMPQaGdIMDUdZiPON68 9CrRgwJ9faKuEt18j6N7Nf8SuPw8HvQ9cjd2a++4VaUA1kpsbNEVm/qnpyfVMbt1PVce tcT1ar8/Vgqb9BW/O7pxNqsUI41zU5h0QdFeLRmRvSYJyC8G8WPaYxrp2L68xdSDbK8e Ue/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TjYro4Jx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a170902c40a00b001aad8686ebasi21984872plk.251.2023.05.16.08.55.14; Tue, 16 May 2023 08:55:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TjYro4Jx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233744AbjEPPuH (ORCPT + 99 others); Tue, 16 May 2023 11:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234362AbjEPPtT (ORCPT ); Tue, 16 May 2023 11:49:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6DEF903B; Tue, 16 May 2023 08:48:19 -0700 (PDT) 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 BAE1B63BA0; Tue, 16 May 2023 15:47:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC25EC433A4; Tue, 16 May 2023 15:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252024; bh=ukkcZIi3rJQFXBZ+gAriRZey/Vj4dRVkg8uSR9+fmpc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TjYro4Jxqr2dc8uNfkbZR0YX17V/6dDi6Z2CqqKR6hDNo8Z/9tATqiR/kGvB/zI7L AC/NrRNyUUeR5MCHYu+8OKvpBW2ic6tGVm98MAOEgi+JJ2B3mHUHv8IwdgasHvPtet z0zGjoC/wdgfpqjgfgBV+X+UrHIrkvjwD4tL1KFgwGvVYp10z8VsW/C21iYUj3RdQI 4+4iIMxm2jxDWTfPMmT7VuVQHoaeJTHHxn2vdg0tsuczx5LjPUZzJTQkKT74dOXRwP uhvWYhhj53dwW9OVJz1Vgp/0T6HFI9pWOpCC8CKtMIpd6FyVBv+lP56JnslHxHVBiX ZDLfw0lhn13bA== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 13/16] ARM: vfp: add vfp_entry prototype Date: Tue, 16 May 2023 17:46:02 +0200 Message-Id: <20230516154605.517690-14-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766066781991499334?= X-GMAIL-MSGID: =?utf-8?q?1766066781991499334?= From: Arnd Bergmann vfp_entry is only called from assembler code, so it does not need a declaration. Since gcc complains when extra warnings are enabled, add one anyway to avoid: arch/arm/vfp/vfpmodule.c:657:17: warning: no previous prototype for function 'vfp_entry' [-Wmissing-prototypes] Signed-off-by: Arnd Bergmann --- arch/arm/vfp/vfp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index 5cd6d5053271..10d9c0da0fd4 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h @@ -375,3 +375,6 @@ struct op { }; asmlinkage void vfp_save_state(void *location, u32 fpexc); +struct thread_info; +asmlinkage void vfp_entry(u32 trigger, struct thread_info *ti, u32 resume_pc, + u32 resume_return_address); From patchwork Tue May 16 15:46:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94778 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp539782vqo; Tue, 16 May 2023 09:07:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7FMvOXr+Y7k6M7dKkyQEiQdbR5nkoleYid1v+XFuwSRIJpeRG1u4rG04HTp/eFldfzn6Cc X-Received: by 2002:a05:6870:d344:b0:192:7320:ce with SMTP id h4-20020a056870d34400b00192732000cemr17015065oag.40.1684253221519; Tue, 16 May 2023 09:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253221; cv=none; d=google.com; s=arc-20160816; b=ekuKOvZPCrjtHJX1pAzr6GXgSGNWe+hVQgl3D8RUSKVjcSWjPr0ehOFRYGXMb6vkNZ M40ztGUlxaXLO/0MbKpNyRGKb3dM7+xQYltBnM14wUQlZcqyjXAUEg3vvapPVNloX6Sa vrcrtUVFyfpwABmwoCWiOX1xxV5TIqtW82NIGfwMxM89kfAMGUopwIUpHCnx1nXI5iiK R1uTSz0M3f8GKYunCGTsgxcDSXkkaWgfaN6uQCwtS6eVWh0xqItkKogK9/hDDLCXBtXw wbr3ZaPvQiPbHKS3U+XS5lWHiYo2F2aaGAze2Afccr/LXGYBABpDcKaH8fdO4IX+5gCK dS7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4jHnNnINQDzlEtDpuq6DU4dGPoHSRinIFeTEoBT/Uj8=; b=hR5+eoTW1Moe6g5WrKQ2a3QRQ3Cj9KhcONb+hWukriKwmMl57Bx63TlqKj/ed7Ttly 2loTikl0QlkdQK9ka1vXzXabUmvuBw8/nL8nXu1d2z69VnUXikivgVoQu1rYuAGJV41v gc+VNiP43I824sSOMxLHod4wYkr76XtVCuLZwLA9GnUUeNXmtyHhjyiQRLAm0lixHRG7 PWRTshWnGavCbk8vIoUBm9Kh/vSQR8AMR+QNKyY4DCABVP1//pubrgiwy6DRBmu66P1C k4pfjgk3OaQ9m3+nszCWGs2ytmmmF+JDwUUa3Q2sNyK19Luw83DoF7XWWsdiA7hPkmNI vAqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rt+0T6iw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cp15-20020a056830660f00b006ac9b7fa271si6288690otb.34.2023.05.16.09.06.46; Tue, 16 May 2023 09:07:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rt+0T6iw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234275AbjEPPsP (ORCPT + 99 others); Tue, 16 May 2023 11:48:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234262AbjEPPr6 (ORCPT ); Tue, 16 May 2023 11:47:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3972819B0; Tue, 16 May 2023 08:47:30 -0700 (PDT) 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 67E8363B8E; Tue, 16 May 2023 15:47:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1167C433EF; Tue, 16 May 2023 15:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252027; bh=uSZFgOHv66zf2ErLT4Tl0oonO69PeMRAH5tXtTaemjQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rt+0T6iwCqnI2DBJU+G1SPBWeanZBPT/dGs+wqihGalu5OX13iSDeaqKgDGb5pFPa U7Z1uOuF4dSBL0xetsta1vCyca14RNIUruKFekUByNfK26cGrqgP0LajoCoMH8GzLO MEvHHuJ5ti2rfPGF5FP54BuAyUw5j6KYXo8t5CpnwV5poHm3aiqC0o3lJuLDPYnTwj W5/513T1c50zUPEnx8CERIcFObNqM5dIfgHUezSPmK4+Y1iaa4Pid/cwkt/OOWTwD8 hAxlWZIx+Om6TMEjQenC4JZ7MdgY8qo9AAvYXKs+ncVkKht30TZ+Exd1jNqzTMej0R OOY/Y0jtpz/4g== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 14/16] ARM: add missing syscall prototypes Date: Tue, 16 May 2023 17:46:03 +0200 Message-Id: <20230516154605.517690-15-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766067506021191559?= X-GMAIL-MSGID: =?utf-8?q?1766067506021191559?= From: Arnd Bergmann All architecture-independent system calls have prototypes in include/linux/syscalls.h, but there are a few that only exist on arm or that take the pt_regs directly. These cause a W=1 warning such as: arch/arm/kernel/signal.c:186:16: error: no previous prototype for 'sys_sigreturn' [-Werror=missing-prototypes] arch/arm/kernel/signal.c:216:16: error: no previous prototype for 'sys_rt_sigreturn' [-Werror=missing-prototypes] arch/arm/kernel/sys_arm.c:32:17: error: no previous prototype for 'sys_arm_fadvise64_64' [-Werror=missing-prototypes] Add prototypes for all custom syscalls on arm and add them to asm/syscalls.h. Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/syscalls.h | 51 +++++++++++++++++++++++++++++++ arch/arm/kernel/signal.c | 1 + arch/arm/kernel/sys_arm.c | 1 + arch/arm/kernel/sys_oabi-compat.c | 2 ++ 4 files changed, 55 insertions(+) create mode 100644 arch/arm/include/asm/syscalls.h diff --git a/arch/arm/include/asm/syscalls.h b/arch/arm/include/asm/syscalls.h new file mode 100644 index 000000000000..5912e7cffa6a --- /dev/null +++ b/arch/arm/include/asm/syscalls.h @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_SYSCALLS_H +#define __ASM_SYSCALLS_H + +#include +#include + +struct pt_regs; +asmlinkage int sys_sigreturn(struct pt_regs *regs); +asmlinkage int sys_rt_sigreturn(struct pt_regs *regs); +asmlinkage long sys_arm_fadvise64_64(int fd, int advice, + loff_t offset, loff_t len); + +struct oldabi_stat64; +asmlinkage long sys_oabi_stat64(const char __user * filename, + struct oldabi_stat64 __user * statbuf); +asmlinkage long sys_oabi_lstat64(const char __user * filename, + struct oldabi_stat64 __user * statbuf); +asmlinkage long sys_oabi_fstat64(unsigned long fd, + struct oldabi_stat64 __user * statbuf); +asmlinkage long sys_oabi_fstatat64(int dfd, + const char __user *filename, + struct oldabi_stat64 __user *statbuf, + int flag); +asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd, + unsigned long arg); +struct oabi_epoll_event; +asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd, + struct oabi_epoll_event __user *event); +struct oabi_sembuf; +struct old_timespec32; +asmlinkage long sys_oabi_semtimedop(int semid, + struct oabi_sembuf __user *tsops, + unsigned nsops, + const struct old_timespec32 __user *timeout); +asmlinkage long sys_oabi_semop(int semid, struct oabi_sembuf __user *tsops, + unsigned nsops); +asmlinkage int sys_oabi_ipc(uint call, int first, int second, int third, + void __user *ptr, long fifth); +struct sockaddr; +asmlinkage long sys_oabi_bind(int fd, struct sockaddr __user *addr, int addrlen); +asmlinkage long sys_oabi_connect(int fd, struct sockaddr __user *addr, int addrlen); +asmlinkage long sys_oabi_sendto(int fd, void __user *buff, + size_t len, unsigned flags, + struct sockaddr __user *addr, + int addrlen); +struct user_msghdr; +asmlinkage long sys_oabi_sendmsg(int fd, struct user_msghdr __user *msg, unsigned flags); +asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args); + +#endif diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index e07f359254c3..8d0afa11bed5 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "signal.h" diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index a5f183cfecb1..0141e9bb02e8 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c @@ -24,6 +24,7 @@ #include #include #include +#include /* * Since loff_t is a 64 bit type we avoid a lot of ABI hassle diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 006163195d67..d00f4040a9f5 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c @@ -10,6 +10,8 @@ * Copyright: MontaVista Software, Inc. */ +#include + /* * The legacy ABI and the new ARM EABI have different rules making some * syscalls incompatible especially with structure arguments. From patchwork Tue May 16 15:46:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94788 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp541965vqo; Tue, 16 May 2023 09:09:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+aMa5UR2E8zB42ymYaJEJEu9ZWmdBvv280qAZiD9OQwBCYa3AyNChDq21QoPhDaC0E+cw X-Received: by 2002:a05:6a20:3951:b0:ff:f3d9:1ada with SMTP id r17-20020a056a20395100b000fff3d91adamr45362494pzg.60.1684253378979; Tue, 16 May 2023 09:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253378; cv=none; d=google.com; s=arc-20160816; b=URiVe0qzgZm3bbLoEKXm+IW6BDay5WEVA7+vZna8XGKzIAwjr56rgMrxXgkmNkSUEu pty1qZ7XEEagB+i9UmyCOjL80uFYj+UNC7t4qC9YCt0nvRC8b1x15EHSXP7INVo1/Ugz 97MBb2pB3b4yScItciYmKv8ApcRMLXUzW9X7GHcICYRY0tycnow+dCepG3HerE2Jw8/c ZDPuhp+Ilu3oxr5ncK58oAPPoSKWytC6tqndAeRoXtCyjfnPzuCL44tx7TBrSO9CEiKE FYKqx4i8ZPiWNmCJZvn7z1pXW7ulbVFD641+Hy2DShxP3y7cgwdEkhJopKtn9gMkeTZB hHPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QjNT3Q9GPqu1T7QbY9vLML9cugfkjo6OhprWGCMk3WQ=; b=eTrD7XvcvAVuLKr0U5cGomcnklc1CcwtRHHusL/joTtfg2jov+fSWGMwKrSnOnnW3n /F8CAPQsgaNkLq+xJehMCd4Zl3Vx5ZvCmNyZaa4+e4gkMRdebSTO4/3ypk2WLRaa2owI kHMAv6yVXQinqU4YFDhAWSRG8yHgvXGR66qKEik5g/qt4fBTo+CzXFtq+r4BLAIWaT/n 0dN2P7lNcQX4lcGKPvWVk1pocO+vRrG7u2RnPqMpyGdgxW7/QbWRw8Z6tYJP4E0j7Fya GfLqyNixIAjorXFA4XRHw5/t4sWe0+yHNWKwjOAPD2moWrnAAPyb1v1QKDkX3WQ+huQ5 jyBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mg4jI0Qd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg10-20020a17090b1e0a00b0024df993792dsi2323573pjb.80.2023.05.16.09.09.22; Tue, 16 May 2023 09:09:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mg4jI0Qd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234288AbjEPPtS (ORCPT + 99 others); Tue, 16 May 2023 11:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234123AbjEPPsU (ORCPT ); Tue, 16 May 2023 11:48:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94B819012; Tue, 16 May 2023 08:47:59 -0700 (PDT) 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 194BE63B7B; Tue, 16 May 2023 15:47:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51836C4339C; Tue, 16 May 2023 15:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252031; bh=flMIm7rrA3GwPRe1i4A+2+g3vRYY++3FaIonU0BJ0lo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mg4jI0Qd1iMhwE7fFVWVtYXkJ/ZmjPeoPxAQBiXAa/Kg12YaAUl/K8P8ZDSEGhWo8 CJ/aKo6+JP0nyYIbZxQWh2U43kSkjDxtQG9PUoaiZhDkB+kZCFmiU8ES7TERNlH86g cWstm4OIHk3rZ78BVNVccqtYurBxSr51ZxSW0BhdgVScP0gp6JdR6vVpXvViPvuWXQ CxJQZZYSeDy6eYleVtK859sxJeUKrWLl0FZKbv2mXmchibDykofKpyolkyI63CD4BL 5pcOEKp0vPQ46j+18pF9LRf6OgVKbyENHhiH3GbxSqP3+EiLeX5pia9CDovm3A74s/ riMie3u5rsiRQ== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 15/16] ARM: decompressor: move function prototypes to misc.h Date: Tue, 16 May 2023 17:46:04 +0200 Message-Id: <20230516154605.517690-16-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766067671090941545?= X-GMAIL-MSGID: =?utf-8?q?1766067671090941545?= From: Arnd Bergmann A number of prototypes are missing for the decompressor, some of them are in the .c files that contain the callers, but are invisible at the function definition: arch/arm/boot/compressed/misc.c:129:17: error: no previous prototype for '__div0' [-Werror=missing-prototypes] arch/arm/boot/compressed/misc.c:138:1: error: no previous prototype for 'decompress_kernel' [-Werror=missing-prototypes] arch/arm/boot/compressed/misc.c:163:6: error: no previous prototype for 'fortify_panic' [-Werror=missing-prototypes] arch/arm/boot/compressed/decompress.c:63:5: error: no previous prototype for 'do_decompress' [-Werror=missing-prototypes] arch/arm/boot/compressed/fdt_check_mem_start.c:63:10: error: no previous prototype for 'fdt_check_mem_start' [-Werror=missing-prototypes] Move these all to misc.h so they are visible by the callee as well. Signed-off-by: Arnd Bergmann --- arch/arm/boot/compressed/atags_to_fdt.c | 1 + arch/arm/boot/compressed/fdt_check_mem_start.c | 1 + arch/arm/boot/compressed/misc.c | 6 ------ arch/arm/boot/compressed/misc.h | 11 +++++++++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c index c579d9c42fd4..b584e091f702 100644 --- a/arch/arm/boot/compressed/atags_to_fdt.c +++ b/arch/arm/boot/compressed/atags_to_fdt.c @@ -2,6 +2,7 @@ #include #include #include +#include "misc.h" #if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND) #define do_extend_cmdline 1 diff --git a/arch/arm/boot/compressed/fdt_check_mem_start.c b/arch/arm/boot/compressed/fdt_check_mem_start.c index 9291a2661bdf..aa856567fd33 100644 --- a/arch/arm/boot/compressed/fdt_check_mem_start.c +++ b/arch/arm/boot/compressed/fdt_check_mem_start.c @@ -3,6 +3,7 @@ #include #include #include +#include "misc.h" static const void *get_prop(const void *fdt, const char *node_path, const char *property, int minlen) diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index abfed1aa2baa..6b4baa6a9a50 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -103,9 +103,6 @@ static void putstr(const char *ptr) /* * gzip declarations */ -extern char input_data[]; -extern char input_data_end[]; - unsigned char *output_data; unsigned long free_mem_ptr; @@ -131,9 +128,6 @@ asmlinkage void __div0(void) error("Attempting division by 0!"); } -extern int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)); - - void decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, unsigned long free_mem_ptr_end_p, diff --git a/arch/arm/boot/compressed/misc.h b/arch/arm/boot/compressed/misc.h index c958dccd1d97..6da00a26ac08 100644 --- a/arch/arm/boot/compressed/misc.h +++ b/arch/arm/boot/compressed/misc.h @@ -6,5 +6,16 @@ void error(char *x) __noreturn; extern unsigned long free_mem_ptr; extern unsigned long free_mem_end_ptr; +void __div0(void); +void +decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, + unsigned long free_mem_ptr_end_p, int arch_id); +void fortify_panic(const char *name); +int atags_to_fdt(void *atag_list, void *fdt, int total_space); +uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt); +int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)); + +extern char input_data[]; +extern char input_data_end[]; #endif From patchwork Tue May 16 15:46:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94790 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp542623vqo; Tue, 16 May 2023 09:10:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4QyOiPljfL9Tm5rHAWAd4H3GXqCQEkqxyA6ho53LYlzgPiXZIgWRHW+eqpdgZLfVHSWLcX X-Received: by 2002:a17:902:ecc5:b0:1ac:6882:1a6f with SMTP id a5-20020a170902ecc500b001ac68821a6fmr39397363plh.30.1684253432849; Tue, 16 May 2023 09:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253432; cv=none; d=google.com; s=arc-20160816; b=w3WWcjegqjlhdAOgDqT9xSLisLA1SbQSeq3idXHhephDIgkTNnWUUKpTTua3hdCtws fP+s7f4GI4O8F72VLdXvE7r91dXmqpqxHkY4XG5aGfDlipjryN58WwdCwJ6tCnfOedK3 RFsYhf2bahvUxyCbhTDln0Vo1+goKA0GsIlEztZQferjcPs8c4lH1slKPs/AVCTeuvAp mQxBd/33WKuw9WvI8mK9tCRi5rd8Co9U+WxrGpzVHi4Kbg7zQCNERb5CyHDkzivqZukJ jKjeQH6ogthxwq9ZM1aFbSlmHCIEk2vAkOMteHNLdbbi3yklm7aahxxUvG1gjeO0ujiX MJpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UOClFn/Nr+oJWMPe5meMviOzQugBqSNql4yHoccQk84=; b=AyjaP9SHE80z6MOT7M1sT2T9NDVvQeQgYacoj3JEOE65ojmrWyNly+Bi6x8c+WPJSz tud30S8CVqbaE/MjSz22IulaHZklAod7iVIKuMWPwbhtNEp6BcRV0zv6NB+JwQDVBvhi xZ4Ef+5PQQ1bsu+tlhbD2uUiN8t7Lhxm4cSLeqR0wNo0/T5qWExkINqPu3y0D1ZB9WQ1 0VztYEQfey2jZUgJxu4yg1Mon5tQhCHeBVCKEGII3+f7P3AKSbwnFKlQhixnknY8FVWY 1r02SnmrJT7skOYj6wqsaqlEdpNr+Vx5BZhVAFmdnJMSru25IHVP3ArmDNrlV9aBpg2q VS2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f2bOGMma; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw22-20020a170903045600b001a63b8e071esi17639002plb.28.2023.05.16.09.10.17; Tue, 16 May 2023 09:10:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f2bOGMma; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234228AbjEPPsX (ORCPT + 99 others); Tue, 16 May 2023 11:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234205AbjEPPsC (ORCPT ); Tue, 16 May 2023 11:48:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81A84A24D; Tue, 16 May 2023 08:47:37 -0700 (PDT) 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 BDB6663B93; Tue, 16 May 2023 15:47:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0070AC433A1; Tue, 16 May 2023 15:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684252035; bh=bjHzaX1S/XmMHS+pzx/BBsDEPRhhS8ndqsq/8qSoq9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f2bOGMmanyE84V2/AE41WTMs80qf9pTZsHsD9F+/Ran0Loq1XnTWD9T1Xe/lEKv2Y 26KXijopJ1VoF2HSPy2rDYc4XU/QPS+Zund7IVhGRxHNHw9vNTL86eH4s8XWVe+esJ GHxnqexAf5xknWy4Yonsml33IdsEstRyKq9sdNqaIejoDb1g5MSmONOYCsanOthNKJ D+QslLecnNSqmq1ph9lvme/E4S0LiZmiQg9qzXyrdadHTL+NCJjLLu6zxCWjXyvqVt 4V5sahVD0mThIJeYsb2Qctrjw2FfeAYZ7OWb+ewqVNJiWbDv2ZF8YlLIH2bOXWAWg3 rAlpSAzcEWEKg== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Oleg Nesterov , "Rafael J. Wysocki" , Pavel Machek , Linus Walleij , Ard Biesheuvel , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 16/16] ARM: xip-kernel: add __inflate_kernel_data prototype Date: Tue, 16 May 2023 17:46:05 +0200 Message-Id: <20230516154605.517690-17-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516154605.517690-1-arnd@kernel.org> References: <20230516154605.517690-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766067727315557512?= X-GMAIL-MSGID: =?utf-8?q?1766067727315557512?= From: Arnd Bergmann The kernel .data decompression is called from assembler, so it does not need a prototype, but adding one avoids this W=1 warning: arch/arm/kernel/head-inflate-data.c:35:12: error: no previous prototype for '__inflate_kernel_data' [-Werror=missing-prototypes] The same file contains a few extern declarations for assembler symbols, move those into the header as well for consistency. Signed-off-by: Arnd Bergmann --- arch/arm/kernel/head-inflate-data.c | 5 +---- arch/arm/kernel/head.h | 8 ++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 arch/arm/kernel/head.h diff --git a/arch/arm/kernel/head-inflate-data.c b/arch/arm/kernel/head-inflate-data.c index 89a52104d32a..225c0699a12c 100644 --- a/arch/arm/kernel/head-inflate-data.c +++ b/arch/arm/kernel/head-inflate-data.c @@ -8,16 +8,13 @@ #include #include +#include "head.h" /* for struct inflate_state */ #include "../../../lib/zlib_inflate/inftrees.h" #include "../../../lib/zlib_inflate/inflate.h" #include "../../../lib/zlib_inflate/infutil.h" -extern char __data_loc[]; -extern char _edata_loc[]; -extern char _sdata[]; - /* * This code is called very early during the boot process to decompress * the .data segment stored compressed in ROM. Therefore none of the global diff --git a/arch/arm/kernel/head.h b/arch/arm/kernel/head.h new file mode 100644 index 000000000000..6eccf98fc2cc --- /dev/null +++ b/arch/arm/kernel/head.h @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only + +extern char __data_loc[]; +extern char _edata_loc[]; +extern char _sdata[]; + +int __init __inflate_kernel_data(void); +