Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp175854rdb; Thu, 25 Jan 2024 11:34:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGnQC6SkqnPYrimJCuSZcsdneZb23AYgfwSvly9ox3oCLza6hg4nPq6akqel3xEQhj/j5D X-Received: by 2002:aa7:df8f:0:b0:55c:8807:87dc with SMTP id b15-20020aa7df8f000000b0055c880787dcmr48733edy.1.1706211247477; Thu, 25 Jan 2024 11:34:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706211247; cv=pass; d=google.com; s=arc-20160816; b=z07exxjf+wmmMzZlkdHeix6NoYyXgIXKrHVijzDwpEfKepxHCp69nK96GCAslVqfKF f4ZHvd/nvQTjbhkcbJ29f70W0ltW/Adinx55fvwoQWxpd4C1dH9YLL9VZ3gaU9Qw05YH poNDmo0P3k7Y/WQDIev6jmMKzmtoGLj7f6U+8oG4/6/E7zm+5KYfykGAlY950oUODeh+ 9GGBjnWt7qxlVJpltBqMRg+JVNSFTCirIRd2uV78W/iuGMiEsxjUCyKmHjenhzzVgxZl dEF5X9LeIsqWzsoNu6SMm7L78thX6XyFexLeopdaa36lLeEfOeE6e/BQD0IoYCSGGvKE 7tOA== 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=JLkdB3aR8b5AzZf8mrQLfb2UlnHWewFM+noupjKQsYY=; fh=cRVyEtWgqT6YHFrnO/5+bdKlHln5zVl4J/y0CzbKtgY=; b=l5L/csadz6+YcC2nRE6dscRfeekbE8KvLSisIpro0zo3wC4IqApCJmuTR6lY3BEyKD GgUOu+X2uYz7PgBXIDsXliUhEU6MqMwQw+AsWjnODxJnan96VFjA3TlQ/FB02mrRtqmS ApG4xNsjEPIP3ZWze9f4cidkxmz/n8yHavisr0n/P0BNfa3rrTqNIwohdlB6FDj0+p09 +oGA0fZSaIF3EfGalrHbopNF9iiH6q+g2atfEeSTEUcI+7xVLpb9h565B1j9UNIUwLhE DRKKXtDssNA7czaifTbIFrZnynFBWjyXNnp1dgYvSdIIClcQtQQWygS+IaOtXGn4z8XH zgbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NojYa8rs; 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-39186-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39186-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. [147.75.80.249]) by mx.google.com with ESMTPS id r3-20020a056402234300b00557890c8d5asi14674818eda.252.2024.01.25.11.34.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 11:34:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39186-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NojYa8rs; 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-39186-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39186-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 3E4861F254A4 for ; Thu, 25 Jan 2024 19:34:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F662137C59; Thu, 25 Jan 2024 19:33:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NojYa8rs" 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 26F49135A7C for ; Thu, 25 Jan 2024 19:33:11 +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=1706211193; cv=none; b=TZjlULiKHFNJvwrTsBr/9sYuFNtGqSZ4ZmuoE6QqpxC6e9yQ4+RG4zZhXYlBeXnjtOVuO+IN8e1pkbsx4+93fUDYqnQkP43LklCH9k6xF8pxFla3Wv0o9YmQzRwVduyBUlqXsN+e/vZFhKh0BGOXvzGCjQ8kIWV8SBcULdmwpoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706211193; c=relaxed/simple; bh=z0pv7nQf3+BHeMquvzePcn+FXugfWYxDh8sD9Yk/afY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hvquHY9P9H20k1aZLO69QpAQS2owAX5AmjbqUXmufdj7qQ5vJMq5oDSihwZFpgyvMrQv7bb+hxUOJUwxdiKueHZ1/e/bAFBO6phjIoxhb0iUPLhondsNsl+wToe4dUsEbdHl1UdVQ14RYOn8k+/AfRIhyjynGho9zkgTRAsVazc= 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=NojYa8rs; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706211191; 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=JLkdB3aR8b5AzZf8mrQLfb2UlnHWewFM+noupjKQsYY=; b=NojYa8rsnlGQpAElfyYOesIjD5LETWGFcNKsiEpQUCyBzlkNEhTJsHVooaEw9ssbekUV5C nKj5qPmaEhenzPm5vXRLouSXwt5k8CEiJ+vzKkkc90iI3DdcwGxlKPgfuGCldfdrIgPtTw B+8iqA+xu/b220WkynRoazHYLoQxLcU= 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-140-gRvtxHOMNz2NEaPqxmRHPw-1; Thu, 25 Jan 2024 14:33:06 -0500 X-MC-Unique: gRvtxHOMNz2NEaPqxmRHPw-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 045F81013673; Thu, 25 Jan 2024 19:33:04 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.193.154]) by smtp.corp.redhat.com (Postfix) with ESMTP id 59F4E492BC6; Thu, 25 Jan 2024 19:32:58 +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 v2 05/15] riscv/pgtable: define PFN_PTE_SHIFT Date: Thu, 25 Jan 2024 20:32:17 +0100 Message-ID: <20240125193227.444072-6-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: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 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 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