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 CBD19C433EF for ; Thu, 28 Apr 2022 10:47:19 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ps263uYeGohHyaZtXAgmuyr/8mmfGSgXk3/5PZB4Ff4=; b=3oM+0e5YmkNSpk wdIuXUOLPRHZP9zrDq+ifMmaTHd5XtWqEgoUNJ/2m3rr6yYbtc0sF4tsnTcpNaALcRsTQ57NtEcUM MC8zE/eLHDKr7d3zmdqDgSOCl7QSKeXKAKL47JF2JTezrQS/ZoPT8r8o2zNHm1M3HY4bdQfWBVhh5 PSL17DaMqrqR/55BTpjgTQZNuxABSf15yN6URht4E23QL46ym7VxtM6eoNGKd/xTmwx6C5v0HZgTH /P9Bd7cvg+vvdDk2VUOayvuGAZeNVN69rvytodmFptY8x0Kkh5ZoL4Ev+otHOwBIE+PtCONLnDsyF aOI/+ygeQ3S1mK5Lv7iA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk1fD-006Ecx-Ro; Thu, 28 Apr 2022 10:46:23 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk1fA-006EaN-As for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 10:46:21 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 08B4BB82C87; Thu, 28 Apr 2022 10:46:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78A27C385A9; Thu, 28 Apr 2022 10:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651142777; bh=7d3KnRH8ThdyiB4wx6AsCSrAqSAqq2CeEmVPr9bXaMc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QsxKHEbwPJ+ERWv4xFPxudVHN/ZFT89PFk3wAQfxVmmtOFWcHd0kZ4P6GnqQykjOz TtrjG6BWHD1wP64zTQa6tkwUS/eT7M96FHeUg0GQQdJcxGMSNYIkE4cMB6Qf3l3Hx+ zDLGVLUya9GDNZxjdA6mYLw+wRDIYK9+DAqlwINAnKSyffLCVDCT6TsuvKjk51mzP/ /EqlK+COM+eJYFnf2l7eB5xFHvme6k1HiYPmXnDHHLVKwNTuoRlEY6UInSh+3nUdLY 5PCCzW5A/UGiOm5yUR/oSlHoUTSUGcczWIbC8EhGCs+fUQkOK8gAXMJ/IsSvzR/bAH 98LNx7//CzjZA== Date: Thu, 28 Apr 2022 11:46:12 +0100 From: Will Deacon To: Kefeng Wang Cc: Catalin Marinas , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 0/4] arm64: Cleanup ioremap() and support ioremap_prot() Message-ID: <20220428104612.GA14515@willie-the-truck> References: <20220427121413.168468-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220427121413.168468-1-wangkefeng.wang@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_034620_551761_BA6C4FAB X-CRM114-Status: GOOD ( 14.29 ) 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 Wed, Apr 27, 2022 at 08:14:09PM +0800, Kefeng Wang wrote: > Let's arm64 use GENERIC_IOREMAP to cleanup code, and > support ioremap_prot()/HAVE_IOREMAP_PROT, which could > enable generic_access_phys(). > > Kefeng Wang (4): > mm: ioremap: Setup phys_addr of struct vm_struct > mm: ioremap: Add arch_ioremap/iounmap_check() > arm64: mm: Convert to GENERIC_IOREMAP > arm64: Add HAVE_IOREMAP_PROT support > > .../features/vm/ioremap_prot/arch-support.txt | 2 +- > arch/arm64/Kconfig | 2 + > arch/arm64/include/asm/io.h | 14 +-- > arch/arm64/include/asm/pgtable.h | 10 +++ > arch/arm64/kernel/acpi.c | 2 +- > arch/arm64/mm/hugetlbpage.c | 10 --- > arch/arm64/mm/ioremap.c | 86 +++---------------- > include/asm-generic/io.h | 3 + > mm/ioremap.c | 21 ++++- > 9 files changed, 56 insertions(+), 94 deletions(-) That's not a massively compelling diffstat for a cleanup, in all honesty. I looked at generic_access_phys() to try to figure out why we would want that on arm64, but it seems like it's related to mmap() of devices in userspace. Bearing in mind that CONFIG_STRICT_DEVMEM=y by default, please can you justify why this is something worth doing? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel