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 6B51FC433EF for ; Thu, 28 Apr 2022 06:47:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C931C6B0071; Thu, 28 Apr 2022 02:47:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C423B6B0072; Thu, 28 Apr 2022 02:47:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE2AF6B0073; Thu, 28 Apr 2022 02:47:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 9C9A46B0071 for ; Thu, 28 Apr 2022 02:47:39 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 75397293A9 for ; Thu, 28 Apr 2022 06:47:39 +0000 (UTC) X-FDA: 79405357038.07.5184961 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by imf02.hostedemail.com (Postfix) with ESMTP id 50EAC80060 for ; Thu, 28 Apr 2022 06:47:35 +0000 (UTC) Received: from mail-yw1-f177.google.com ([209.85.128.177]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MGiAs-1ney0Q3k6U-00Dpsx for ; Thu, 28 Apr 2022 08:47:37 +0200 Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-2f7d19cac0bso42166407b3.13 for ; Wed, 27 Apr 2022 23:47:36 -0700 (PDT) X-Gm-Message-State: AOAM530sPzdBPANiYuVxvCtDhhBsamnItwd8xEZeHVztedSGspdp4qul bk2XCMdnqVOYT4WluFMAJFkKxBMLDDzZB56/F5E= X-Google-Smtp-Source: ABdhPJxhNX6zLSNm8P/7MqjasgKqTDILF3r8peSc716/bmognn9jO+1JGw/yPAyuk3IvpRavz9bK4HFywgkZXKmSCB0= X-Received: by 2002:a0d:d101:0:b0:2eb:4bd7:bcc1 with SMTP id t1-20020a0dd101000000b002eb4bd7bcc1mr31657396ywd.495.1651128455387; Wed, 27 Apr 2022 23:47:35 -0700 (PDT) MIME-Version: 1.0 References: <20220427121413.168468-1-wangkefeng.wang@huawei.com> <20220427121413.168468-3-wangkefeng.wang@huawei.com> In-Reply-To: From: Arnd Bergmann Date: Thu, 28 Apr 2022 08:47:19 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/4] mm: ioremap: Add arch_ioremap/iounmap_check() To: Kefeng Wang Cc: Arnd Bergmann , Catalin Marinas , Will Deacon , Andrew Morton , Linux ARM , Linux Kernel Mailing List , Linux-MM Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:j5wrZKN1SCSwE3xQgkNeZyAJQf7ml69rFhYchVM+vHV/7IVQ2oR k/lo/bLcDSIiORqKXLqKziqnQi/6BW7H/PIpMaHilE3MCx1004MI8IcT+qyoGWP2fdrGc1Y kuUFLjbFZTsXwwo6B2yMccIDV7PYXF/MsRyO0g0SGFELMvDMrA7ald83c8Z316DMqBwNVtz uLcTQzaXApbQt+jRBVbrQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:1kKp9YU5K9c=:ViXdNcTAOGiU//yNh77zA0 hlngFDBGViaDY/LsHbnDFb/4D4PGCstaIwSXRsUWRDGxMcsUNAT/NZoAd+W8T6ZzgLSFs5EEh FctcTwsrjKdQ00X3tgfi1zC/OpPojA8u4mqRfvofPeJUzaju//emYxkZnPKzRx+9ZInozbc5A mCUJZZutXy2OibcDtxHjROsPMMmeCiJmvfMWFQgbMJEyuZGKZT77Y1Kcduyxl36dO7H/Ogeg5 XBsihyPqsDBmQPwuwm52j0zfqE1SAtCv43xr0nDorOBKe9fPzdhOqVQkeEqAFDo8iKIzZpMDV UuUCXNkCSkqFR5ypX5dxkVuaJFKzhNRbAC5Cj7SvRUaTqhNR/7fAtyloyvWY75f/vLDB5ISVf mrNecWr0t8/CGYjqTeCrjBodJPpH5ixMt5SiKw5zbDQBOg/brFuo7yKGFpQHJ0GlSi2FkJWwr 5vjS0Kt+a45QCL9zgXgaeRvks3DbL87A2Y+3OWNnAh/id9ekktrRYltNasBAVwNj8YrrxcRyV aYcXNG2TmJKA/5L89ey4qrV7VWvxNTVFRRfyWHSzw81tQE/0zKTncKpuFJzy/JP51PB2EDKEJ D/glWsNmPPY5xBtHjznqlrzbz9NOjXPW5hHDXhuEpFr/48DBd95yNQlNg19s1cA8VypTKwwGh 2n0qC4bYWVkhZ+ZkbHBDkT0w91pEJ2WAEbCMsFvxUHdSVdu678F7Z8DhkgJQYLovVjG+Y8tYt qQJFrqNwv7yP43bhxUVxifwjrrbRUMUEWoxqcKcHtBm466nowz8PE4hSQUWZ/lw3cDGYR4hln SC//DYu9p5+/haobCLbqXIEOdmtNX6BGuvyVQsRMOcTpzJGJ5Y= Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=none; spf=none (imf02.hostedemail.com: domain of arnd@arndb.de has no SPF policy when checking 212.227.126.130) smtp.mailfrom=arnd@arndb.de X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 50EAC80060 X-Rspam-User: X-Stat-Signature: 9ym9ps4hjmgi3whk4xra1d7w4tg85df7 X-HE-Tag: 1651128455-992982 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 Thu, Apr 28, 2022 at 8:20 AM Kefeng Wang wrote: > On 2022/4/28 2:20, Arnd Bergmann wrote: > > On Wed, Apr 27, 2022 at 2:14 PM Kefeng Wang wrote: > > > > bool arch_ioremap_check(phys_addr_t addr, size_t size, unsigned long prot); > > #define arch_ioremap_check arch_ioremap_check > Ok, I could use this way, and keep consistent with others definitions in > asm/io.h > > (or alternatively an extern declaration, if the implementation is nontrivial) > > > > It may be worth pointing out that either way requires including > > asm-generic/io.h, > > which most architectures don't. This is probably fine, as only csky, riscv and > > now arm64 use CONFIG_GENERIC_IOREMAP, and we can probably require > > that any further architectures using this symbol also have to use > > asm-generic/io.h. > > It looks the arch is already include it, > > $ git grep "asm-generic/io.h" arch/ > > arch/arc/include/asm/io.h:#include > arch/arm/include/asm/io.h:#include > arch/arm64/include/asm/io.h:#include > arch/csky/include/asm/io.h:#include > arch/h8300/include/asm/io.h:#include > arch/ia64/include/asm/io.h:#include > arch/m68k/include/asm/io.h:#include > arch/m68k/include/asm/io_no.h: * that behavior here first before we > include asm-generic/io.h. > arch/microblaze/include/asm/io.h:#include > arch/nios2/include/asm/io.h:#include > arch/openrisc/include/asm/io.h:#include > arch/powerpc/include/asm/io.h:#include > arch/riscv/include/asm/io.h:#include > arch/s390/include/asm/io.h:#include > arch/sparc/include/asm/io_32.h:#include > arch/um/include/asm/io.h:#include > arch/x86/include/asm/io.h:#include > arch/xtensa/include/asm/io.h:#include Right, it's mostly the older architectures that never started using asm-generic/io.h: $ git grep -L asm-generic/io.h arch/*/include/asm/io.h arch/alpha/include/asm/io.h arch/hexagon/include/asm/io.h arch/mips/include/asm/io.h arch/parisc/include/asm/io.h arch/sh/include/asm/io.h arch/sparc/include/asm/io.h # it is used on sparc32 That's actually less than I expected, and most of these are not seeing a lot of upstream work any more. Arnd