Skip to content

Commit aecc83e

Browse files
arndbRussell King (Oracle)
authored andcommitted
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: de40614 ("ARM: 7694/1: ARM, TCM: initialize TCM in paging_init(), instead of setup_arch()") Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent a12f858 commit aecc83e

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

arch/arm/include/asm/tcm.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
#ifndef __ASMARM_TCM_H
1010
#define __ASMARM_TCM_H
1111

12-
#ifndef CONFIG_HAVE_TCM
13-
#error "You should not be including tcm.h unless you have a TCM!"
14-
#endif
12+
#ifdef CONFIG_HAVE_TCM
1513

1614
#include <linux/compiler.h>
1715

@@ -29,4 +27,11 @@ void tcm_free(void *addr, size_t len);
2927
bool tcm_dtcm_present(void);
3028
bool tcm_itcm_present(void);
3129

30+
void __init tcm_init(void);
31+
#else
32+
/* No TCM support, just blank inlines to be optimized out */
33+
static inline void tcm_init(void)
34+
{
35+
}
36+
#endif
3237
#endif

arch/arm/mm/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <asm/sections.h>
2222
#include <asm/setup.h>
2323
#include <asm/smp_plat.h>
24+
#include <asm/tcm.h>
2425
#include <asm/tlb.h>
2526
#include <asm/highmem.h>
2627
#include <asm/system_info.h>
@@ -37,7 +38,6 @@
3738

3839
#include "fault.h"
3940
#include "mm.h"
40-
#include "tcm.h"
4141

4242
extern unsigned long __atags_pointer;
4343

arch/arm/mm/tcm.h

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)