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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E45DEC77B7A for ; Thu, 18 May 2023 03:38:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32565900005; Wed, 17 May 2023 23:38:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D556900004; Wed, 17 May 2023 23:38:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 176BA900005; Wed, 17 May 2023 23:38:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 08A27900004 for ; Wed, 17 May 2023 23:38:42 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id CA1BFAE080 for ; Thu, 18 May 2023 03:38:41 +0000 (UTC) X-FDA: 80801968842.03.435E80A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf20.hostedemail.com (Postfix) with ESMTP id 0FF5B1C0011 for ; Thu, 18 May 2023 03:38:38 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=gIKKmJ9y; spf=pass (imf20.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684381120; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=RMQr1Z/SNdz396grr248udQlctmR65Q9JOFTWlK+K04=; b=RsP3u2YyWSVBj4i4yuP0xJmXweh4KFPtlCuVvSinpxL6JWy9ln1RFPrkjNo6mWeKsHBtPa MIiHYy4GnXvEaAI2nsJ9t8K9z4vKdcy7NZiB89+6A8YVyy2avq5x+IxmrR2FJ7eB2F7qE8 wp1GlgZGzTdiFwxfv/iDygGvHTLo1hw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684381120; a=rsa-sha256; cv=none; b=t6p1N6oihfGgyQg/qsQJNfE5B7dlcIsC0RKxsyqCT3Y5GYfbCFH0yXB9JCveE+FsI6Vl+b +N5JJcP16Vg4A0oRTdzp00xFwfiTLWWe7xQqRKwvYBS0MquN8r0yeTJm1eWFrlNqh4qUYx 0Ukc95CUaltqzV+7EonpjSa13cy68qQ= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=gIKKmJ9y; spf=pass (imf20.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684381118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RMQr1Z/SNdz396grr248udQlctmR65Q9JOFTWlK+K04=; b=gIKKmJ9yEwiZryIgqn0DVBO6sRag5PoQYaxPg3ClKreAblRcJr/a22PrNqhKCvGMqkQMHV 7i4Y8tjlOE+hfhIZNjSgwf1sqJxeAcv4n4cKylUAfhWl4tQB7wp8ZcXwBm//+BBTD9FHKj NoDe9uLjV9p0N3tdxQlANltRRiINyjw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-187-WDmYr80jMCKJl0ULvIoExg-1; Wed, 17 May 2023 23:38:34 -0400 X-MC-Unique: WDmYr80jMCKJl0ULvIoExg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D0623C01E0B; Thu, 18 May 2023 03:38:34 +0000 (UTC) Received: from localhost (ovpn-12-79.pek2.redhat.com [10.72.12.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30F6040C6EC4; Thu, 18 May 2023 03:38:31 +0000 (UTC) Date: Thu, 18 May 2023 11:38:28 +0800 From: Baoquan He To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, christophe.leroy@csgroup.eu, 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: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Stat-Signature: 4oeqjkx576b9nezm66oxa4efor1nacx6 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 0FF5B1C0011 X-HE-Tag: 1684381118-400468 X-HE-Meta: U2FsdGVkX1/+pg9NpPNS43Q/rHPIXjtkIpV+95jBp8m7ijiliiDj0vlh6tkBZjhr+8ds67WRDeXNIu07TA7oBPVoM1PyngGkB5CVdRZWyBs5y3m28V7Hvg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HifhUeqagolD/Hik8B6XBQPskBw/naieK+J//eC/voj11lX30adYgG7S6mMK2GmQzJ0px0Q+8CtL5q0IKty1Yz3GMXBKH3PLi7+sPWElkdEc1LDSJ4yGSxI= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 05/16/23 at 11:29pm, Christoph Hellwig wrote: > 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. Thanks a lot for careful reviewing on this series. I check this place again, strange it looks good in code with identing after the opening brace, while in patch it looks messy. Will try again to see if I can fix it in patch too.