From patchwork Wed Nov 22 18:23:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 13465350 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA95BC61D9D for ; Wed, 22 Nov 2023 18:24:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E89C6B062B; Wed, 22 Nov 2023 13:24:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F3F316B062C; Wed, 22 Nov 2023 13:24:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB81F6B062E; Wed, 22 Nov 2023 13:24:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C8A2C6B062B for ; Wed, 22 Nov 2023 13:24:28 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8FFB4A1376 for ; Wed, 22 Nov 2023 18:24:28 +0000 (UTC) X-FDA: 81486415416.12.D9EFAF2 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by imf24.hostedemail.com (Postfix) with ESMTP id 8C391180005 for ; Wed, 22 Nov 2023 18:24:26 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=L93Zg5nD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf24.hostedemail.com: domain of fancer.lancer@gmail.com designates 209.85.208.169 as permitted sender) smtp.mailfrom=fancer.lancer@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700677466; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yjHlY+dwgtlGLlPuvunFHNqCcfV7AAmhZsbau9o57nI=; b=YBort49TpVAMI+3U7RKNjxaQxLiUEHYyusIxI7uvs0XgmVkwPzSvAiRywfs3eIblwIf4S4 iFd6FV8MbPxA0TgBi67S7v5nUrdu9O+cpLm9oFGALCCjfFJGcShqcsA34AyEyLEdsa6XCT DiKRkM01VBNsxpZ3Syknvqql6n7m50A= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=L93Zg5nD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf24.hostedemail.com: domain of fancer.lancer@gmail.com designates 209.85.208.169 as permitted sender) smtp.mailfrom=fancer.lancer@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700677466; a=rsa-sha256; cv=none; b=kcJmQNsl7etU3jkNXxjupqRLbyU0UYaUbbDhmDAgKAKLc6vETaCNnTutGdf030vu2n9GcW klov4vGOycyE4fN70Bfnz08z6Z/pAU2OeqJ/cmdhABP9UPCn22GAh6uLd9o0MkCZ3T/xfP DN9F2LLs35uBIrk/Q/AjFmcrOGi48bg= Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2c897ba4057so816621fa.2 for ; Wed, 22 Nov 2023 10:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700677465; x=1701282265; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yjHlY+dwgtlGLlPuvunFHNqCcfV7AAmhZsbau9o57nI=; b=L93Zg5nDP3+z6YpmdKnZb22vYMICab1eZXwEepgF6GH4LprnsdUBaNLInft5hYzplt 60ehkA6prCtilzt2kDXHd4B8+VtNgSEx27Nm5Vt4tvFE7Cwv8qwJGGXh2hFCcwFBL7CO YnS09ebeU7Apdyi0tRAhPY/GSdJnpCwA/ZJQ27jQiv2yXMs98A8gmg/eZTqyuHg3OcjY yCYM6bGYyW8pByuIhAwdR90u2wzJGLancSYpt9Bi3rd+/5rsLyXeRV2qnMKAyQw5siyT r1/zMOIZDlOJZVzKWDyxTcFOvYaqs0aPO7jYjDxj6Q+LmhQG+W7hHBspziDbIsUtUUUl +wCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677465; x=1701282265; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yjHlY+dwgtlGLlPuvunFHNqCcfV7AAmhZsbau9o57nI=; b=GGE2UKFmikEKkBY91TVI1AT5zRy4Dwp+mwq+a3cK32FQ7lVMWOaP5Mxr6sRKRr/3yB 5crYKbZ77PEbmP0SI5yktXKtj2vra1hKM6qv6sXWrufCvu/f6nXZNkHpjI9LfHkteXa5 EnoaM+RAgu07De0rHIJALxLtl6r3ZH2/CJ4yqp7iFmIwCD9YlA38CDVrvrpDn1CEKEui aN68aTdGeb0sM7Fx8q4TryZgaDS8KCiahjDjLYNnAtKawzXYDjnXhNf2FEbxkJjRBxJP +tDa6q9E4IfQOUAmCsJBOr1DLisg/KgswEOUtCZoDlutWE5DD6cprEnigApAoHu77cnD ZZLA== X-Gm-Message-State: AOJu0YxHnTxN5VF9Y0AOs69XesLeDiWRO6LVXFjnpBDdLQClD/YV9+0p 2jy5NmJVzqNtnSQHLxbPePk= X-Google-Smtp-Source: AGHT+IFXwabmg+qbE103kF3TmOv1sYfzVGr6ur/Y2zlrmwFdEQbij6rj3CZvgc4sXeVNfM5Rzy7XRQ== X-Received: by 2002:a2e:91c7:0:b0:2c5:24a8:c22d with SMTP id u7-20020a2e91c7000000b002c524a8c22dmr2198720ljg.3.1700677464782; Wed, 22 Nov 2023 10:24:24 -0800 (PST) Received: from localhost ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id f6-20020a2eb5a6000000b002bcbb464a28sm12020ljn.59.2023.11.22.10.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:24:23 -0800 (PST) From: Serge Semin To: Thomas Bogendoerfer , Andrew Morton , Mike Rapoport , Matthew Wilcox , Tiezhu Yang , Huacai Chen , Yinglu Yang , Jiaxun Yang Cc: Serge Semin , Alexey Malahov , Arnd Bergmann , Aleksandar Rikalo , Aleksandar Rikalo , Dragan Mladjenovic , Chao-ying Fu , Marc Zyngier , linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] mips: dmi: Fix early remap on MIPS32 Date: Wed, 22 Nov 2023 21:23:59 +0300 Message-ID: <20231122182419.30633-2-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122182419.30633-1-fancer.lancer@gmail.com> References: <20231122182419.30633-1-fancer.lancer@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 8C391180005 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: jeh1mm4pqtty9nface3psxn1ecfskexe X-HE-Tag: 1700677466-840516 X-HE-Meta: U2FsdGVkX1+/64x/IqedYrTEvTuv6Ku4fX7Xq9PbKx2dN0KUD2iR927+sGnpnRWfhmFK4rcw1IaRm9PgfOFaHbJRemrwi10ayv/0w+mCBT4WqNCyzMlGwlsWT2JLjA1BpWOJsTpQRYHkER+NswMMjOuWgL5wE4gOg1fV4tRwuukifvid6vB1XmZ2HFyzP7YQHrkX0Y6KTEsdGpGWC9tanhc7epvyPNOG+7A2T3plR4Ay/l9Qls3CAW1UdpZLDLdkKEiIT/sbQGuMHH8BUfKcDhmeTPhlmDMzRY7WcA/TuPWHvXC7lUE/vMx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W37Jgan/NcIK8FZ3Ie9fX1a3s+dKCJPqSJ/eHhsdY66RIgSA6oU5CrlRahSQfE5sSaUGqopxDncqt0zvDmc7XDlPZ29k884KvuJrfzMduu3ybsukI5cTpaJefegwKfO+Ttkt6vjMPpCOHcRzyq6AY4Oe4Ozf7c6uLFV+upEXjLXJtr+xKPtg3II8Ro6dMMHC4s6xNAjAw9mqN2Hq1TR9/h5Q X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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. Fixes: be8fa1cb444c ("MIPS: Add support for Desktop Management Interface (DMI)") Signed-off-by: Serge Semin --- 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..525aad1572d1 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_uc(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)