Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp56418rdb; Mon, 22 Jan 2024 11:46:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlC5DAlr55CQORUXk/8egfhplbv/PiNjnaTcTI0LkFWD6FpzwNY4DskqHOoArN+xdbwi9k X-Received: by 2002:a05:6a20:daa5:b0:19b:a07a:3495 with SMTP id iy37-20020a056a20daa500b0019ba07a3495mr8012321pzb.25.1705952794295; Mon, 22 Jan 2024 11:46:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705952794; cv=pass; d=google.com; s=arc-20160816; b=0FXDr88aWDvCNmKwrynzbuhf5NCt1aTzgCcUxHTJOblhqEU6Pi+sV3M588Vv1BKd98 ObwSd4Qx+hdCxs+L2MwJ7uRIZqD2ZxJLpxxsn+Ubo84qlwhCckdfstR/bOqXcB4Fn2Yi AvIOpAkHgaauhX+UH5gRCMqCAAov76jSRZEAf4BtYJIhAZlnWEGE3vqc9b0Fu7Tw8HPO ysse7e+OUOe0ZpmSMTCUQNotAIhZGBJb//JJqIoOS2cTVXG9BwlHKItdJFjWquIBNXzM GfwBc1khZ+wOUGnG0cwvN8ngqfSIFxxOSHWqHLC8ivWvW8JJ3ab+kxQQJrQLiCUvp6D/ TwOA== 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=tOYdVx3Vo+Ft7G1OTsqYnhs+sWPYKb0IUhtnLA3JLTY=; fh=lZsZCQsH4ia1jFJuQK1Gi3cXLvdnrj+ub8bSs7lwlcw=; b=JyndZqxqgH68/vr58hQjwNMFcM8rpgr0dBqqCg9hQ9lIUHE/DJkVVQArkWSetTanrY 6vgXtXtuBZMdTCBIDMnxA2xKdDjtbbccCmdzAhhZeM7pCxgsO9r9SaalbvG9Pf+caRO+ qZLQsUedTjQ6buEWoL5NAURU1CmzbvBDs1szE6GNYtn445+eAAjcNQSgt9w8nL3EQppx 12Pdf31qbD54Y30VsPOZ+7wj6RBJYBFgfXy+0IDRZ3ahgx6PN0Ldrchzoef5y9nx55Dy 7Uc1+bDxh1JJCQqFkXr39IBVH6s4TvZTzqK3d0QyGewBnXgVKWyLSy66pOJlxB6qlWKP JdOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YM8cu5l9; 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-34073-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m4-20020a63ed44000000b005ceca0f3bbasi8432799pgk.429.2024.01.22.11.46.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 11:46:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34073-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YM8cu5l9; 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-34073-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34073-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 43A2428D5B4 for ; Mon, 22 Jan 2024 19:44:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 801A64644D; Mon, 22 Jan 2024 19:42:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YM8cu5l9" 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 188A03EA97 for ; Mon, 22 Jan 2024 19:42:40 +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=1705952563; cv=none; b=gIq/jfwW5bURcwRcfZtZIiHFS7C6PctShbUjtoNlty5Qt/scIaTQnmZNxy9FVcM96DdP/Y8jgoq9dxv5FF2iP1Gdd8tAGiGvB9V/okUXFyL0pymgsUXVn3XZze70QEtB02lU/IEMzuqxM5MP1W/qHnO1N5KaJMmOADCGj6m4HCg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705952563; c=relaxed/simple; bh=WxtmkkmnYec9yLwpF1/YPcllSU+apt4kqFGpKcecRkA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b3+bU3ipLELKi8+y9cL2zD35LLy07pzkRys1IhvupgzZaG1zI+wGPi2a/qMCjkx78u7/a7+swm6e45GN29gUcAqSZTeBSzp+qqJbXsFIZyFVHbbbS4IjL7syUW3Dn63Qas2Z71OhCgn+etxVd7HioNvhGd4miYLyNTagObKGcnU= 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=YM8cu5l9; 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=1705952558; 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=tOYdVx3Vo+Ft7G1OTsqYnhs+sWPYKb0IUhtnLA3JLTY=; b=YM8cu5l9m0ln3LQCUc2yVVQrgnrzyt+Hk5iiJ9CseG/G6rq1XEOnFjIWcMDzvKiMy0BH9s opvH5t4rYlJYgkj713+L8l0ZRFEotwbuvLXTgeRbYVZCeJevStFvlcnvaTIcXMJ1wNg3rx rrhcfAxvS7xDMKJYMAL8uaeF+EpxEGo= 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-283-U65XcrjPPBKjRfwTqL42NA-1; Mon, 22 Jan 2024 14:42:33 -0500 X-MC-Unique: U65XcrjPPBKjRfwTqL42NA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 9A01F85A597; Mon, 22 Jan 2024 19:42:31 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F97B3C2E; Mon, 22 Jan 2024 19:42:26 +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 v1 04/11] risc: pgtable: define PFN_PTE_SHIFT Date: Mon, 22 Jan 2024 20:41:53 +0100 Message-ID: <20240122194200.381241-5-david@redhat.com> In-Reply-To: <20240122194200.381241-1-david@redhat.com> References: <20240122194200.381241-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.1 We want to make use of pte_next_pfn() outside of set_ptes(). Let's simpliy define PFN_PTE_SHIFT, required by pte_next_pfn(). 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 0c94260b5d0c1..add5cd30ab34d 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