From patchwork Mon Feb 6 08:40:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 53083 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2122378wrn; Mon, 6 Feb 2023 00:46:00 -0800 (PST) X-Google-Smtp-Source: AK7set8/8NoZkSBwoIcCOwTDFx7e54RvYydla+lgkcbFFG45vkf53aDHOJI/2U1EFmGtziKS2Y/9 X-Received: by 2002:a05:6402:500c:b0:49e:4254:60a9 with SMTP id p12-20020a056402500c00b0049e425460a9mr23827580eda.29.1675673160085; Mon, 06 Feb 2023 00:46:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675673160; cv=none; d=google.com; s=arc-20160816; b=FP85jjoayCHm26smWclTl4Gz0x4BqQFN3O1z84P/FoDzPQ+xJD4pNy42GOvitseZ7E CO1LehugY9c1XeeWxFhm9C8Uy2Gsh5Itr0tGLcpMMbwQPmQL+rHfzMZ1Zoxg63wUQ6wX kd4D6+dExe4nUbwSVqvKkyOpBJh9O1TQo6DEFoqP7kxHGsYKmob6daSgTyBAJcfa4X3y PrUFih0iUfsYK8KEFt/eSilit7BNkBqGGsaOg6UxomtUz+g1GgSeRCFfCHCHGJr4Ey/G zklvhAR9E13XMVQL9Wl8mB3hdPMz02+dYjAGLuJowLoguWPVLSPN7AhdEOr6STYnGZxR TB+w== 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=lNZtN3K6Lqx2kVVKvoFNyaccpQbarea9cnt235tEpuI=; b=cX0leY3cbWhliLJocoxOeUhx+HLEPfra6mctgd0QtqpJDHqzlVgZwQQPua+a3Qq45I QkrB3DLy/6EKXlHOJtEpeAfqdPcoKUG0C5JxSW8yCi829Dwv2HZRShYln1AKIN6QgS/9 2ADA/R6dFI5d1GLwSQx/NU7WeYX5BBnAJKtxpuhE1IUcJVn/A+b16EKWqOgEvSu2iZko xNQ9mTbNWorLmIOAAfT1kCT5by17c5xbK/L2zVooKSsa5UpJF/nKlzYHMaae632Dnom4 UM1lJs1ZEnx2ShCj++3LoepXxqn0a1tDrT1zNiRLUNyEVTDJ33PjhY4xEjUFRhXCxGhB QRUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IeHLbezi; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w17-20020a056402269100b0049ee981bdb4si15132367edd.193.2023.02.06.00.45.36; Mon, 06 Feb 2023 00:46:00 -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=IeHLbezi; 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 S230158AbjBFImE (ORCPT + 99 others); Mon, 6 Feb 2023 03:42:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbjBFIln (ORCPT ); Mon, 6 Feb 2023 03:41:43 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662F51814B for ; Mon, 6 Feb 2023 00:40:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675672858; 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=lNZtN3K6Lqx2kVVKvoFNyaccpQbarea9cnt235tEpuI=; b=IeHLbeziJPxu9KBigmdys2HrjlLDfJuZF7844uXDHAZqturcQ5ZPTXhZ8DykOCTbI8pUhz O2avyDvfNCdVBRwpuLrZytTgtrLXH3obGnP8ASBkjOs73tm4XnkqTF/b4QTVza6T6DYJSa h+L76huWh+H9rkkP9ALo2CBYxWO9kL0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-491-Ny2Zzr1OOLWi1hrheDXFew-1; Mon, 06 Feb 2023 03:40:57 -0500 X-MC-Unique: Ny2Zzr1OOLWi1hrheDXFew-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3AE73C025BC; Mon, 6 Feb 2023 08:40:56 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-71.pek2.redhat.com [10.72.12.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id CAA0C2166B29; Mon, 6 Feb 2023 08:40:52 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, stephen.s.brennan@oracle.com, urezki@gmail.com, lstoakes@gmail.com, error27@gmail.com, Baoquan He Subject: [PATCH v5 6/7] powerpc: mm: add VM_IOREMAP flag to the vmalloc area Date: Mon, 6 Feb 2023 16:40:19 +0800 Message-Id: <20230206084020.174506-7-bhe@redhat.com> In-Reply-To: <20230206084020.174506-1-bhe@redhat.com> References: <20230206084020.174506-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757070659391016143?= X-GMAIL-MSGID: =?utf-8?q?1757070659391016143?= 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 Reviewed-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) --- 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;