From patchwork Mon Jan 29 12:46:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13535524 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 BDF5AC47DA9 for ; Mon, 29 Jan 2024 12:48:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 522636B00A3; Mon, 29 Jan 2024 07:48:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A9FD6B00A4; Mon, 29 Jan 2024 07:48:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D5B66B00A5; Mon, 29 Jan 2024 07:48:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 167476B00A3 for ; Mon, 29 Jan 2024 07:48:05 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E1757C09AD for ; Mon, 29 Jan 2024 12:48:04 +0000 (UTC) X-FDA: 81732326088.02.692D492 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf26.hostedemail.com (Postfix) with ESMTP id 4267F140020 for ; Mon, 29 Jan 2024 12:48:03 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=I7BzKUxB; spf=pass (imf26.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@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=1706532483; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Y3Tbdl4mZ+WM96lxB3iHDtUIqesuPBdfScoz5at5AOg=; b=Qzka7FCRA2ZhoUs1FtkcayUpZKvBgfCe0GQ+QdxMQswYigbLt0+Z8I11lF2XZzxTVGV9in PjtXnQCTdmzJs+OzNAhJ08quXOcGQJkwHdBBiXNdOj9CrTuvvWqfBQYdorPOMjuT1ikEli XwaLW0olRlxLFsEQyXZK1hQjA3NoEKc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706532483; a=rsa-sha256; cv=none; b=7r6BoFulpZC2+8rOQmuyLhkfD1Be5jAwlI+cT1T+YLyg/1pZU9F1zXO0xgRQbkp7dOLZG8 xn2yInP/gNKC8855tnmw04mYX9B+wgo2a0ahCTj1KA216UOsUQ/LutZ2pkpA9lJ7Kks+a9 IqOiQlmKj0FlNf7+uEjCV/4+pZpIkAk= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=I7BzKUxB; spf=pass (imf26.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706532482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y3Tbdl4mZ+WM96lxB3iHDtUIqesuPBdfScoz5at5AOg=; b=I7BzKUxBU8WN3atRwyGtsCKrs5jSSnD/J5pKaFUd52iDo7PtyZdSTmJvnw/Gyla2jdv2hs /z4wXR0jCzgOuDOeu7OUScJtGW4U2ylsU4RwpZ7iq9L13d3JsnfNIjhgGb7HV/gM69m9XS MZCKUytkb28IToVCfprjuHTFPqDNs2g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-380--x5t9X58Pm--BZadaKlp-Q-1; Mon, 29 Jan 2024 07:47:58 -0500 X-MC-Unique: -x5t9X58Pm--BZadaKlp-Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C50FF85A58A; Mon, 29 Jan 2024 12:47:56 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.194.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9ED7E8B; Mon, 29 Jan 2024 12:47:51 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Matthew Wilcox , Ryan Roberts , Russell King , Catalin Marinas , Will Deacon , Dinh Nguyen , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , "David S. Miller" , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org Subject: [PATCH v3 10/15] powerpc/mm: use pte_next_pfn() in set_ptes() Date: Mon, 29 Jan 2024 13:46:44 +0100 Message-ID: <20240129124649.189745-11-david@redhat.com> In-Reply-To: <20240129124649.189745-1-david@redhat.com> References: <20240129124649.189745-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Stat-Signature: 8t59mxawc8ijdkdizuyu78soszbkah1h X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4267F140020 X-Rspam-User: X-HE-Tag: 1706532483-946515 X-HE-Meta: U2FsdGVkX1/51pRdOLN9o52mD+l5sU4yrtyPs72rKxEbBcSxDlYW4UG8emVL0Uz4Piu4SO1rdGedk6dd+hLo07L3nWR/FDNyWrRaYiYyHOg2cGxdNU68tETkbrz+Ps0UNAQUwOPZMjyQACvLJI+ZASjp1icx7m33FILUcbhBAJTENL52q/Qo8Zm3S6NVaZxQzTDw4/FXCiWLex0TKPUJ5IXfT8L6VwvY8V4zSKCgezHnnwjGMPOiSPHZhZqBI7MXDtgVGhEbRUy8S4bj1imf4wmkHAfOYoQn1lIOrX+IFcG5ZaSd+9YuEQnjkxHBUy8XDq5CICiwnk0gva69AC/7MeF9bEUKpE9N/57NiI61WxlZSMDQEesg2AqD2uAxwMcrT9j/+KBAN0VMXTtx0OM7N9zpB5VlzwUggFKA9cyloPH5v2dY2+r3heT/VfmfKaMNLFLRWUiyBazaUrApDl2gw+zCAIxSftjA0vSdJjQEgGNLvbjMGWXte9xRTMTKOJzUPPYKbVsw1aEcPHIyLIjWaCKucnIJ8xvEKVpoxAsODARvagx+3xE6zbcQHuWIXnoN2ORF06M6n42VbXS1xaGUxlYFsUvIF9Uzcj1SOTODBZdFKgc/+aXIsVwH8E84bw6DEX7J7g75alFMSexDvNN7WpjJT9zQesw+bn/TgJeruGOiSwVSdVftFhqGnif6vQ7RbG7j7z8akmZBXyHVs2O+BEp31UWVtej6wxEx8rV9EYlJXVyP99Xhb+krFT11zaGLYDkYBVoov8thooHwR2mps4HOkten2q9hPRYBQooOwBeHSqlhw5mxikjepikah2RgHfVNm2K193EqRdUze2yyKb+AOlYT2GtovLqgfoAl3Ze/6X+4PImXmyf+NqCug2vJGewVKJ2ItR5H00yyigjqig1rCi2phyt8z/MVmFIITZS3WC1sIDWbqUgGtEMn/0Fn 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: List-Subscribe: List-Unsubscribe: Let's use our handy new helper. Note that the implementation is slightly different, but shouldn't really make a difference in practice. Reviewed-by: Christophe Leroy Signed-off-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) --- arch/powerpc/mm/pgtable.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c index a04ae4449a02..549a440ed7f6 100644 --- a/arch/powerpc/mm/pgtable.c +++ b/arch/powerpc/mm/pgtable.c @@ -220,10 +220,7 @@ void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep, break; ptep++; addr += PAGE_SIZE; - /* - * increment the pfn. - */ - pte = pfn_pte(pte_pfn(pte) + 1, pte_pgprot((pte))); + pte = pte_next_pfn(pte); } }