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: 13099679 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 67CDAC54EBD for ; Fri, 13 Jan 2023 03:20:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 08B8D900006; Thu, 12 Jan 2023 22:20:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 03B8D900003; Thu, 12 Jan 2023 22:20:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6D53900006; Thu, 12 Jan 2023 22:20:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D9CBD900003 for ; Thu, 12 Jan 2023 22:20:14 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id B9A061C6007 for ; Fri, 13 Jan 2023 03:20:14 +0000 (UTC) X-FDA: 80348322348.17.A6D9CF8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf18.hostedemail.com (Postfix) with ESMTP id 2FAF61C0008 for ; Fri, 13 Jan 2023 03:20:13 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SpQF1IDx; spf=pass (imf18.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.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=1673580013; 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=sNFgggokfEpsJ+m9XSJUb906E+70pgaIWc+RI3TMVHY=; b=wkXyEYT6b2oUVT8jgAuqmgAOGk665qDtFEXwFSjSq4TeQQtKugWj5WEtrbFj1TtUlG45T9 dPG9vD01Wp4dlNLAlTcX6dBYzA+MDJHiq3DH7+yaQzciVmN8xz6YjXqetPVdVLneWZy7wG Fr1gDARsQFXguvIk4QMmc5twG0Re8Gc= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SpQF1IDx; spf=pass (imf18.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.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=1673580013; a=rsa-sha256; cv=none; b=iJGRt5C08dEbcWAetLBkYZd3y/UzmskfBU66XOOGyDGc5HJUHuiRZMaGzZtccxhh2/cb4t 5IOJM9+UOiMqX7bbRUm4rHXYluk1CFWZLcLIM54EnSL3icOabDxXnoF089pahKiDRn9PhC wGJ7sRM+wLWVYPjLJREm5c7vru85fvs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673580012; 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=SpQF1IDxwFwuRQHX+1eS/mI1LtV3YaBXclAQ2Wg0lb0kVcGaMRYPT18QDC/aV8DrVpNkUV /sfgxK+N4wB3X1P8GforQeFqgvbnqDSLxYGHXPlCJNVCMR7Y4YRQD0+DlTKV6pn5Uvg9wl PSXfP633kBMcyZxhTxkAmx/+o+3GbT4= 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-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 2FAF61C0008 X-Stat-Signature: 161ijc1frb88bc39rpbht8guqfpxzpxw X-HE-Tag: 1673580013-299456 X-HE-Meta: U2FsdGVkX1/rqnyRvEzMx+XBMU3sZAShtvhaIObPHw7nN+6y6zA6pMj9zdoLA36AfCZudJn8+hUZ95kBbnr89gsd8m23jtavQ6qcXn2+TEBisUwyTw6n3Mg2e/dl5qezdDzf9QtQ415hY998385H/0T0iY9yucxquAdHJizjbAGnQ7suHSlwcedLPJVCkxii2XTsOF3N0mpTkJPOAxLF+dRR0HKmd2N3RryhcMCV2h1C7x6Qj7VHuCsJ4eYmzZFCjIwXbry1fIsVXSLTF1Vy05tJ9T0fxcviu7CY2+vaw9c3+89CKjQCxcZ4j7kRGoRT0PlDY9UAa5G0oNOG1b0twT5PoMuuC1F1L3Z2yDgO1is1DsxYsS7QBGFNYf950/bJX1R5MrGtIhMSM5QPaF6A3yBKizHDcgy5Nzi3yiLjaqP9ucq7YEWuXKqaY17FkXnSF8gtUxPblnjav7UVucuAhZtj/xRCBHkmyLH1om7o/Oszd30vj4CW5GjKtpGztPOlC2cV+WNeNSLYoC5tkJRejSLYQYAWTxEmjvQJSPqGsGt2q6Pn3nsVO0TdtZqUZ9LqbR7TVPAcripYeZ99CazBTDylI73zE40H8ATIUf7fX3sv21E7xAQks3bgJwaVFHpoW0Tub6rKYig3YUhF59Bk3ieEHBJMfYnwqhcqM0oJV7cbTnAbrEKhmpGD+5OHmhGGkLO7YPKRoAesN1y0XUjHuitm+qPPG4et+Zr1jcVvTWbTACjBMcxHenL/2CqmspASY1JnEZFGLVCFwLJ3ifV2I2lGTBuKo5svC4lAfU+jNgVTlqTD68Xwj0dkpwSuKqmjTSfQ4fPPDsMXPHRnrUU4bnRWBiRFxm3NcuI7EEu3le5uV4GvJMcSOSiadU/s6HoS1/Julk89AMmEEYRoflxM3eTdfnVWDJNALGxe67G/0zwUAZu2uNQJ13gFo94ZtVam2Dp/Kuk/ZdGH6q+gEQv MKw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-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 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;