summaryrefslogtreecommitdiff
path: root/arch/arm/include
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2023-06-02 19:28:43 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-06-19 09:35:59 +0100
commitaecc83e5064b397f125585ba703ac74a695c2d73 (patch)
treef042895ddd6ce49cd794bea2f62d3a48f2bdb61d /arch/arm/include
parenta12f8586afd6ee0af72c3ee93a4bccc065f37e0e (diff)
ARM: 9314/1: tcm: move tcm_init() prototype to asm/tcm.h
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()") Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/tcm.h11
1 files changed, 8 insertions, 3 deletions
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 <linux/compiler.h>
@@ -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