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 E5EB6768F6; Tue, 23 Jan 2024 02:05:19 +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=1705975520; cv=none; b=KrQCRGLcbHGeEAxwpy72CJ7BOyMC3PPCnMbtQqyXlP+wPBgJuzX+W+IaE2nFUu/YE30lYQMWImg2VyYOkhT7qCmFMsmSwNJ8goeJHS1T94N4yW1Cby6nXlDPHepAwXPV7eKj7peQx5Mj6Zz3qQesGS9QWnpEUn5TGMu6HaMZIy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705975520; c=relaxed/simple; bh=FzhzhTtleySESND3IFj1y0oAy/Cb2amCZOXkDfvbsmk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MICVO2/WpUEBEXeNTF4i2WfbuCvarClIbAgg9xN+eFcpsUtvMIe6GYH1zz+TuVyDthuauXP8JmKw8tZVFT2HQnUNkjxG72oUCger/oeYk/DQ48kYy9thpxvLSQxqvdSA4tXTq8WrnLn30BlEPALHg2ojp/9jGU9lW8yz7gGOWEE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rVEi1o1c; 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="rVEi1o1c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA255C433F1; Tue, 23 Jan 2024 02:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705975519; bh=FzhzhTtleySESND3IFj1y0oAy/Cb2amCZOXkDfvbsmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rVEi1o1cjxQKsKcOkSqpXQr2Db41ptZ+3NGLFh3nsuInRvAV5lROT+zjM2C2hrDj7 ryRvWXJ9A0qXvk5hO9cJIDy0vpB8fuN6vOCoRvboDGF09vFjzQprun9h74Om/Facdj w7Ur/8cM/Ihr2nAfp3xTBeHZlcbuvUiegsywLHl0= 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.6 446/583] mips: dmi: Fix early remap on MIPS32 Date: Mon, 22 Jan 2024 15:58:17 -0800 Message-ID: <20240122235825.623503533@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122235812.238724226@linuxfoundation.org> References: <20240122235812.238724226@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.6-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