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 6551CFEA83B for ; Wed, 25 Mar 2026 10:18:19 +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=M3Oaf+lsL/xagpYhIMI77+rJU8pe63gBP7xVhdSABk4=; b=Zw6eddLTKnE/ncl0bqanhhAhRK TfAU18iGDygbQ0r3AUrZWSgkQN/FSL/6ZZIFDZQVlxeqp3YO5RI99JqKW29tVP4QT7k/VCnLWVSp+ sNB0xCQc/Dj0rDnic9xmG7vM0yokw6j9VliNDPLYsMoPhqmy80O0llTZm3V3Wk+iAx1xaewGDoRGj jO8b/UMNVaRu4tyjDTdCdBXDw1T+tgzS1bC2areFhCU+DCD4hn/4jhahvqD2npOghnnL31/XFlr9P Oryk+Zqc10soF/jt2NZ8/fYg51rWtk5p8pq5E1VHA6TE1Iv7YOo8V03kJiQDJsbbTuwtMfw+Si/OW sBmh5BRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5LJV-000000037W0-0Wag; Wed, 25 Mar 2026 10:18:13 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5LIr-000000037NR-0YjV; Wed, 25 Mar 2026 10:18:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id C4352443B7; Wed, 25 Mar 2026 10:17:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42BACC4CEF7; Wed, 25 Mar 2026 10:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774433851; bh=nA0qfgO+czMrdsJFZWiTSPRkj/MhdlMkek+0+cH4SK4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FsbzuEFDSLYe92S3XWu8yA78sOY17+zhlf5fynvhqSJTYFYJw6q0esNFUoK8ipb2a u7R0mqK8LQby4NecGDUI2pWioR+y7am2SLggsBspBeZ15yYpkkr0SBGpm886/RhHiN rad5UyakBWpkFvgRnnO3d8ty5mH43/XtNctbuFlXr+pC2FE4a3ufJUm13vdWVqj8co 4Skreuix3aAhO5na1RQSvBFefxTvYLO7FZ0K5/iflLUiCqXO4VIdN7LbTK0OrRu670 3FJ2hxkm9GwTrZwAenqnMthnSBKw3cgrQZw56I9+c3uoT2QVqVKcJOz1Sp0xitGyIg 3yAvaJsltHt+A== Message-ID: Date: Wed, 25 Mar 2026 11:17:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 13/21] hpet: replace deprecated mmap hook with mmap_prepare 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: <094c5fcfb2459a4f6d791b1fb852b01e252a44d4.1774045440.git.ljs@kernel.org> From: "Vlastimil Babka (SUSE)" In-Reply-To: <094c5fcfb2459a4f6d791b1fb852b01e252a44d4.1774045440.git.ljs@kernel.org> 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_031733_217201_CD9931D9 X-CRM114-Status: GOOD ( 18.36 ) 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: > The f_op->mmap interface is deprecated, so update driver to use its > successor, mmap_prepare. > > The driver previously used vm_iomap_memory(), so this change replaces it > with its mmap_prepare equivalent, mmap_action_simple_ioremap(). > > Reviewed-by: Suren Baghdasaryan > Signed-off-by: Lorenzo Stoakes (Oracle) Acked-by: Vlastimil Babka (SUSE) > --- > drivers/char/hpet.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c > index 60dd09a56f50..8f128cc40147 100644 > --- a/drivers/char/hpet.c > +++ b/drivers/char/hpet.c > @@ -354,8 +354,9 @@ static __init int hpet_mmap_enable(char *str) > } > __setup("hpet_mmap=", hpet_mmap_enable); > > -static int hpet_mmap(struct file *file, struct vm_area_struct *vma) > +static int hpet_mmap_prepare(struct vm_area_desc *desc) > { > + struct file *file = desc->file; > struct hpet_dev *devp; > unsigned long addr; > > @@ -368,11 +369,12 @@ static int hpet_mmap(struct file *file, struct vm_area_struct *vma) > if (addr & (PAGE_SIZE - 1)) > return -ENOSYS; > > - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); > - return vm_iomap_memory(vma, addr, PAGE_SIZE); > + desc->page_prot = pgprot_noncached(desc->page_prot); > + mmap_action_simple_ioremap(desc, addr, PAGE_SIZE); > + return 0; > } > #else > -static int hpet_mmap(struct file *file, struct vm_area_struct *vma) > +static int hpet_mmap_prepare(struct vm_area_desc *desc) > { > return -ENOSYS; > } > @@ -710,7 +712,7 @@ static const struct file_operations hpet_fops = { > .open = hpet_open, > .release = hpet_release, > .fasync = hpet_fasync, > - .mmap = hpet_mmap, > + .mmap_prepare = hpet_mmap_prepare, > }; > > static int hpet_is_known(struct hpet_data *hdp)