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 63F61ECAAD2 for ; Sun, 28 Aug 2022 15:08:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9612A6B0073; Sun, 28 Aug 2022 11:08:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8EA316B0074; Sun, 28 Aug 2022 11:08:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78A6A940007; Sun, 28 Aug 2022 11:08:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6525F6B0073 for ; Sun, 28 Aug 2022 11:08:27 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 39849C034C for ; Sun, 28 Aug 2022 15:08:27 +0000 (UTC) X-FDA: 79849332654.20.823B6D2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf29.hostedemail.com (Postfix) with ESMTP id C0088120056 for ; Sun, 28 Aug 2022 15:08:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661699306; 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=e8neMr6g7eV8otY6VIAU2DNTfHwU5LClkKQL29JabBA=; b=Pj8/A+kuWJ5WywvR29GGI4VHXrq47vMMxKvJEZIB8Lp2CQ5ggMb0MivmFWBHi3wvrf0BSI 2aPd308dKEx5NRzVfgi6OQpNQlfqlVhYITZDZHNHBkdjnnaDPOkXQm5feyPIzTRQ9V5p9p BJh9+Wf3EH/6tnaNdJ0p6D8ZkVgBBXw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-564-tS76eEUuM7ibrrU6cUhUgw-1; Sun, 28 Aug 2022 11:08:22 -0400 X-MC-Unique: tS76eEUuM7ibrrU6cUhUgw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 78D65101A54E; Sun, 28 Aug 2022 15:08:21 +0000 (UTC) Received: from localhost (ovpn-12-25.pek2.redhat.com [10.72.12.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B41D2166B26; Sun, 28 Aug 2022 15:08:20 +0000 (UTC) Date: Sun, 28 Aug 2022 23:08:16 +0800 From: Baoquan He To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org, Brian Cain , linux-hexagon@vger.kernel.org Subject: Re: [PATCH v2 05/11] hexagon: mm: Convert to GENERIC_IOREMAP Message-ID: References: <20220820003125.353570-1-bhe@redhat.com> <20220820003125.353570-6-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661699307; a=rsa-sha256; cv=none; b=uZDfgLS8dwFWOxi3cZmsMPZNdpx6mm4RGyAgMSLG783NefxbdvtrhwyfSA09kOQUV6NVe7 rJDonz202X3HPxEa4gzNG4jiM0BYsYuBvIuJZvfZe60Ac/15yfSiUFoIQp996lCTTEeSHb EXLhGWPx8mMaQyGMCYjSahrvShXN14Y= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="Pj8/A+ku"; spf=pass (imf29.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.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=1661699307; 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=e8neMr6g7eV8otY6VIAU2DNTfHwU5LClkKQL29JabBA=; b=vOYTDnJ3aLTvXrR2zByzzIiI600iQrMH1NYI8zu9B3B/YXIaDS+fgUeJPcDS4pvh08bjyN w3fY5GkqpnMbZROcQvfqdaqL9iS2re+9kpp2zPnR4kPvlVbOzDJkCSc+hWCWc8IwG83gFy tsyeJ/bu7ylsVLhNinLL48oHJCFhPkQ= X-Rspam-User: Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="Pj8/A+ku"; spf=pass (imf29.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam08 X-Stat-Signature: 9hz3dw9qq3ohwzp1jerciiustnbar5yt X-Rspamd-Queue-Id: C0088120056 X-HE-Tag: 1661699306-761475 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 08/21/22 at 12:00am, Christoph Hellwig wrote: > On Sat, Aug 20, 2022 at 08:31:19AM +0800, Baoquan He wrote: > > With it, the old ioremap() and iounmap() can be perfectly removed > > since they are duplicated with the standard functions. > > Can you write a somewhat better commit message explaining that it > switches to the generic code that has equivalent functionality? OK, I will rephrase like below. Please check if it's OK. == By taking GENERIC_IOREMAP method, the generic ioremap_prot() and iounmap() are visible and available to arch. Arch only needs to provide implementation of arch_ioremap() or arch_iounmap() if there's arch specific handling needed in its ioremap() or iounmap(). This change will simplify implementation by removing duplicated codes with generic ioremap() and iounma(), and has the equivalent functioality as before. > > > +#define ioremap_uc(addr, size) ioremap((addr), (size)) > > This is wrong and hexagon should use the asm-generic version of > ioremap_uc that returns NULL. I don't follow. Do you mean the function verion, but not a macro? Or define it like below? #define ioremap_uc(addr, size) \ ioremap_prot((addr), (size), _PAGE_IOREMAP)