Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2307209rwe; Sun, 28 Aug 2022 08:13:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR4VhzK/S5BulNwaZgGLPmQILxSkkWAg99lqEX7izUNXPicg8e0mk66uxUR6qwYOCwEW6NOb X-Received: by 2002:a17:903:24f:b0:172:7d68:cf1 with SMTP id j15-20020a170903024f00b001727d680cf1mr12394735plh.55.1661699624881; Sun, 28 Aug 2022 08:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661699624; cv=none; d=google.com; s=arc-20160816; b=MmBaDiToCFAeY1sT2Ek2nOnDns0aZ2mv88m2WwBNfLZPU66PkpqTDo8KU/IUl/AOhw IiMNavupYRtTTvxRXABEqI4GbcPDA8hLafzuL6hUb3Xu8DkKpxJHt9N+WsNmr+NYLTNE d9/tsFQW5KSImBQiTTCcueVVgJo1GPMvDbVDgUyDtDpox1PAxuEfoc0dCmja8hJvDRC4 cXOwfTDTBzM72sRcR24oHwfQUTnaeD4oe4aJEGNMkZY/YLbISAEiO1ko8DSBIVQvLXXK 9s1AcIEsmouFfKNKUtZDoMynXCQ6h9FpIeB4EPCCYFWtDgyzmPsKZjOni3tVEfLAt+b/ J4NQ== 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=e8neMr6g7eV8otY6VIAU2DNTfHwU5LClkKQL29JabBA=; b=l4WQ28EGXHP0qRAFo7Bs4QInZwetTM2mLJxz8XnEWMeBIRR57/OHB1GKcmYvFHgizG e3vC3okxfrM8JJKRS0WR3ZivrNV6biTKsa+3zTgSIpgTQW8IqY+cHTY8bemWNGTxX55w vVodx82LK2S1Q8lD1wQN9R4tLlVbgu5iDKbDn8sYsMU9IONWQltTKZGL8QLco1mmpa+U d9KNhIIKfDOGndPSsaMSco5J3J4rrkggg0r3LpQOf6dAl5oKfNw9HvY7kWWv4q1lVMZh kwgBHgpG2k2QvXkMr95yUU5IpQD5YOI4RRUcN5+pMUthEnVMaU9QQbyxOlE2n6t9K8ar JeGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EgP09V2k; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iy12-20020a170903130c00b00174c901aa9fsi416727plb.597.2022.08.28.08.13.33; Sun, 28 Aug 2022 08:13:44 -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=@redhat.com header.s=mimecast20190719 header.b=EgP09V2k; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbiH1PI3 (ORCPT + 99 others); Sun, 28 Aug 2022 11:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbiH1PI1 (ORCPT ); Sun, 28 Aug 2022 11:08:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A52B32B88 for ; Sun, 28 Aug 2022 08:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661699305; 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=EgP09V2kGHWufGBeeExTy+cQOZV1m53bJR+lLCUT0O0pLUsSn8M+rhaAFLrgpouthTrGCO NN0bbkKsrTl/Y+Gyw1htctkJpk8ZAOyFUOloAbi9IO0EVqZ40dGVx3RdB1QFWxnuyFpdRc sYvV218I/NjR5meJz232XwveImjwkNo= 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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)