Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4417090rwi; Mon, 17 Oct 2022 06:06:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+u4AYtcCasTA7FaRs++69pU0+IgmBB/w5hz9Gcb7r75hrDCT41sRFHuztENtbLxthgRkY X-Received: by 2002:a17:903:110f:b0:178:ae31:ab2 with SMTP id n15-20020a170903110f00b00178ae310ab2mr12059415plh.89.1666012000356; Mon, 17 Oct 2022 06:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666012000; cv=none; d=google.com; s=arc-20160816; b=CFD+ARIWWQMzZexXldEtw22sZ7Sj5nT1jdt5Md06mbpL6SpPMTIBjG3NzHQVbcX+t9 fEH6BCej4Y2KtF+kkR0IHfXGQYdAgunshiX7BMbbZFhfZzHLv1Y5AiXEIVJFiuuRXe4o 6AsqnL5+KQ+lmAkdCJ4YQqah2CxeskWu7PdRhbJBnrFhS+c8H7aWW3CeTSLaFtqwkGRr C9GTkUdlmW22RsDvOMrddnkZEawHgns0kIY4IASeqzMzc4A4xnNVCZeoH6H1jdG0IbID lqB2kCHEtkeIkaVjpA7L+JrYRhPCVSH4+Lxl8GNnP0Y+wLqNUpM7GFM63uHbKF8tWOD+ KoOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=25OG/pBetWurP10Vpt2CJUhfNhc9C8lMineW3GxgWGE=; b=IZ6NApx9S9zXMaas8XJh3YprSfqe02w435y1TRYvzxRXCRjTUiq1Npt6ePJMBWOKrM /7WWV42loVV4xt9QA+II73ESX24LG+gxU3dfgvdQXgDKxeejMCupi2mU3RwUfKQ2eveH 0MZADxtDpVH61OiDVzkvq2gbtWf2GTnRCKQdLLFJwneWD/e5rYwtiyBUzphGh33drwnR NwOJ581o75DEVZ9mR23O7fHsakxJcawbg4Bia1aRZIr4UtQWlgkP2BB0Q/SZqJlNVGsP a73st3sOLskd0rF45+Yo2I2J3chJhqBIo7GjrxsXaZe1NYPr7yl08q1hOQUQBO9lSJ// CrsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=DF+emvha; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ng15-20020a17090b1a8f00b0020db7d975ecsi14414386pjb.176.2022.10.17.06.06.21; Mon, 17 Oct 2022 06:06:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=DF+emvha; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229870AbiJQMul (ORCPT + 99 others); Mon, 17 Oct 2022 08:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230354AbiJQMuj (ORCPT ); Mon, 17 Oct 2022 08:50:39 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4C8A11C1A; Mon, 17 Oct 2022 05:50:37 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4MrcKL1ps7z4xGj; Mon, 17 Oct 2022 23:50:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1666011017; bh=25OG/pBetWurP10Vpt2CJUhfNhc9C8lMineW3GxgWGE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DF+emvhag+G40a3GGl4MSqkBeGO9J3EPKUhF/IstEdgLtz0MFMyklFNGgI1rp03u0 UDEw4mdi0taHxRRCxNFoQ07nlHHWBuxSI1NMhjyJYVnqj1BSaGioPsn1K8LAlzXjLu JIMlo3o0d5z8ZzJLau2uqFWhUhfo+d3TQ8m7QjuEhDDQGNw6QIP+bKmf4/+OANJ5L0 dyz6L7DGKxDdzOTza5bRwbyGPC9yKERQMoP/WCw0ak6frx19U2WGqigRI9dSbanano oKYD15JCrU2PdddDsqAkGqCsxz1SLBckX+2ZW2AHsyr7OpGYkMhZ0iTwPE0L1grJFK 9xoG3BJ2TvNDg== From: Michael Ellerman To: Arnd Bergmann , Alexander Gordeev Cc: Christophe Leroy , Baoquan He , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Linux-Arch , Andrew Morton , Christoph Hellwig , wangkefeng.wang@huawei.com, schnelle@linux.ibm.com, David Laight , Stafford Horne , Benjamin Herrenschmidt Subject: Re: [RFC PATCH 7/8] mm/ioremap: Consider IOREMAP space in generic ioremap In-Reply-To: References: <8c7ac4667c6a3cc48f98110117536f60d51ece4a.1665568707.git.christophe.leroy@csgroup.eu> Date: Mon, 17 Oct 2022 23:50:12 +1100 Message-ID: <87sfjmlim3.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Arnd Bergmann" writes: > On Sun, Oct 16, 2022, at 9:54 AM, Alexander Gordeev wrote: >> On Wed, Oct 12, 2022 at 12:39:11PM +0200, Arnd Bergmann wrote: >>> "Some" means exactly powerpc64, right? It looks like microblaze >>> and powerpc32 still share some of this code, but effectively >>> just use the vmalloc area once the slab allocator is up. >>> >>> Is the special case still useful for powerpc64 or could this be >>> changed to do it the same as everything else? >> >> Or make it the other way around and set IOREMAP_START/IOREMAP_END >> to VMALLOC_START/VMALLOC_END by default? > > Sure, if there is a reason for actually making them different. > From the git history, it appears that before commit 3d5134ee8341 > ("[POWERPC] Rewrite IO allocation & mapping on powerpc64"), the > ioremap() and vmalloc() handling was largely duplicated. Ben > cleaned it up by making most of the implementation shared but left > the separate address spaces. > > My guess is that there was no technical reason for this, other > than having no reason to change the behavior at the time. I think the immediate reason for it is that on some CPUs we have to use 4K pages in the HPT for IO mappings, but PAGE_SIZE == 64K, and we can only have a single page size per segment (256M or 1T). cheers