Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3635425imu; Mon, 28 Jan 2019 08:11:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN4vevEhUnhSx6XU4BKKx89+gl1uNzqWlRFSmENnwfygfo4EU2jqk6K+C3PXX/hDSrL4BFBJ X-Received: by 2002:a17:902:161:: with SMTP id 88mr22895361plb.306.1548691911112; Mon, 28 Jan 2019 08:11:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691911; cv=none; d=google.com; s=arc-20160816; b=TZqWtitdTDI2HpBcU7DSKvvd0m01SpJK3PCL7bCIyAMWFNqZfBjC/vZkrf7kYwE1Rf zhorg/odZ6FUUx0C2TrE7o3joaDO+5Ia+qeRyzlflOwWcXHICm34ZK5ZEd6zGDm+PCVk 1He7uhEZ8FOHKj4dv0nx4dvbwwwlmEK/jT1/gMl/dORY7oM+pfccsnsQtytIAZzGe9v/ s6liNM/o64UkthZVsTm8kv4PnS0DfiTOEpB7lHQ+LRPFa9ZLbf6uGsg7boSsoBPINl9d /WQ+U5n614KoV7TLN7dhGLWLkNDbCuRyjry6w37UGomMU/WL+AcOo5+yDfqBJH40UR7q uzaA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nDPzwFL8QveY/0IMQn9LtHHaMKUH+T+FSbWyM6n+CWE=; b=VkaVznDIVmOaYrvAABy++7fHWHz83JLITb4eGgRGYM3PDAJlIEiMc4+NYSmzuxPu4b vvLqs2ZCUt8+iPOKGgj2yaRal7H/W1XKbwojYYMlAS7ULYnAEAqO9urc+QofNQvMGhu3 nUkrpMO2ServhSmqUqlJiR77eaDJhVWs42dcDK+NQRi3Wl02PAoLJmQavDM3lW7uYLxG vptjbHG3NeT+wMS5eNJaAt67vB7/oDrOKQ6qDek5SCyOumhlk9SAnOpmUOxnL1br8wfI T/2GnAMdtg6cltyskZznWypAeKffF3Cw8x0MXKeGaq5NGIMBCELVE+NzSEIY4QAeBgFV 5T5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qlLUh3sv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si26443851plt.273.2019.01.28.08.11.34; Mon, 28 Jan 2019 08:11:51 -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=qlLUh3sv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732753AbfA1QKR (ORCPT + 99 others); Mon, 28 Jan 2019 11:10:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:35876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732298AbfA1QKN (ORCPT ); Mon, 28 Jan 2019 11:10:13 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 781B72177E; Mon, 28 Jan 2019 16:10:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691812; bh=eDYTTJ6p7zS48/XjJJfxWeet2C2n7NaYhdS2NEI87t0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qlLUh3svPIOIeYb1hEzhW/CXwSRkZeSdFIyj1qpZ/V4fE5WZlWOfg8F8bscg32Bqt 9wAEcEG9bdiT84y15IEGjvnT4oZleCOeNeznrdcJDxg89Mz5Qr6FSqLcLNKHliWed/ 9iOBiKYRNyU5guQGPcdONHjn57wA+LO49kLQgriA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Stefan Roese , Paul Burton , John Crispin , Daniel Schwierzeck , Ralf Baechle , linux-mips@linux-mips.org, Sasha Levin , linux-mips@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 225/258] MIPS: ralink: Select CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 Date: Mon, 28 Jan 2019 10:58:51 -0500 Message-Id: <20190128155924.51521-225-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Roese [ 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 1f9cb0e3c79a..613d61763433 100644 --- a/arch/mips/ralink/Kconfig +++ b/arch/mips/ralink/Kconfig @@ -38,6 +38,7 @@ choice config SOC_MT7620 bool "MT7620/8" + select CPU_MIPSR2_IRQ_VI select HW_HAS_PCI config SOC_MT7621 -- 2.19.1