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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42036C4332F for ; Mon, 17 Oct 2022 12:50:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 852136B0072; Mon, 17 Oct 2022 08:50:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7DAE46B0074; Mon, 17 Oct 2022 08:50:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 67BFD6B0075; Mon, 17 Oct 2022 08:50:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 586666B0072 for ; Mon, 17 Oct 2022 08:50:27 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 22F92160450 for ; Mon, 17 Oct 2022 12:50:22 +0000 (UTC) X-FDA: 80030424684.12.2655255 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by imf20.hostedemail.com (Postfix) with ESMTP id DA2741C003E for ; Mon, 17 Oct 2022 12:50:20 +0000 (UTC) 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666011021; a=rsa-sha256; cv=none; b=3udgKh1U9KshDz7hgfAV5w1cNGoa7ByODC8ecc6Rl137AT0nwC2mHgr9gdxvvw5a//4cxT g958JqoyaQxSgvLHpxE+g8/52FVpVYZw2IQbp+OwnrqZX4nAE2PHw4cXi274cImLqms5tB VIUNY4mrkuwas6B4fcs+piZlcHQi+oE= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=ellerman.id.au header.s=201909 header.b=DF+emvha; dmarc=none; spf=pass (imf20.hostedemail.com: domain of mpe@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=mpe@ellerman.id.au ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666011021; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=25OG/pBetWurP10Vpt2CJUhfNhc9C8lMineW3GxgWGE=; b=Zo9p1ffPYNpEqHbfJ1MjYxSAAPACgYdFP6KlmANV8Agre1FqYi8fDbMb2bR6f7uTk9ikcP eoSYzz48974q7V1lTasJxlbwzr5cZb7r7LrqaX9x1jECLukztMD+DlPn3hILe9tdBOoC9z t8rfeZZ6KUKOadQFV+H3pRvW+cnjzd0= X-Rspamd-Queue-Id: DA2741C003E Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=ellerman.id.au header.s=201909 header.b=DF+emvha; dmarc=none; spf=pass (imf20.hostedemail.com: domain of mpe@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=mpe@ellerman.id.au X-Rspam-User: X-Rspamd-Server: rspam08 X-Stat-Signature: d7rchdyx4wgz1jxobs1g9hniw3erd7sr X-HE-Tag: 1666011020-272955 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: "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