xtensa: extract init_kio
KIO region placement may be specified in the device tree, that's why it's initialized with the rest of MMU after the early_init_devtree. In order to support KASAN the MMU must be initialized earlier. Separate KIO initialization from the rest of MMU initialization. Reinitialize KIO if its location is specified in the device tree. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
@@ -207,6 +207,8 @@ static int __init xtensa_dt_io_area(unsigned long node, const char *uname,
|
||||
/* round down to nearest 256MB boundary */
|
||||
xtensa_kio_paddr &= 0xf0000000;
|
||||
|
||||
init_kio();
|
||||
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
@@ -245,6 +247,10 @@ void __init early_init_devtree(void *params)
|
||||
|
||||
void __init init_arch(bp_tag_t *bp_start)
|
||||
{
|
||||
/* Initialize MMU. */
|
||||
|
||||
init_mmu();
|
||||
|
||||
/* Parse boot parameters */
|
||||
|
||||
if (bp_start)
|
||||
@@ -262,10 +268,6 @@ void __init init_arch(bp_tag_t *bp_start)
|
||||
/* Early hook for platforms */
|
||||
|
||||
platform_init(bp_start);
|
||||
|
||||
/* Initialize MMU. */
|
||||
|
||||
init_mmu();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user