From patchwork Fri Jan 13 03:19:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 42906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp57830wrt; Thu, 12 Jan 2023 19:24:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXvc7zXUgo5gUuTEXa8WMcDqofb/ri0Js5Lghi026KnR13unY+iu4z08oDevBmxpACc5nmtR X-Received: by 2002:a17:907:3e96:b0:7c4:f501:e5b1 with SMTP id hs22-20020a1709073e9600b007c4f501e5b1mr89424822ejc.51.1673580242880; Thu, 12 Jan 2023 19:24:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673580242; cv=none; d=google.com; s=arc-20160816; b=fnfut58PR3HmkrmJA5PGvrZ6pYmJQh2z8jRd/Wxm7C42MV+A0U7s1iGSlDWbwFzGpa GAQnF/0pCi9eY85lcQzUNydroOMUoN8SxkFJT1JSDf0eK8Ur0sL9OY206cdV0YyEhv8I 8ZxYVSrq+o2h2pSbrq9IDTbBtUSdQw9X8RS7tF1HKrZDHh0eEK/3jYzuAJiRF1sepARk CZfy00EvMmxr81Eh9c+qJ3hQ1PIn9bT8LBLZTJeC+P8+wOnSuVXJSa6wbsL4aKwwrWy+ gHgfUNXiaBqGZ6KD7Xo9lf4hj4nc2mkZpbF3Mo0R1UdzPKeJBpwuo+V7lvtftutzYtRS NtRw== 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=sNFgggokfEpsJ+m9XSJUb906E+70pgaIWc+RI3TMVHY=; b=z4cggUDWCZjQyGd51Xq5lXfBLN1QKGYaGbSs5TGFqCaeedym3JnhRxYZLPDDEUDxV5 2X2AQh1nBK4be+twjZTKXooQNuxkyQRrBAbe6CflC80PG8euJofTnLW6/Mtul63O8Tsh bU9G32ZiVhhhKbygTM7DHeDKKSnBgFV9/0W1rf4S+D/YBcokAFCpdRqYQgHXC9IAMJab hirrGpS+q3IYY223MCIkU7Kr3xRmWxN67iQntxUbSYX48zPze6xENzZx24Xs97eUB0cl SRtq6m0OHD+/XSwAQXLligeNiVZQ5kI8LCR/oOCYaFL1NpYoTQbgt5RRJUVKr6aZ7TvQ gRrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JzTvnxZe; 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 gn3-20020a1709070d0300b008546dd18d16si11665274ejc.51.2023.01.12.19.23.39; Thu, 12 Jan 2023 19:24:02 -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=JzTvnxZe; 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 S231895AbjAMDVL (ORCPT + 99 others); Thu, 12 Jan 2023 22:21:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231801AbjAMDU6 (ORCPT ); Thu, 12 Jan 2023 22:20:58 -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 74E32559F7 for ; Thu, 12 Jan 2023 19:20:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673580011; 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=sNFgggokfEpsJ+m9XSJUb906E+70pgaIWc+RI3TMVHY=; b=JzTvnxZeXHAaNI+38qcD/L9rBtkgsd081UyfJkX94O8HHPSjzdlSOEtuP37sb2ooghKXsL 7et2hqUi+px7NkmSMXq02l/niJtZlv7gj/wx+HNH3LoBIclbKsloqsd3+d0LFzNHR4KXj6 c4zOPDnI/e7WoKRwfs4OieLQkCBYVI4= 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-615-wvxQxbrsOFieE4CbX1MW9A-1; Thu, 12 Jan 2023 22:20:08 -0500 X-MC-Unique: wvxQxbrsOFieE4CbX1MW9A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A16EF3804063; Fri, 13 Jan 2023 03:20:07 +0000 (UTC) Received: from fedora.redhat.com (ovpn-12-229.pek2.redhat.com [10.72.12.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54F1E4078903; Fri, 13 Jan 2023 03:20:02 +0000 (UTC) From: Baoquan He To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, urezki@gmail.com, lstoakes@gmail.com, stephen.s.brennan@oracle.com, willy@infradead.org, akpm@linux-foundation.org, hch@infradead.org, Baoquan He Subject: [PATCH v3 6/7] powerpc: mm: add VM_IOREMAP flag to the vmalloc area Date: Fri, 13 Jan 2023 11:19:20 +0800 Message-Id: <20230113031921.64716-7-bhe@redhat.com> In-Reply-To: <20230113031921.64716-1-bhe@redhat.com> References: <20230113031921.64716-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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?1754876076476703543?= X-GMAIL-MSGID: =?utf-8?q?1754876076476703543?= 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: Uladzislau Rezki (Sony) Reviewed-by: Lorenzo Stoakes --- 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;