From nobody Wed Dec 24 16:01:44 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C707E137C2B for ; Thu, 25 Jan 2024 19:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706211223; cv=none; b=TjeEgRKIOB+V2mE1bj478/j9TpOryuDuPJAY2wyAVlq/N4YhGKdjziOyHQib8hj/IQ6zm2SqVoIQUrCZO04UaTLBUd5XICKpHL7F02lO1gPWDOB1ZZInGAxK0tmApgnnseEhdNeMP9n/iGy4khY1/f7NBYp/mVHYMIGXnVZVJUs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706211223; c=relaxed/simple; bh=d5aGWTZLGgQ6E2iBgTai8/pl3kQ878+LejDvI7sJPBM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GG31j7paGRdrdKsjsNNy+/XmJUZG6E8fJgC21hjsrIagPNX8uKOOI1GY+5uRdjHBFCyG5zHyZMJTSsppSg8xkcVcz6PShhyAHOhtOULNqyEc7xtAqQcWZ3Voh4kL0iFnwaSdCATmVkOxGqglAfTsUGOiSRwFmdT6Kaemo1KxN+o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Hc2lFx2N; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Hc2lFx2N" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706211220; 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=Hc2lFx2NhvjkCSZYLzmNXZhcNRyLwOwGBhwcJtNK7n3LCsW/2iUiotLVfiZBp+yjArgjaI bIs9j24XWxYcjjDvq606eIRIEgsaZQj75OoOSumlGnfb1pxEaGg07KIVX4woFeD5DfdamJ As3FdkjJBzS7yZ8qs/ZB1uZSJGLgecg= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 Content-Type: text/plain; charset="utf-8" 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 +=3D PAGE_SIZE; - /* - * increment the pfn. - */ - pte =3D pfn_pte(pte_pfn(pte) + 1, pte_pgprot((pte))); + pte =3D pte_next_pfn(pte); } } =20 --=20 2.43.0