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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAE5BFEC11B for ; Wed, 25 Mar 2026 09:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OpYiYoXoDG6Ic4xDLF6eLk5LC3Stg63tlxDdSDp9P3A=; b=i4zlx8BAU0pWqQCb+PRR36bcnC xzsszBTqaaHatfwSzUIT6CxSr0WFdcGWTv0uIPr5JPNPy1aTfU1KN6tIalBDzhu9IUWIkU2hV4+tw goxNRRAJHb2h5Sgv3pSLLNRx4Edf0JtSedWaJIE+fVc2g1v6+uvVJ3Sh7H9qgndOWtsRElrlX3Qq7 ZjkdPjiDprsyGRYaF0eA2bDs/Ngf6D/yK8vIYCe3rOMjK2yYvAS+PURAUK/TG3DLW/G1D6k0iCIgq c6NmPuusoqr3izRcLYly9dl5QIprSzVRUE1pgf9TuL/Ntys1o2u3OHm1xfblxRGbnsfCo0jPM1lth nQNnEE4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5L0a-000000035og-1p4l; Wed, 25 Mar 2026 09:58:40 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5L0Y-000000035oD-1RM5; Wed, 25 Mar 2026 09:58:39 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id EBC5943C1A; Wed, 25 Mar 2026 09:58:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEFACC4CEF7; Wed, 25 Mar 2026 09:58:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774432717; bh=HuY/gXey+uWVLYsCI6CkmOeVgc5q6DFm7SVnZaIS/YM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=u+uY8j9DdWnf6aJO3ZHhf6pj8o6upnz4tgfFLuwATHjhN6SatZRmXJbkO3JFsl45s ADbQAVoZ2bfxIeImDpnwFdFCo0b8tn6HNyoZW5/j1NFRa+uXe019/Hzk1B5PNJSpge oitV6NhzQsBWdl1ZGdGjjAleBOpYArsdSSBmuxkg0gbhRkp5b/B8T8vJcIMEA4HjHA nsppJG3k+pdtmXbLxSqIZuQQW9qLID/Ou1ZIPnKK9/Xrsxbabxym2XTk8bjNKNnh79 gW+HYIQy6QtFwqaoSQC+HIe2caOI1oDm6sqQ/VOpZmE6eK1dpqAouDkD3M6o3nEwh3 regiPf+e17GQA== Message-ID: <9b205b06-e938-4f30-a16d-7d90f8c49818@kernel.org> Date: Wed, 25 Mar 2026 10:58:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 11/21] mm: add mmap_action_simple_ioremap() Content-Language: en-US To: "Lorenzo Stoakes (Oracle)" , Andrew Morton Cc: Jonathan Corbet , Clemens Ladisch , Arnd Bergmann , Greg Kroah-Hartman , "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Bodo Stroesser , "Martin K . Petersen" , David Howells , Marc Dionne , Alexander Viro , Christian Brauner , Jan Kara , David Hildenbrand , "Liam R . Howlett" , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org, linux-staging@lists.linux.dev, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Ryan Roberts References: From: "Vlastimil Babka (SUSE)" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260325_025838_430190_91521033 X-CRM114-Status: GOOD ( 12.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/20/26 23:39, Lorenzo Stoakes (Oracle) wrote: > Currently drivers use vm_iomap_memory() as a simple helper function for > I/O remapping memory over a range starting at a specified physical address > over a specified length. > > In order to utilise this from mmap_prepare, separate out the core logic > into __simple_ioremap_prep(), update vm_iomap_memory() to use it, and add > simple_ioremap_prepare() to do the same with a VMA descriptor object. > > We also add MMAP_SIMPLE_IO_REMAP and relevant fields to the struct > mmap_action type to permit this operation also. > > We use mmap_action_ioremap() to set up the actual I/O remap operation once > we have checked and figured out the parameters, which makes > simple_ioremap_prepare() easy to implement. > > We then add mmap_action_simple_ioremap() to allow drivers to make use of > this mode. > > We update the mmap_prepare documentation to describe this mode. Finally, > we update the VMA tests to reflect this change. > > Reviewed-by: Suren Baghdasaryan > Signed-off-by: Lorenzo Stoakes (Oracle) Acked-by: Vlastimil Babka (SUSE)