From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB7AC3A8F4; Tue, 23 Jan 2024 00:31:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705969860; cv=none; b=gAHDGo+U3+4fk/53GgY9DuBFsReE6ywlNohHqS49dsDvEVFOrFZWnZ3mamTkFfn2H9azKh8gGucPrS49unkQgKNxm/5HbfGipzJCwCg5dmQ2zYoVsHN4y9lpbJUYK9aK/uG8MmjezJfabN+mH6kugHhgmuSoaLOyqQxI5X0HCK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705969860; c=relaxed/simple; bh=4OWMHqo4y9E1+Z484Rt3bwJKTpYdBP80CeRuTER3dUg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gy4ZXtWlCQlG545l0ZTwEM10zZCCqyWyk6sELNiGcLtekKOLh8B2PjaFItsX11G1tNqi3dz4e/7NQn9fKyld0fg1P/CJBdouunUHdMYi0H8ioJqsDJQErvXUk3Bjaigm8uw+YhEPxTFlbAPi77S1gOkk+lMxKJI7s0TW8bv+tR0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BIbdLTV9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BIbdLTV9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 926F1C433C7; Tue, 23 Jan 2024 00:31:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705969860; bh=4OWMHqo4y9E1+Z484Rt3bwJKTpYdBP80CeRuTER3dUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BIbdLTV9SEPYvjhlDsO2xikuppb3NxoCbHSHWT83OxNPNNv72OdOn/PhJfebkni4t 6wjlh7fSZx0b7xqCgZORdSiKEhsMx+Bhc2tCutB2hcrMBwEEGBsu/U+/f95pY9FFjf bHoYMmcI9BGNi2fhcyBt9UWURcke27y/wJ3NdKoU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Serge Semin , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 6.7 491/641] mips: dmi: Fix early remap on MIPS32 Date: Mon, 22 Jan 2024 15:56:35 -0800 Message-ID: <20240122235833.437407018@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122235818.091081209@linuxfoundation.org> References: <20240122235818.091081209@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.7-stable review patch. If anyone has any objections, please let me know. ------------------ From: Serge Semin [ Upstream commit 0d0a3748a2cb38f9da1f08d357688ebd982eb788 ] dmi_early_remap() has been defined as ioremap_cache() which on MIPS32 gets to be converted to the VM-based mapping. DMI early remapping is performed at the setup_arch() stage with no VM available. So calling the dmi_early_remap() for MIPS32 causes the system to crash at the early boot time. Fix that by converting dmi_early_remap() to the uncached remapping which is always available on both 32 and 64-bits MIPS systems. Note this change shall not cause any regressions on the current DMI support implementation because on the early boot-up stage neither MIPS32 nor MIPS64 has the cacheable ioremapping support anyway. Fixes: be8fa1cb444c ("MIPS: Add support for Desktop Management Interface (DMI)") Signed-off-by: Serge Semin Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/include/asm/dmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/dmi.h b/arch/mips/include/asm/dmi.h index 27415a288adf..dc397f630c66 100644 --- a/arch/mips/include/asm/dmi.h +++ b/arch/mips/include/asm/dmi.h @@ -5,7 +5,7 @@ #include #include -#define dmi_early_remap(x, l) ioremap_cache(x, l) +#define dmi_early_remap(x, l) ioremap(x, l) #define dmi_early_unmap(x, l) iounmap(x) #define dmi_remap(x, l) ioremap_cache(x, l) #define dmi_unmap(x) iounmap(x) -- 2.43.0