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: 13243326 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3E56C77B75 for ; Tue, 16 May 2023 15:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FvfpqpA0H25/mVjBaxqwv5kTSD3tSXis0qMN2VoBqcc=; b=Pyeqm+NytpDhhL +zEExlJ1oFvr6b0FHB8hUOYvguYuxdvpx8fOir5kr+CkwaC+60IuRnZLXJ9vkSkXlc52epDN45Xan 9wcl1zc20FZRghWA1hiTLzavR+6oiIqfLmtQHYmj+0yHcyHyyXrqi9IyBWZdHYOaw3lIy71QfUzYp jmkg90YXWGJ09xf7IjhrltBpWpjP0q87GwIOrLCTi9PLzqgBed/SmfgW0aMv1C0M6uY023JfKzuQa hukm1k3jUyQkuZnVH4rWNX3Q+/lNde7ZZdb+A/oxSmEPACd0x694yS25Tr7ph9RiDOUul+RkngTcJ OQrK42PMicHmyNWDxSnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pywsv-006Jc3-1g; Tue, 16 May 2023 15:46:45 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pywsp-006JYG-2B for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2023 15:46:41 +0000 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 2C2AF63B96; 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230516_084639_815616_F251749B X-CRM114-Status: GOOD ( 18.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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