Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp446829rdh; Thu, 23 Nov 2023 08:08:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtDaH7ofshaoMDsjqG0URufiE+MsXRgjOcGLgStp06qnLOgNMzMpsXvX49i7LzUgcTHfP7 X-Received: by 2002:a17:90b:1a8c:b0:280:bb7:9fa0 with SMTP id ng12-20020a17090b1a8c00b002800bb79fa0mr6096185pjb.43.1700755713552; Thu, 23 Nov 2023 08:08:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700755713; cv=none; d=google.com; s=arc-20160816; b=X6gE16NXE58Dsl6a1it3rT2mn8+Y/GlhiNaPpMpkpkvIbBgnvMmKERRMpdNDRHqohu bjH9KjTyY0GYjFQL5VAhJv7SD9rPdpd+rCX3tuWsb4gUU3XXTUmrQQOHTTXWdViLURaW LcMYUxKX5/bVQR2MLhWUDLKhZCosAew9B1IvWeaZl+z23aiqBj5NhdqNniWS9bGupDKa krfSlh8hOKTdl6LDvdi8FG6hjayAi/sqF8Nl2rgUtFXhAWieRQdn6baPryU0eEm1rM4M MCmROIZGe9HvTLo16Ckxng2MTaKuarKHhdbXTgAOcZEYnWfZKQnrt/tyCOcykt611I3i bdMQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zCEDM5pQwQXkXHjdw5D9hDKa8sxMuafN+HhnCX1OVNQ=; fh=F59kH2ibA1iKyOsSsDQImk9HL2yTa3Z5dQrd+wmzkSE=; b=MJpI+5TnxuqC1sPT9r3CdrM5i5hXX5opDK5WvpsKTsiMAuGmuFUs5mmOgGH/inX5x2 xPdbZufkyd/o+OS96HcT00umPBTFi8r2xwiG+cPHg4nlF9pklphvhvafHxGd+vZd/7sQ Yk/plQ2Joutqg5UUK5tIUlRFgFusJ7i1NDqu268WQ+FMdhjjM4unjIl/UJicZFWjbQNs +pA5Q4kNS1OuPUYNLwpOVTc+k3AZvDvaCEHvVm7Cs46Kh0QSFtXS966MCqgn1zvk22xw 9r3yWjmQbgmj1kNlMDTDsLxf2OYZZpAgOCEhxT3vU3XMVuYaTah7guPSCQA0zLHF80TE L6YA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d12-20020a170902cecc00b001cf640d2017si1419916plg.346.2023.11.23.08.08.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 08:08:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 360A78068E37; Thu, 23 Nov 2023 08:08:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345086AbjKWQIQ (ORCPT + 99 others); Thu, 23 Nov 2023 11:08:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbjKWQIC (ORCPT ); Thu, 23 Nov 2023 11:08:02 -0500 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 96F0C10E2; Thu, 23 Nov 2023 08:08:01 -0800 (PST) Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1r6CF3-0002rO-00; Thu, 23 Nov 2023 17:07:49 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id C04F6C0136; Thu, 23 Nov 2023 17:07:10 +0100 (CET) Date: Thu, 23 Nov 2023 17:07:10 +0100 From: Thomas Bogendoerfer To: Jiaxun Yang Cc: Serge Semin , Arnd Bergmann , Andrew Morton , Mike Rapoport , Matthew Wilcox , Tiezhu Yang , Huacai Chen , Yinglu 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> <8ca730b9-fa8c-46ea-bdc5-158da0f29c3a@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 08:08:31 -0800 (PST) On Thu, Nov 23, 2023 at 03:07:09PM +0000, Jiaxun Yang wrote: > > > 在2023年11月23日十一月 下午12:29,Thomas Bogendoerfer写道: > > On Thu, Nov 23, 2023 at 12:13:11PM +0000, Jiaxun Yang wrote: > >> > 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. > >> > >> Perhaps we need to fix ioremap_cache so it can give a KSEG1 address? > > > > KSEG0 ? > > Ah yes it's KSEG0. the problem with all 32bit unmapped segments is their limitations in size. But there is always room to try to use unmapped and fall back to mapped, if it doesn't work. But I doubt anybody is going to implement that. > >> AFAIK for Loongson DMI is located at cached memory so using ioremap_uc > >> blindly will cause inconsistency. > > > > why ? > > Firmware sometimes does not flush those tables from cache back to memory. > For Loongson systems (as well as most MTI systems) cache is enabled by > firmware. kernel flushes all caches on startup, so there shouldn't be a problem. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]