Skip to content

Commit c8f3a7d

Browse files
jcmvbkbcczankel
authored andcommitted
xtensa: move init_mmu declaration to mmu_context.h
Secondary CPUs need this declaration to initialize their MMUs. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
1 parent 5997075 commit c8f3a7d

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎arch/xtensa/include/asm/mmu_context.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ extern unsigned long asid_cache;
4949
#define ASID_MASK ((1 << XCHAL_MMU_ASID_BITS) - 1)
5050
#define ASID_INSERT(x) (0x03020001 | (((x) & ASID_MASK) << 8))
5151

52+
#ifdef CONFIG_MMU
53+
void init_mmu(void);
54+
#else
55+
static inline void init_mmu(void) { }
56+
#endif
57+
5258
static inline void set_rasid_register (unsigned long val)
5359
{
5460
__asm__ __volatile__ (" wsr %0, rasid\n\t"

‎arch/xtensa/kernel/setup.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#endif
3838

3939
#include <asm/bootparam.h>
40+
#include <asm/mmu_context.h>
4041
#include <asm/pgtable.h>
4142
#include <asm/processor.h>
4243
#include <asm/timex.h>
@@ -85,12 +86,6 @@ static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
8586

8687
sysmem_info_t __initdata sysmem;
8788

88-
#ifdef CONFIG_MMU
89-
extern void init_mmu(void);
90-
#else
91-
static inline void init_mmu(void) { }
92-
#endif
93-
9489
extern int mem_reserve(unsigned long, unsigned long, int);
9590
extern void bootmem_init(void);
9691
extern void zones_init(void);

0 commit comments

Comments
 (0)