Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp210439rdh; Thu, 23 Nov 2023 01:32:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGP6/j4kMydCbRyh8YJd/Q12AlSxvbIhhJN8PY/Fa5OS4I9EOUTdQ36/7YSwzYuC1YAJrT X-Received: by 2002:a05:6a21:a590:b0:187:b995:fb5d with SMTP id gd16-20020a056a21a59000b00187b995fb5dmr6897259pzc.9.1700731967722; Thu, 23 Nov 2023 01:32:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700731967; cv=none; d=google.com; s=arc-20160816; b=UwqBEW+JF/hDaKYFybR3KO61j45OlnP17PTLKX4eMB4vRe/yqt5JuKdl3W9SDgrA7u uKzz+m4uKnQ2GyM85/D4cmHJIW/bl3i9BKVMZ5dtbsWW626uNVKhErUAZlJKi5qdNC5x wxi9dVF7mvB/4mg4xbvUhS9YJFBq4HTQdkDQryARUBVMz69AToUiemL46DQJoFpwTYPl 2Ea6TNS6mh+pTVXjx+E0yGIHCjsTP6NoTe/0qgwouvLzhsFomvHRXZWc8tTuGDc94jRr 5I5rkOKcpE0ql11SM2zTT4660XJk3kxQLypi2u2WRaUNPCZzwyyO3RrNKVV+mLORZWeT xL/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tqEJ9Wsu9O4u7Ifl6pZ1YDAaPyCTLMsbbJ4KpzLqR9M=; fh=CY4nGpEnAajVgyIb1JTmWEXpqZeWI8JmVzKlGKp7O7Y=; b=Ri+w35kWOo7qxp2Xde3xBXxOV5PZQi8TP2u4SOXQRqkJb11hOaYrCNVVRWjRnXOf40 QEkI2LrhowGovWhCgAfzdwle7BDdq//B7JrHJ7AhwmfQHlRXJbDk/1w00k2d7CM9lHHL dvhcPISL9vFee81yW4JDzalvy2wLq52DQVRfa9fy8Amx8knpzJ5nB5lQdIO9qjzJG1sU QMMbcWU317JCt2f51aWclAb3/w934J0BiFuiL2FqQELrsmRELczpuaNQvGjnLxCSLG/8 T7fJx7M5GAtX6wclqABhurjkbfDjpeXseygNxr39BJguNP8yRZLd7tWOmg+JwWFQfdgX flLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WBYdpA2u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id lj3-20020a17090b344300b002839aba9d89si981130pjb.25.2023.11.23.01.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 01:32:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WBYdpA2u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 509518261036; Thu, 23 Nov 2023 01:32:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbjKWJcX (ORCPT + 99 others); Thu, 23 Nov 2023 04:32:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjKWJcW (ORCPT ); Thu, 23 Nov 2023 04:32:22 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 229CD19E; Thu, 23 Nov 2023 01:32:29 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5094727fa67so852167e87.3; Thu, 23 Nov 2023 01:32:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700731947; x=1701336747; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tqEJ9Wsu9O4u7Ifl6pZ1YDAaPyCTLMsbbJ4KpzLqR9M=; b=WBYdpA2uJh485xa1UMp0bVUiKwfXPnC+e/G0ZnrpY2/7JB+Y7gAg11qbLB4lWq5fa5 zyHYX4z3jgWPbyruYfjxyT2F7aZcbbrj/Ne/4EgJA15VrGGYvEIFq/CfLD5ldCu1utdr xvO/RbIkgixdciZ4ZeunItPc6ZZl2GU+GJ65jZwzFbmkpIYfzc9mOaPDC7mAkVWZFus+ lZdyNS2S9mpXvAzhqPxP1qYPIyDAOc9RQQMF3ox3mgj1tQ69gfVMrPLG6w/G1AHlrLjZ JXOHX3qaoUWqeDtgByXIxdYrvhBPoYUlMBu3vmcxMgedInLAmIwGBKb5vtOTzODoIOLY rZhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700731947; x=1701336747; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tqEJ9Wsu9O4u7Ifl6pZ1YDAaPyCTLMsbbJ4KpzLqR9M=; b=JFAMv0wduZ0oZ29l1zX5zkZygs7OYbrF2Tf/M/x0ARRsS+LxF1dZdoULh6Ucdzi2Ba tiuGxyY3XsjNNqcRbuG8fVItvG327yI8ZHaCxBzRlozKPJLLn5oDjRe9egc1bQ1ffEps uNCxQevrdwENQUf8heLtXpPwkpZSo0FImwv9qBpKCjL+4FW6TKFRjjbplIkwxuobvOHQ B//pbEIVtDyytAr0/Ej42FVhXEfZK9fP7gtAKzQ+CVdJIJo6AUf+JPQTq4yY2RSWcFks epRHPvoQRHmC91ptDeEGLT6UfqBEeSjbmZWmkQfXELF/ERtoxWNLzTClVaEWfRjq6p1A ISzg== X-Gm-Message-State: AOJu0YxnSysB3YesRvqIlve1ZjtLCXVRUCn+zUXJ/wKaY6HyXu+rDogJ rtS2Q6pNrXu4ZAk19CVhnjg= X-Received: by 2002:ac2:4911:0:b0:507:9d70:b297 with SMTP id n17-20020ac24911000000b005079d70b297mr2872785lfi.60.1700731947096; Thu, 23 Nov 2023 01:32:27 -0800 (PST) Received: from mobilestation ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id p15-20020a19f00f000000b0050a7052409fsm135201lfc.121.2023.11.23.01.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 01:32:26 -0800 (PST) Date: Thu, 23 Nov 2023 12:32:24 +0300 From: Serge Semin To: Arnd Bergmann Cc: Thomas Bogendoerfer , Andrew Morton , Mike Rapoport , Matthew Wilcox , Tiezhu Yang , Huacai Chen , Yinglu Yang , Jiaxun Yang , Alexey Malahov , 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: Re: [PATCH 1/7] mips: dmi: Fix early remap on MIPS32 Message-ID: References: <20231122182419.30633-1-fancer.lancer@gmail.com> <20231122182419.30633-2-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 01:32:45 -0800 (PST) Hi Arnd On Wed, Nov 22, 2023 at 08:35:01PM +0100, Arnd Bergmann wrote: > On Wed, Nov 22, 2023, at 19:23, Serge Semin wrote: > > 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) > > Please don't use ioremap_uc() in new code, we are in the (long) > process of removing it from the kernel for everything except > x86-32, and it already returns NULL on most of them. > > Would the normal ioremap() work for you here? It seems to > do the same thing as ioremap_uc() on mips and a couple of > other architectures that have not yet killed it off. Ok. Thanks for the heads up. I'll fix the patch to be using ioremap() in v2. ioremap_uc() is just an macro-alias of ioremap() on MIPS. -Serge(y) > > Arnd