Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3606600rwb; Fri, 16 Dec 2022 18:26:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ATsAqxszpndf03wvvX3IDoTXMihTWu4YL+mMsxcRhtR2Rfc7FV2sC1d4t5vxZrFEp5P6u X-Received: by 2002:a05:6402:2408:b0:461:f0a7:156 with SMTP id t8-20020a056402240800b00461f0a70156mr31570411eda.36.1671243959956; Fri, 16 Dec 2022 18:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671243959; cv=none; d=google.com; s=arc-20160816; b=Qau7gp1hRNw9Nr9L3AiUNffOGwJtoAsMBXliTehuhFHFmrnAuZWtveEamRzSaP3lss tvT7x9VoVYP8Dc0ne9k5xujY9Rk30o9EbnX00IYyLp7pALQciX2LOUB5DAQsDEWvZPYn gK9a/zcD9OnJMbqm3j+cHXaGvtFbLY9qcUyCz3+2QmRYm7mgVb37xNWrZ+Ysadb8YuvJ 37+5EezY60luwedPGJsx88ciSay2TkGfAE8pPQ4n7JJ0XfgOz2wJ9W4Y64FnilYtQhrp qgU9HSrUN6ab+hN6vd9jzviEs7ySWiDYNSq4zqWzhH4sSplUEnEyRA9gfX2vhn0gU3qk +iNw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Xv8gbdl7CL7K4MDV2oGJuvA/KR+O1Rw3H7q7uOHvZNc=; b=xYeuqRzJQ3fRvvKtg6kf31NnLF61bE4F3AHbuwP7g538yaRuiLccTtY5mwvctuDdHT CUpg5IAjEnXFVDCu500BeKVlxxJxzQZIer+s+3V2enBnFu4xg9unzPZv8d/tv9uT0wJF 3kNQqMERmXlR/e4jCR8A9HJ+utwyfy/GPljTWg82QjCyEZR6Yc9/vDj11Xxak42Hh8xL 3qnwqqFl3ZvCLmMkEjrPq5UyXtx6Iud87rEZnQIJfpD4/tkIwYC890ddM2cJzBGPKviS 4YbhXEez2yeQqxzAxxH8i0gTPT0GcFfyZ6zZLF5+1dcDmNKrizhFPjQkYxebU5sYuFSD WoCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UM8tINCv; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a15-20020aa7cf0f000000b00469d667117csi3600637edy.167.2022.12.16.18.25.43; Fri, 16 Dec 2022 18:25:59 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UM8tINCv; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230195AbiLQB4w (ORCPT + 68 others); Fri, 16 Dec 2022 20:56:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbiLQB4X (ORCPT ); Fri, 16 Dec 2022 20:56:23 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C79C5C0F1 for ; Fri, 16 Dec 2022 17:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671242123; 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=UM8tINCvM9Fq5yXXuJjueUxDimQIovKvax802X4WX0dAv8agEHkrdzE3KSfpw6wNbvTd8y Uvk4nvByAOFE3vX2RwQEicb90PInciKv5Ya6W6DJfCuZ8q6rZ/OTHADn0fUBEGA59BM58i SGs8Htl3XqhjU1NvboZAYcf6nz3mh2k= 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 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 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; -- 2.34.1