Return-Path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:34898 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784AbdBACwA (ORCPT ); Tue, 31 Jan 2017 21:52:00 -0500 Received: by mail-pf0-f195.google.com with SMTP id f144so30656546pfa.2 for ; Tue, 31 Jan 2017 18:52:00 -0800 (PST) From: Max Filippov To: linux-xtensa@linux-xtensa.org Cc: Chris Zankel , Marc Gauthier , Max Filippov , stable@vger.kernel.org Subject: [PATCH] xtensa: fix noMMU build on cores with MMU Date: Tue, 31 Jan 2017 18:51:46 -0800 Message-Id: <1485917506-31842-1-git-send-email-jcmvbkbc@gmail.com> Sender: stable-owner@vger.kernel.org List-ID: 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 --- arch/xtensa/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 88a044a..32cdc2c 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -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 -- 2.1.4