Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp362986rdb; Mon, 29 Jan 2024 04:51:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHcu3KCxLEP5zyVRRosecLk/o9tbX3ZXqCP6dE+dj2NbpXOVU03MZr0dYejQ3kvzml5CGr4 X-Received: by 2002:a17:906:4ac4:b0:a35:70d8:8b80 with SMTP id u4-20020a1709064ac400b00a3570d88b80mr3371761ejt.66.1706532693570; Mon, 29 Jan 2024 04:51:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706532693; cv=pass; d=google.com; s=arc-20160816; b=N1RjybBgyftPJL+6m6KftLqIs4KdPwsPcnQHSRgDgtGJT6XnYa2FPFwKN3GNnsTFoj 9TH2ZPSpbcche0GgixSlO+f738NGPYdY1oW4liffdQi1niXRsH9evS7CqQve5vyb1OJn 9eI7Lw7MIsUKYrinZHmk/zcd6AkUHaABr9+8hzESXgoNo1R+GGsMho3SRvWj4FcNo+Am u8wuKCbjzFxlE6gFx9lW47jRVmNk875boRfLG9M2qQtoJWnu3lcBUgVxRR7zkqkQS7PF 0PYe8ibEHXaMPIdWGMCQlX/aNRvLRXIMts6kkLuLlZI0WajfM1uIHOdOhy5pLAylyXt/ hGfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TR23YVq6t+vxDxzPS6q2xEOscQxVIS4+3klgCmYFiGs=; fh=cRVyEtWgqT6YHFrnO/5+bdKlHln5zVl4J/y0CzbKtgY=; b=bexZmdATsQy5CDgOEO6RUUz+bXC1LfyRyjT48dob5HEEjrrwyOvsP2cXelq0Ifd3uQ J1iSMPTyPPBZKbdA+Dz3jAqQ5TqUqaXrVhToZgIIQpQVvhit+VF2kSw6DSSETSNG30Dd NxrIMuN2gRW51O8wAn3UvengS9vCYQHmYG0YzanJ3ggm7y3IqwmYmw/eSBPd2BHN8k80 ddoxycayTd52LYHXuNtnWahLRLPP2ANVgTF1/uv4SNCjp4SX9dktxtIE80MPcdjjSZzu F84CWW/FV/dbowf377kIfLQShhq241HTvmlWa//5W/azaVPy9jftYXQsAjHdCnRWJAWw ABPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AUlAxZPf; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-42719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bl23-20020a170906c25700b00a35a69ff2a2si1120424ejb.864.2024.01.29.04.51.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 04:51:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AUlAxZPf; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-42719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 571CE1F21265 for ; Mon, 29 Jan 2024 12:51:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8279166B4C; Mon, 29 Jan 2024 12:47:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AUlAxZPf" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 4F27863500 for ; Mon, 29 Jan 2024 12:47:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706532455; cv=none; b=e/lD7+OL5VorlQGl8xkJsH7hi+5JPNtlfChB3mtvlUCSjYWbk3u32j2e2NQfypaDw7AJ99bZUJs74pC4kYflk9O6QFjDzVbz3LFOj3efp1mI8gGzzxI/fwcvQttXwAJdxvIvTW2FgRUcCw7N5VbDHYcChjSb1HF+Ar2+UsX93ls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706532455; c=relaxed/simple; bh=IY5FrFcWDNKL1OGj460vClP2gN7wCnsLeRSuqWL8xaY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l534tHc66RFri8tI6ZQ433uJHxTQqiioqQioTj8XEk864ayK/m/qtch14NvXYhYoVVIcScqGCSMt1tCdMETsvepDjihypcf/fXAbrJHtz7OBvkqCOUSl/xIF4e14nRqzxZGDJL//BcFYAFnQj9qS8i8va8pllWrrcvHmGIVZpj0= 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=AUlAxZPf; arc=none smtp.client-ip=170.10.129.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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706532453; 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=TR23YVq6t+vxDxzPS6q2xEOscQxVIS4+3klgCmYFiGs=; b=AUlAxZPf/abaQjKWW8udyU2DXs/Z4UFP5GbJFFG14ylASSA2xvGosx2de21MXUo7Wrjq9D /xJiL3IScHGj6OX3RnOfPU9gF5RXKFAXPlmM/gFBdjZmBGHA4mR/aOgX4CKnc61tFZ5AVU i/DOWu3yGF3o1sIArfuyZhAak+bvwDQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-317-aMm9C5FkN5Gfoo5yJn1Edw-1; Mon, 29 Jan 2024 07:47:28 -0500 X-MC-Unique: aMm9C5FkN5Gfoo5yJn1Edw-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 CB8C329AC02A; Mon, 29 Jan 2024 12:47:26 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.194.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D62B107BD; Mon, 29 Jan 2024 12:47:21 +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, Alexandre Ghiti Subject: [PATCH v3 05/15] riscv/pgtable: define PFN_PTE_SHIFT Date: Mon, 29 Jan 2024 13:46:39 +0100 Message-ID: <20240129124649.189745-6-david@redhat.com> In-Reply-To: <20240129124649.189745-1-david@redhat.com> References: <20240129124649.189745-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: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 We want to make use of pte_next_pfn() outside of set_ptes(). Let's simply define PFN_PTE_SHIFT, required by pte_next_pfn(). Reviewed-by: Alexandre Ghiti Signed-off-by: David Hildenbrand --- arch/riscv/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 0c94260b5d0c..add5cd30ab34 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -523,6 +523,8 @@ static inline void __set_pte_at(pte_t *ptep, pte_t pteval) set_pte(ptep, pteval); } +#define PFN_PTE_SHIFT _PAGE_PFN_SHIFT + static inline void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval, unsigned int nr) { -- 2.43.0