Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1876567iob; Fri, 29 Apr 2022 15:12:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMJPbB8gUD3ndF4503K5xqtsKNDXjH9hijGggy4KLKv38CVnukIX10oAdl+n33qGCZjonj X-Received: by 2002:a05:651c:1781:b0:247:daa7:4358 with SMTP id bn1-20020a05651c178100b00247daa74358mr793497ljb.477.1651270347266; Fri, 29 Apr 2022 15:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651270347; cv=none; d=google.com; s=arc-20160816; b=MgqZ7FwGVGWIoj4Sc/FChn7GaxwFm1+HALNwv8WKQ82n541uQ0fNLUxbEcJri4rcuW Nd1L7DToIlKnWX4Nn51fgObyliB3/30nsf1Wj0+ORUm51t7/KYHR+VHn1zxbsghqQ51P j0YjRIM1GnNHFVJgnps9WgsPfBwNK3P7k3UUlM+LXTKNevchY2tzxOz64gd2a7XXhyKK /GTywkrd23lemXbGe3cQTuOfJExMJj0KBDULjXSJ/nc0klAcD8NIjp6k1kJmuEJ7DhZ+ Om86pccbXHtkPfsUn/pw3omzFQtvn8A66R5oV9269J0zYCqtVj+ETFoTP/d1fH5D0442 O2OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=E6fzd8cjFGYMMT8xFNDE1ptK4bR6AYu1J/yfEc9iQG4=; b=YZu8PRUb2n4Jw+NLfgDxV6sHfDPHoq5eYrIdZHTN/7bHDjS4iCradxkqdxxmVHKprs D6bEc2/ETIZ/DNQHW4jyfrz4EMoKsP/88c/2VxKNvZk3QbmFq7t4QQyiHweORBbrEHS4 JRKOvAKH/cS91tt2+AlRLgIcSBGSOLSOv8ntZLrnvcsRMWYoEDIPl4yMhJlXwBXsQ1CN 6q/YDr0/cA2pl+eZzyfcQCmOL+Lt+V6+aTdEWmw5Ywd4gmsf5VdqiLwMX+OAPhlZUabH 5/1hA3wbG27+ptrRq/YKZLTL7t8X3R/L7SDVv8seWBP+gdjN74Q9MdwPjC4GywkEeaoD wc+g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a05651231cf00b0046bb2cc0045si422553lfe.503.2022.04.29.15.11.58; Fri, 29 Apr 2022 15:12:27 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357372AbiD2KYv (ORCPT + 99 others); Fri, 29 Apr 2022 06:24:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244876AbiD2KYu (ORCPT ); Fri, 29 Apr 2022 06:24:50 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D2AD60A91 for ; Fri, 29 Apr 2022 03:21:32 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KqT6M1sDszhYp8; Fri, 29 Apr 2022 18:21:15 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Apr 2022 18:21:30 +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; Fri, 29 Apr 2022 18:21:30 +0800 From: Kefeng Wang To: , , , , CC: , , , Kefeng Wang Subject: [PATCH v2 0/5] arm64: Cleanup ioremap() and support ioremap_prot() Date: Fri, 29 Apr 2022 18:32:20 +0800 Message-ID: <20220429103225.75121-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 1. Enhance generic ioremap to make it more useful. 2. Let's arm64 use GENERIC_IOREMAP to cleanup code. 3. Support HAVE_IOREMAP_PROT on arm64, which enable generic_access_phys(), it is useful when debug(eg, gdb) via access_process_vm device memory infrastructure. v2: - s/addr/phys_addr in ioremap_prot, suggested by Andrew Morton - rename arch_ioremap/iounmap_check to arch_ioremap/iounmad and change return value, per Christoph Hellwig and Andrew Morton - and use 'ifndef arch_ioremap' instead of weak function, per Arnd Bergmann - collect ack/review Kefeng Wang (5): mm: ioremap: Use more sensibly name in ioremap_prot() mm: ioremap: Setup phys_addr of struct vm_struct mm: ioremap: Add arch_ioremap/iounmap() 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 | 20 +++-- arch/arm64/include/asm/pgtable.h | 10 +++ arch/arm64/kernel/acpi.c | 2 +- arch/arm64/mm/hugetlbpage.c | 10 --- arch/arm64/mm/ioremap.c | 85 +++---------------- include/asm-generic/io.h | 16 +++- mm/ioremap.c | 27 ++++-- 9 files changed, 74 insertions(+), 100 deletions(-) -- 2.35.3