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 E2748C77B7D for ; Wed, 17 May 2023 06:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232226AbjEQGaV (ORCPT ); Wed, 17 May 2023 02:30:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231383AbjEQGaU (ORCPT ); Wed, 17 May 2023 02:30:20 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21081468B; Tue, 16 May 2023 23:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=S5cEDxvLIXfF6hhPeiKwzMcCpc9yxz2+Gj2aOaYhurM=; b=OiHf3Ei73KQczceza5cq/WYQh4 Am9CD9gpEjCRUmvhkl1xG7u/iGOdJgbpHXPze13IrKHa4wII2y8jx2oNcaxfMR+gOhl5TSVIsRxWY QPpfQcN4qJhRUGL6zhTq8alf9bXPD4Q0sNLMxcA2+bxy6G6XPkpoocLd6PPCS4l46pedkhWpY/9iK 9zW0zLv8r54JAUSAiUQGMT4M7hxtxqvZoGhv0g06mrcX7ncLrInemXxjh+syjmADMs92jahScH8bh x0J0GAbH/lDS3LJj8H6NUA2pDGyH0gSt/x7AcpFBulfQWhVOl6Zc6dacJgFBZzUbJ8KDCzxZggiQd OsT0u5NQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pzAfY-008T7E-2H; Wed, 17 May 2023 06:29:52 +0000 Date: Tue, 16 May 2023 23:29:52 -0700 From: Christoph Hellwig To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, christophe.leroy@csgroup.eu, hch@infradead.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, schnelle@linux.ibm.com, David.Laight@aculab.com, shorne@gmail.com, willy@infradead.org, deller@gmx.de Subject: Re: [PATCH v5 RESEND 04/17] mm/ioremap: Define generic_ioremap_prot() and generic_iounmap() Message-ID: References: <20230515090848.833045-1-bhe@redhat.com> <20230515090848.833045-5-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230515090848.833045-5-bhe@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Mon, May 15, 2023 at 05:08:35PM +0800, Baoquan He wrote: > From: Christophe Leroy > > Define a generic version of ioremap_prot() and iounmap() that > architectures can call after they have performed the necessary > alteration to parameters and/or necessary verifications. > > Signed-off-by: Christophe Leroy > Signed-off-by: Baoquan He > --- > include/asm-generic/io.h | 4 ++++ > mm/ioremap.c | 22 ++++++++++++++++------ > 2 files changed, 20 insertions(+), 6 deletions(-) > > diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h > index 587e7e9b9a37..a7ca2099ba19 100644 > --- a/include/asm-generic/io.h > +++ b/include/asm-generic/io.h > @@ -1073,9 +1073,13 @@ static inline bool iounmap_allowed(void *addr) > } > #endif > > +void __iomem *generic_ioremap_prot(phys_addr_t phys_addr, size_t size, > + pgprot_t prot); > + Formatting looks a bit weird here. The normal styles are either to indent with two tabs (my preference) or after the opening brace. Otherwise looks good: Reviewed-by: Christoph Hellwig