From patchwork Wed Apr 27 12:14:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 12828713 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 40034C433F5 for ; Wed, 27 Apr 2022 12:02:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E2946B0072; Wed, 27 Apr 2022 08:02:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 093836B0073; Wed, 27 Apr 2022 08:02:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E772C6B0078; Wed, 27 Apr 2022 08:02:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id C00B76B0072 for ; Wed, 27 Apr 2022 08:02:22 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 81BF9293C for ; Wed, 27 Apr 2022 12:02:22 +0000 (UTC) X-FDA: 79402521324.19.3280ED9 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf20.hostedemail.com (Postfix) with ESMTP id 3B2D21C0071 for ; Wed, 27 Apr 2022 12:02:18 +0000 (UTC) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KpHNr6hSFzGpNK; Wed, 27 Apr 2022 19:59:40 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 27 Apr 2022 20:02:17 +0800 Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 27 Apr 2022 20:02:17 +0800 From: Kefeng Wang To: Catalin Marinas , Will Deacon , Andrew Morton , , CC: , Kefeng Wang Subject: [PATCH 0/4] arm64: Cleanup ioremap() and support ioremap_prot() Date: Wed, 27 Apr 2022 20:14:09 +0800 Message-ID: <20220427121413.168468-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 3B2D21C0071 X-Stat-Signature: pksdprx8tgsdqsj6r7p5dg9q3kgffh7q X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=none; spf=pass (imf20.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-HE-Tag: 1651060938-490920 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: 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(-)