From patchwork Sat Dec 17 01:54:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 13075751 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 C7BADC4332F for ; Sat, 17 Dec 2022 01:55:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 65BDC8E0009; Fri, 16 Dec 2022 20:55:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 60C168E0001; Fri, 16 Dec 2022 20:55:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D4078E0009; Fri, 16 Dec 2022 20:55:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3FF9A8E0001 for ; Fri, 16 Dec 2022 20:55:27 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1F57A1C6293 for ; Sat, 17 Dec 2022 01:55:27 +0000 (UTC) X-FDA: 80250131094.12.1C37EB5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 1FEB820002 for ; Sat, 17 Dec 2022 01:55:24 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=HXZmlWnq; spf=pass (imf03.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671242125; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Xv8gbdl7CL7K4MDV2oGJuvA/KR+O1Rw3H7q7uOHvZNc=; b=Qezm7vJKDetyKek8jmH3MvJ5lGMj+kfuHCxeEPoWimrvLHkBBRmUNoFJZiwJzotHtTA0pk JoLIM1IiYZF00hLHz1Vp5UPJBJExfJSsXtGK9AOm99nTG/MUN7PBCY37ebkCSr/6nnr2b8 4iEi9qRuhScQJiDs5NPLtysO55uV1ps= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=HXZmlWnq; spf=pass (imf03.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671242125; a=rsa-sha256; cv=none; b=CfnyYWyLAHdkdffz2Aob0yljCx+VEnUPdZxR0iEbvmBeV7U8jmiXFsHqoKgsQmGpgFYYe8 zbNM5AaMcD0dB9OCJ5b9l3dIBC2Fu5tZRqfCXkFvhR2/OMkNh2YY7Hx/bQNBGznbt64I1r kwzqe6p3e+c7JVGdQS/NBjDuqy+nNqg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671242124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xv8gbdl7CL7K4MDV2oGJuvA/KR+O1Rw3H7q7uOHvZNc=; b=HXZmlWnqxbtBkviu5pXIz8NMMBu8cgCu1vL/U17FGfpRXioAYS8XOiXDYDqQk3MXB0eXoJ zwTjijE6xNwBOBtjnxPwEhd4wO1PUCsQ03o1k3Q3P5J98EyP8awrYzelMeJzsJJ/ojRCHt 2/MLIZORpIh3AYqyFX62153b7QfXKHI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-674-kiSlyi0fPZqcsD2lk1KCCA-1; Fri, 16 Dec 2022 20:55:19 -0500 X-MC-Unique: kiSlyi0fPZqcsD2lk1KCCA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8CB3518A63EC; Sat, 17 Dec 2022 01:55:18 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-34.pek2.redhat.com [10.72.12.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EE9C49BB6A; Sat, 17 Dec 2022 01:55:11 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, urezki@gmail.com, stephen.s.brennan@oracle.com, willy@infradead.org, akpm@linux-foundation.org, hch@infradead.org, Baoquan He , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Pali Roh??r" , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 6/7] powerpc: mm: add VM_IOREMAP flag to the vmalloc area Date: Sat, 17 Dec 2022 09:54:34 +0800 Message-Id: <20221217015435.73889-7-bhe@redhat.com> In-Reply-To: <20221217015435.73889-1-bhe@redhat.com> References: <20221217015435.73889-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 1FEB820002 X-Stat-Signature: qsmt6387txudigh8zb88xn9wshxbtofb X-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-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Currently, for vmalloc areas with flag VM_IOREMAP set, except of the specific alignment clamping in __get_vm_area_node(), they will be 1) Shown as ioremap in /proc/vmallocinfo; 2) Ignored by /proc/kcore reading via vread() So for the io mapping in ioremap_phb() of ppc, we should set VM_IOREMAP in flag to make it handled correctly as above. Signed-off-by: Baoquan He Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: "Pali Roh??r" Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/pci_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 0c7cfb9fab04..fd42059ae2a5 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -132,7 +132,7 @@ void __iomem *ioremap_phb(phys_addr_t paddr, unsigned long size) * address decoding but I'd rather not deal with those outside of the * reserved 64K legacy region. */ - area = __get_vm_area_caller(size, 0, PHB_IO_BASE, PHB_IO_END, + area = __get_vm_area_caller(size, VM_IOREMAP, PHB_IO_BASE, PHB_IO_END, __builtin_return_address(0)); if (!area) return NULL;