From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 154CA38D00F; Wed, 25 Mar 2026 09:58:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774432718; cv=none; b=aU2aRitSln/rwkEyE0m0UQsH5YGaodCqEZ9uCh+HBLpDDxtISJgbIjdbqQHk+Ou13MgRsAgNKh4h7f29iAUseXORigGfXNGNv1TuwlcGf1CdZrk6TElxyQd+BMSbDK/plrGZ0zDCeiCDGvMxG5hXDJdgokDpayf8edLw/F55pfY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774432718; c=relaxed/simple; bh=HuY/gXey+uWVLYsCI6CkmOeVgc5q6DFm7SVnZaIS/YM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YG+tbgfN2Y59l10U8ZCb+e1hb5lwyWSIi8As7dpKyxVyItzcG4GIAO7uITBV/566VNeD75k2DscsNukYNcYHq9vfhJ+0fdglbA5hLkWSAza4p22DocfedPa4enyhs2HBqh39cwUY9Vq7mygFB/krMUCdfRfgRpbjAaU0pWow0JY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u+uY8j9D; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u+uY8j9D" 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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)