From patchwork Mon Jan 29 12:46:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 193451 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp542690dyb; Mon, 29 Jan 2024 04:52:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBtYvwEJ+fRWIOGjczV3PIDp4Lmc9uQAQ1cycvBePxvG8cXGHCw8aGrPSLECjg/37TrGl2 X-Received: by 2002:a05:6358:6f97:b0:175:bed1:e0e7 with SMTP id s23-20020a0563586f9700b00175bed1e0e7mr1974962rwn.63.1706532728117; Mon, 29 Jan 2024 04:52:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706532728; cv=pass; d=google.com; s=arc-20160816; b=1FuPnkEQeBeVGgAjt2h5W8GA5ppVad717pi/xP7614uIsp3DHOFB7k2Vvfb5sGXD71 G2kfrxR0o29zE0IxAwK2p5nH7m+yT3GAfgaUrCex69Utb5pAL8fJ0eAsT30If1SBtRwZ 4FEEUsluS9dgHg2HwmJAkUtWlCgluh79arUJHk77mKCkj6of5ojmUMtKzSNsF/gaCbv6 l2jbKxrsQrReA058L7L3jA/2vYW6qWv0jsBvM8PBMHpu5cEe9DQHWdb4wWRWObx6DL+F +kAJsa3STconRIiP5PtZ31pmRTSNyCS2RQEJJDC6+K8MrCXzKyn48EwxPvCGoF7+8uBZ bfcw== 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=8viUIwfAqrpZYGrKXKN1ylfsdDoFL9veEN2EDkxcPF4=; fh=lZsZCQsH4ia1jFJuQK1Gi3cXLvdnrj+ub8bSs7lwlcw=; b=wYu3s4VkE0MBrE9+JtVxsMwRk7VbYQEXTUcirrIUb29ftgv9AHsFZV9Tr02Mcyk8H0 8pOVEotPQKq2EWzO3g3TAyzGJSZ3xrpU9u20l0YQPhXVQOrE8dKmYR0bzcv2fy4FYBkk O9ewMQ2ZttTmQmk9k95xEAl2F6vgFhBg8o8S4zP125C1Wm7ilxvmvZTD2ddli/BSnQKJ JP561X5OyRYENuFbCffEdnh0qiPqiM2o9LDuy9k1nC29b935meZdZkVa4ranxMCCK922 m6VKYP0RKHti+2TAvdAiyRGd16UBI5hBtvDeusiL8az7gDoyX0i4LoxVlD25/temWu3v EI/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvXuUCDJ; 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-42721-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42721-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 9-20020a630009000000b005c6606d5b9esi5678869pga.572.2024.01.29.04.52.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 04:52:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42721-ouuuleilei=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=LvXuUCDJ; 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-42721-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42721-ouuuleilei=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 D715A28647B for ; Mon, 29 Jan 2024 12:52:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D702864CCE; Mon, 29 Jan 2024 12:47:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LvXuUCDJ" 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 AB01F63500 for ; Mon, 29 Jan 2024 12:47:47 +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=1706532469; cv=none; b=SQoyMxGgSJk1TJzso82MqQougFSjd9Ma2SCUCWOf81uC2E1zdRUJXferoi5cqIsF6CaVb7vkNdo8om+iCIE2eIee9qQ2xLHM92KJSGYm1P6lSL5gXeDAe5959uLSetDrHKi/j0+8L1d+rK6sfPpiPyHErLZNaQco4BF/dYA35VU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706532469; c=relaxed/simple; bh=CdXM7auQEwBWbHk51llBEYb7b12MNO5uP/hZV5bh74w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iiIXR6Tmecm02GY4C9mUS4fMlyDjAVKyfNvJm2H2OUiAS3zBsCYBX1pgfzLyAVdIMGS+a62c2jsOHJjxqntkXRUbrxKyD2nh95PHtKVK2QAlPIt6IerMMyWKFbuqY7Ucx6YXdvPuXd3s2CxxoTjPW3mFaiikuVuw0jOPV2bP754= 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=LvXuUCDJ; 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=1706532466; 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=8viUIwfAqrpZYGrKXKN1ylfsdDoFL9veEN2EDkxcPF4=; b=LvXuUCDJbOCG7QjnWTXI/qsfgT7GBB/gl0rcBgvPhB2hTiiHkXprECEnOLW2lrVgoNoS27 +KDtS1bBl7hV2gnI3f7vubeul2Y9tVN0N87gjaVgYb0x5pp8GHgCD6dvHACTB2z7bidU73 ksl+QHfmjYIiR+4235TEKFU9gkYBCNI= 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-513-FOOOGCS9Nq6C0wiBz3AC0A-1; Mon, 29 Jan 2024 07:47:40 -0500 X-MC-Unique: FOOOGCS9Nq6C0wiBz3AC0A-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 ED2DB86F122; Mon, 29 Jan 2024 12:47:38 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.194.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 802EB8B; Mon, 29 Jan 2024 12:47:33 +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 v3 07/15] sparc/pgtable: define PFN_PTE_SHIFT Date: Mon, 29 Jan 2024 13:46:41 +0100 Message-ID: <20240129124649.189745-8-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 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789429262124017072 X-GMAIL-MSGID: 1789429262124017072 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(). Signed-off-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index a8c871b7d786..652af9d63fa2 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -929,6 +929,8 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, maybe_tlb_batch_add(mm, addr, ptep, orig, fullmm, PAGE_SHIFT); } +#define PFN_PTE_SHIFT PAGE_SHIFT + static inline void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte, unsigned int nr) {