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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FA02C433EF for ; Thu, 28 Apr 2022 06:47:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244387AbiD1Guy (ORCPT ); Thu, 28 Apr 2022 02:50:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244368AbiD1Guw (ORCPT ); Thu, 28 Apr 2022 02:50:52 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776DB9859D for ; Wed, 27 Apr 2022 23:47:38 -0700 (PDT) Received: from mail-yw1-f173.google.com ([209.85.128.173]) by mrelayeu.kundenserver.de (mreue012 [213.165.67.97]) with ESMTPSA (Nemesis) id 1Mrwnt-1oGEIf2PxN-00o2RR for ; Thu, 28 Apr 2022 08:47:36 +0200 Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-2f7b815ac06so42606057b3.3 for ; Wed, 27 Apr 2022 23:47:36 -0700 (PDT) X-Gm-Message-State: AOAM532MpVdDRrqeramj4EPdrarTLgFMEtuskQ6KX97KZrSZtShYiEST U2x0F8JGGiBgFsOrHOQDu6HyQAfbJBQT/BssuoM= 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:LNrC2yPUqQrAB+EoaRjeNmQlfiBEuCwx9c+9SF54La7r0XQHUBk XRpLAvqK9ndUgCe/a1+CEI8wdwJXmnQFcLTtEQCzjoJ1z2gbdm9ASh9nKp0ZE67vq/c68cc fzEKSfg1gwjpKaNWHCfDSlMnzrrSOA1kXDV0/iA9gCuafrOXfq2AQzyRecsJ+u8Pkvks/ut ZULqsWBWI2KyztHomqjuQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:8lZby8Iqvb4=:8TyY/9b1btLkorD0wx2E69 koL25gZGPwe3Cyfw4rYNP41GcmuKI1lLMAVwOtfT75P/2EZrZ+IoYCmBeCjAv97Ef/Stln3sv 9LgoiplNiC2zIklVddSKo+x42xLxzbab+Ae3/umd6/trvplqVAiAtW5MIWItl0uFFWjpHR0Y8 OuXoxR0zInZJfxcNt4eW9Bx1UKjrq2eO+ck7J0NPVOLPIVzetljxqNhs5gfHEqhjCicw+Vq7h irbrC2NRvctqKyxOHgVjIrk8XVGlXoUCqH8B76nRdBsWVuVq6FDpFDpZlZHaLr15z2Ej5RYdB /e9XmB/LAg45tt6Xjfo2dr5G9Z34XSCLDsMWAirIE1r5N3mFLNnEmNstQFCN9E4drYO3xx/kc TOzrGElsWZbkxzlEMtbG5K7J2pibKqGaCQiRiT9FyT/kHsazcaIOG9iPVqlTIJK6pRtTF9uH1 c+5qx57zkgMCAbk87nf2sb5sSgk3/cfutCxP4hgE2XwI77T0x/Nh8cPAhAKRd5CGTaVIJ3t8g ArOid8T+Tkfm4bA9ERrXJvYcWSzC7ZnmQhn2yYNo3I1EDD+XpCUcBwf6QHgsp3D4ykrzB5ETE tiosHD+d4+tLQ2dMauUft0/76lL/lICnbLucYvWgh5CfBn8+5F9k+aTBppm1pVQwxKlyMbb4F mI9R8kCNdJ9HQFfuW76y4euG0NKQKkHBVVb7of4nivUQJzEeE5ze07wO1vCgqkl2Tx3F4l8N0 bry6jiOuDc6KSEByDOP9jwWYU4/sWtfgxAzaYS96b/SeLj+M9xPuz6zmAozpRBOYnGimpL9KF bC4qoJyoC39aJ3o86UPCD93bg0QdbLRS5524C93RQ2aEmjVpL0= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9179CC433EF for ; Thu, 28 Apr 2022 06:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fnP0P9CJL3N5y8gQWEoVMPyrMu0ZW6XYHNkNfD8jRw4=; b=wm9O0TNOw/Scxn gU7UC2vY3IJce3YWX78nMpXJwjzJayMlG/isbf4AB6kRTlOL9Hu1Ielq2xLk+5cbPvjaSEJnQGcl2 dY0lyF/QSC5NCfNapsiz43MT9AZo72Hec9tx2/P5zEWd7zavDDb86PDfBpL7MjUn1eUP92A0dsj6n 8bXBkNiQDn/Y55sKo3ChGRZ3MluWEnnfYH9XEvNbwRwnvsRulpJi5Ooy5KyqeQMiy2xMgNzBinEjA pkzqAEOUPCN7RbIqUf5/v+Yfcu3d64PJkBeUH2Dr01ygTo8IOSNjpWJoffSFCipURJHl0s+EK7GXh 4pS5Nsbz7KhehWJs+exA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njxwG-004y0J-M5; Thu, 28 Apr 2022 06:47:44 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njxwD-004xyn-9F for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 06:47:42 +0000 Received: from mail-yw1-f174.google.com ([209.85.128.174]) by mrelayeu.kundenserver.de (mreue108 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MPosX-1nWXxT3Sb5-00Mv2n for ; Thu, 28 Apr 2022 08:47:37 +0200 Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-2ef5380669cso42358277b3.9 for ; Wed, 27 Apr 2022 23:47:36 -0700 (PDT) X-Gm-Message-State: AOAM530x00YZOZo+hBPUOTYCxk4PUvMYiI1RyDSFYvepb3budWjsJPFv Rk+9sFyoCKaTINcLNKp2n2HjZiESA89abskgq6o= 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 X-Provags-ID: V03:K1:uP5tHq/NqMUXtXEtz6acvfHTGBUB2Q7sF3IsdheNWg1DHkQvq83 qH3jiMrO68nC4Yra52120XxlQ5cNVR+iEh+FJumK1J2x/DLFVwKyXdnjKQoyKDtVlcJtzlK 7Xp7+7Fd6sf6OOoHihBUu1iH/XL2ah0TdkPNNdSu+lC7RZ/h4TPCQPBalGJTruUV2zuddlb G3h1AAhWRnNInqKzTZyFQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:c2XthkueNjE=:aQYi1a/ynhrHSrBD+OyCMr ujwqeIygMdG95Cmpsc2JEB8QFi5xyfxYLJCudWcF/NZywM1/1EvVBjHJNVMcfp04xa3UG/TOl O4YjXuFdVfcDNh/AOjSTW70XY97RvoKAkW2Tqx7ztesKDzC2bbhMeIzpsZVfjlFI7GLx1fxL/ 6SUriEsDqoFCZeloul8X2qQVAgu9DCoVc4TeNQYJJcTqAxa/PMideNJbdfu+kIiistojJRuLk o6SndMgSALL4e3YhctCAmgYgHy0tePp/u4o+wSzKlu+Z1+Z43+tRuRqx/Rmp5kra7t7RWlfsZ Bc1PHpYpuP5euvsd/3r9AWe0QfGwNazMPi4vWfhsH0OTTINWXXjjfUUt0lxvIvz6WNr6IcJFs 7DvLrCvTKX2MMCnQhjOhdOQqjZs8+ar2vrbZRBjSsq9TwDGyyGGzsXUQEoQhzRzU/I5KXggrQ WkKaTz50vh8A/zTgk/6ErzetBNS2LG/GvyHmXFP5w3LPHDcR+oxAPvgli+24v89fuU5pzy3LR geDoaAr7l9lciq5IbCHC4F4xHVs/ozfemXLYiz3JjWa+mFDgJ/IvsEzIlvRJ7M07zGxAGhVsF Uh3fiIUjlQ5KWwSVFTDSMBTClY//KUa/7gayn+jcwDhhGJrne9WbCdnopmnsCx+pN9uom5A3S TOYQOu0qk2GFlpp3vKJsO3jn3WuVcb88noSpBZnJVqvMvXOU7nSzl6t0N+6+GeZP7SDw= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220427_234741_651294_118A9281 X-CRM114-Status: GOOD ( 18.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel