From patchwork Thu Jan 25 19:32:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13531558 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 E992CC47422 for ; Thu, 25 Jan 2024 19:33:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7C20D6B007D; Thu, 25 Jan 2024 14:33:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 76EB06B007E; Thu, 25 Jan 2024 14:33:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 636A76B0080; Thu, 25 Jan 2024 14:33:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4F9A16B007D for ; Thu, 25 Jan 2024 14:33:42 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 286568090D for ; Thu, 25 Jan 2024 19:33:42 +0000 (UTC) X-FDA: 81718833084.28.8B7667D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf11.hostedemail.com (Postfix) with ESMTP id 6B6684000B for ; Thu, 25 Jan 2024 19:33:40 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Tw1R1xkW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf11.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706211220; 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=cWsEpSrdwYXBoeIhNs8GBnzc96pxJH9YBnNESaF0zxU=; b=ZUbUI9Br7fmD2bOiBY2bNrMz5IebEUYl8pzM5/jc0UbFitL9grgFpdNSpGMSxSmFvMj077 XBp4d4ikqbrk/ibJrMS4AzF8SY/qKod99nzEOBrmN9rWAeqVsjviz01yyhu27Hiny4eKAC 2piPZANDMo30hwM4wPV99nFXIuOgt0A= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Tw1R1xkW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf11.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706211220; a=rsa-sha256; cv=none; b=TvbdjN9mcISaIhPCdv/bockZ09abIdIy34wTO2m3LzBxVi+jEFU1C8CLa8f0HBypJXOloA Mv4zeW7IJ2qvKNZSKJMV5/UgwGO/l0SVhwgi9PaW7lei3h9xrQ3KE4tal3eMcab1yxsuVW egXHhic+HZ+ryCIeWZDKFRegrhD7zJI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706211219; 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=cWsEpSrdwYXBoeIhNs8GBnzc96pxJH9YBnNESaF0zxU=; b=Tw1R1xkWoXU7GWD9YIigILiQqsyjQpsjyt7H2bAQmTSVXWY8tmdbu5en6tBc8y5NeWDl+z JN52R1ndzhNz05r6idPJn4tFU0Mp04QfBicB35iyhVfVMFCzxjmRUxW9iwxB+5U3DlxyFv 4ptjWDow1flLDTQJWZsPEVbIpxK1Jvo= 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-644-z2AXiQwENJ2OgR2MM0KiwQ-1; Thu, 25 Jan 2024 14:33:36 -0500 X-MC-Unique: z2AXiQwENJ2OgR2MM0KiwQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 9E036870822; Thu, 25 Jan 2024 19:33:34 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.193.154]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6302492BC6; Thu, 25 Jan 2024 19:33:28 +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 v2 10/15] powerpc/mm: use pte_next_pfn() in set_ptes() Date: Thu, 25 Jan 2024 20:32:22 +0100 Message-ID: <20240125193227.444072-11-david@redhat.com> In-Reply-To: <20240125193227.444072-1-david@redhat.com> References: <20240125193227.444072-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 6B6684000B X-Stat-Signature: yefopaab19wsznczjbgbz7xmpjq9143j X-Rspam-User: X-HE-Tag: 1706211220-686049 X-HE-Meta: U2FsdGVkX1/V/stdbyXfuWaSgGE4q5qCmTBjCgixgX26l7yfvK+JHTe+bHth1IIPStOH2L/Sv5NNrZv3pt/b4YsljnfXwT7ao7lfiCZ9bAqRpVO510giP5J4Uvh9f6IzT7v19w0IF4D5B7bY+6FmlJ6lpsf3P0wGtf59SbvoT4D9ntXtSug8TK6QPjTG5c29yj8HKx//i/SDYgxdMzT0U23B5qg+Lddb0urRnWMt+OOe3wraUEhUdYO/eFFFLZcP0tkgdZByLXfPkKJUxHU/UC8rynQ5XPA3cPXwwORCMjFyfidjQZKJH8uxRG4qsMk50eQ+PlTM5b5gt7FPbOHBawRQ9tZvkhvL1UwonUkKOD6EGQgclaJEfzrXmY4J8x+ATr06zbn07T9yuNpXOmlvmy+olvS2skIrHYHx31AUc7LCX5QQB3pQ/FYTeWgU1bNzmxDyOQMDNgPRAAdQqLpfRtL0H8l/Nxf4lEbB9xzw6uIUl1A10hQi7BTpcecY1U2NKuhN6hytChPSKB1kmjWFzrK2Bb6F7+36YVSrkVCL0kMN0Td6v/tUHCAF1DQIj+BL2i8CuFViphSz4xD+0JhTT6kBdbBaMjWZf13Ht6ssgvhHuPgiCsdBZKF2ID+yyPn5ax5l0R3BCtMA+DmYDSdE181LGHPjcrA9vNPD+681CDNWs9svYoOagz0QlVIVgwXEe9FQt7j5Wq4aRI+qK1Hd/ckFRck8wqv6HU2IuEzndVM4urj83rSK0vJMO2eID7bhHdt4cGB0dFszdpUH9b/igwyHq/wTotRkx23beHJ9t+CbqYArTf+oFL9bj1waVU509V0m9dNJqSc2b1LXgj0LGVrDB2yYjgUJC83ga9JgwNCTqn7HgS0axP71k4xYkaQRoyFkdwS5wkX56zbqFgQKhrru5+iacaAnSSZovGuR8QANCGmDY8hm26vqJyyW1Z+iIleovGLdEIzDee5+fac iVkkkzl+ vYCHumjz2+YJir9HrE6YtlvLx7BcHGdL1P+a0yZxe778q9GqHeNNXL5x5E5OVdQ919oTsTCbnKjcOmTxUczgJJlQm6eqx4afYoBrmb0ZxeYQGDKNqddirrwyNj7f6oQj51bG9B518zOVVwRc8Zn0w179zsVa9lrsufWLF9ywtHwXocMC/9a3l/EAD74/OEJe48EJYI5LWSPJn8BOtieUFMpxcSUqr/7iZYoMR 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. Signed-off-by: David Hildenbrand Reviewed-by: Christophe Leroy --- 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 a04ae4449a025..549a440ed7f65 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); } }