]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
xtensa: fix noMMU build on cores with MMU
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 1 Feb 2017 02:35:37 +0000 (18:35 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Wed, 1 Feb 2017 02:49:59 +0000 (18:49 -0800)
Commit bf15f86b343ed8 ("xtensa: initialize MMU before jumping to reset
vector") calls MMU management functions even when CONFIG_MMU is not
selected. That breaks noMMU build on cores with MMU.

Don't manage MMU when CONFIG_MMU is not selected.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/kernel/setup.c

index 88a044af7504dd9c47d0f97d64620ac8de4b5739..32cdc2c52e98c2a380b60bb7e907cccd40121bd4 100644 (file)
@@ -540,7 +540,7 @@ subsys_initcall(topology_init);
 
 void cpu_reset(void)
 {
-#if XCHAL_HAVE_PTP_MMU
+#if XCHAL_HAVE_PTP_MMU && IS_ENABLED(CONFIG_MMU)
        local_irq_disable();
        /*
         * We have full MMU: all autoload ways, ways 7, 8 and 9 of DTLB must