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 3BE87C4332F for ; Mon, 17 Oct 2022 12:50:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbiJQMun (ORCPT ); Mon, 17 Oct 2022 08:50:43 -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 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