From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7B91C61D97 for ; Thu, 23 Nov 2023 16:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345252AbjKWQIS (ORCPT ); Thu, 23 Nov 2023 11:08:18 -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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ]