Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1733309rwd; Wed, 17 May 2023 00:03:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uw+g2vucQVO7MU0ImyqLTaDmgeJpK9N1htcvwnYjtVqLQoWgD0lSpZOP7VgSopHKGS3Xl X-Received: by 2002:a05:6a00:1813:b0:64b:50:240d with SMTP id y19-20020a056a00181300b0064b0050240dmr18523131pfa.5.1684307013301; Wed, 17 May 2023 00:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684307013; cv=none; d=google.com; s=arc-20160816; b=WHe6abUyxKpEwgmtemaZix7pg6rupmrThQ7R7OS77Jg2Kp+ch85wa9tJsXMvC+7E7e sBRv4buaIe2z/K0Gcu4Mrn7z5cLNscUmM2Ug4ToZSugZvAaqx8w9h/+BYKuVeE4p8U2u EDoYBenVrthEg36YE3Ygk9yjSix8Wk/TmYyMnOGdO6UOEDt0EJARwp6PCHTapdVsOsFu ihssIGcHngP3Hs+qIappBCBejdI6qHMdRkb553v3n//EZQOmbkthms4UZsWNoy24dsFo 0bVcyLBMGxB3u/Q0qogWz1LcCgjBQyr1ZRj50fsgqAgg/7vBZJvLX6djCZ8ZN2m10ANs FNKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S5cEDxvLIXfF6hhPeiKwzMcCpc9yxz2+Gj2aOaYhurM=; b=sU8HtaJVLZjUWdoQHL8un+ZUc/h0UkLlpGl/mhc/8wlGvm4zCd5BoLpt/3MbBl89XD vtcWOZht6zpu3tTuYEt/viakeiLrVMBd45WQzmw6PxUIAVM1oBVs+ThbRD4ncXq0pHmZ KafENI9IwuEi/iZ7KtAThm+A1RwXG/H+aj/RhST6ZUpz6J6QiMlV4rFwkF1hYVzTOd7s QelZrZTe2rk8IrXdyIt346JH6QPHpqHgstJDjL0yhgARsndb5GUehrcfwkUeXhTARL8j 9hDS9/opdphVLK9fsn1CF/eevHiwe0BeZE/+bnRcAwSscE4M8wUsNtYI+r+ZBgo4kwCx ZtPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OiHf3Ei7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b24-20020aa79518000000b006434a04f2fcsi21328461pfp.297.2023.05.17.00.03.21; Wed, 17 May 2023 00:03:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OiHf3Ei7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232025AbjEQGaV (ORCPT + 99 others); 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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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