Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2686441imj; Mon, 11 Feb 2019 07:02:20 -0800 (PST) X-Google-Smtp-Source: AHgI3IaoKOGExmqp6VuVN+R7SYYdAwxQLGORKb0Z6HC7TBDCkZNH95INX/HxgMRNcQ5v8mKu4a2m X-Received: by 2002:a62:2008:: with SMTP id g8mr6557782pfg.121.1549897340053; Mon, 11 Feb 2019 07:02:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897340; cv=none; d=google.com; s=arc-20160816; b=grdWmV68rNka09X7gs6euKeVP4UMAWsN71oJajfdYTbKikI4mpHUhp5JLpSSR7ZhFo KDpAJgZSauos3CEsHn9vPtKRZ8J1mL9cP50GiJDhoPAPS7ymOzY2xM2rwheBWEPhmmwb nUrUQkC9SmaO+mYrKKyKWeHIyU+njSelyhnUIy7VHAM8BUH/RpYrTomZBHPL8fWRfqgp fbm9frKNwVIytZSBtqNg8FyfAT6QlD+kAxOeXDChZE6GvqMKITcAQWf/PARZdxJHn7vs 1IA9B7SsM4TFg+f/E3az9JAoVjNHf2Fa/JXeYODRG7CpTBNyZjLorSxYVVhlMkOmEVPp Ywxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2mRuB4QXwhNek4DTKQNzGjI5Ybxzx3HCudj/mxKTLvM=; b=oJrPh4kKJ897hOC0AlHBEcFvKf2aoJEhIlgn/oHzrWX/Td6pTPbYpMYcQgP11c/8nT SROspqPihjxhX4RA26q52sFk1zmaVgqydlKuRHXWH5zkOwgp2Bh6Z1AIrVZcfEWk4nIy FQ37e/5cXPjhDg43io/k0gI5NYs3gto2t2ADfmxEoZgIC352E80d6SlRM9rV+z2pUDup nyjAMqJiwubxNFBtWDnUKnZl0QGYAWqiHMhuEpGALerwL9athyS/cguIh7k4NEiysC2N YCxHdrMQIbLTAcJ3ww3mw8M9zHsE2pQCNLxF8p4KmvCgSHeASYwOMkPQ6+O0gheeyG2i csnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X5cfUh7K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c139si9704558pfb.281.2019.02.11.07.01.58; Mon, 11 Feb 2019 07:02:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X5cfUh7K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390091AbfBKPA6 (ORCPT + 99 others); Mon, 11 Feb 2019 10:00:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:48906 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388801AbfBKPA4 (ORCPT ); Mon, 11 Feb 2019 10:00:56 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D734222A8; Mon, 11 Feb 2019 15:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897255; bh=LSzuG0nH26v4JDS5LTbPK1925WZLM8Xj2ObAUcPaqsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X5cfUh7KYMoaWcqt4CuTxQozz41kXV8f9yiwR6TvFt96FkXvbjR/hEcFHiPGnflp0 sKiqbcSvKpmfSUGdvKL8b35nuP3qorhNM9F3DHlbB7kBC9Gupx2p4t9k7lakckpcdo FFzAG8K5j9CTGy646ZIgYiFKbV/YoN98fRj4BTfk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Roese , Paul Burton , John Crispin , Daniel Schwierzeck , Ralf Baechle , linux-mips@linux-mips.org, Sasha Levin Subject: [PATCH 4.14 141/205] MIPS: ralink: Select CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 Date: Mon, 11 Feb 2019 15:18:59 +0100 Message-Id: <20190211141837.607549131@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 0b15394475e3bcaf35ca4bf22fc55d56df67224e ] Testing has shown, that when using mainline U-Boot on MT7688 based boards, the system may hang or crash while mounting the root-fs. The main issue here is that mainline U-Boot configures EBase to a value near the end of system memory. And with CONFIG_CPU_MIPSR2_IRQ_VI disabled, trap_init() will not allocate a new area to place the exception handler. The original value will be used and the handler will be copied to this location, which might already be used by some userspace application. The MT7688 supports VI - its config3 register is 0x00002420, so VInt (Bit 5) is set. But without setting CONFIG_CPU_MIPSR2_IRQ_VI this bit will not be evaluated to result in "cpu_has_vi" being set. This patch now selects CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 which results trap_init() to allocate some memory for the exception handler. Please note that this issue was not seen with the Mediatek U-Boot version, as it does not touch EBase (stays at default of 0x8000.0000). This is strictly also not correct as the kernel (_text) resides here. Signed-off-by: Stefan Roese [paul.burton@mips.com: s/beeing/being/] Signed-off-by: Paul Burton Cc: John Crispin Cc: Daniel Schwierzeck Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Signed-off-by: Sasha Levin --- arch/mips/ralink/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig index f26736b7080b..fae36f0371d3 100644 --- a/arch/mips/ralink/Kconfig +++ b/arch/mips/ralink/Kconfig @@ -39,6 +39,7 @@ choice config SOC_MT7620 bool "MT7620/8" + select CPU_MIPSR2_IRQ_VI select HW_HAS_PCI config SOC_MT7621 -- 2.19.1