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: 13535521 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33355C4828A for ; Mon, 29 Jan 2024 12:47:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA0B76B009E; Mon, 29 Jan 2024 07:47:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A50956B009F; Mon, 29 Jan 2024 07:47:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C9576B00A0; Mon, 29 Jan 2024 07:47:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 79B1B6B009E for ; Mon, 29 Jan 2024 07:47:47 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 4FC9CA09BC for ; Mon, 29 Jan 2024 12:47:47 +0000 (UTC) X-FDA: 81732325374.28.01ABD72 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf27.hostedemail.com (Postfix) with ESMTP id A22284000F for ; Mon, 29 Jan 2024 12:47:45 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=D1zlh2nE; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706532465; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8viUIwfAqrpZYGrKXKN1ylfsdDoFL9veEN2EDkxcPF4=; b=yOrjGjpGWCgyRaLG0VAZBiu6RNwuKbLTOSJC2fAZJlHqwDkcx0blrtEns0GGGbB39QuUXl VwxqJjHarErxjfBWDn7Ec42uYhlu4UUn12S+HfAkEaNfmOvUin6Vg0TMQxfjTNDBYdHVjy SA9QBIMLWEHF0EvRX74/egxSqjCwXvw= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=D1zlh2nE; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706532465; a=rsa-sha256; cv=none; b=vblRnQSKoNJqnus1n3+dKAbAM6uZLPJhFnqNEx86+XdRadgzcEbi51UiqgjNOLXKNoaMJS 7EoJ67P4m31ddJbSQllbLe2GFhnL9iEH3hZv8HisBzR0EstW84C+ErLwZ6ES+eUqU2Or7T rFlkdDzAExFj476FRuB2EWpOKJQYRJs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706532465; 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=D1zlh2nEoXs7D3xjehNL0cpPtqu3sKuVnym5mzS/H9dFoDXRqjtlGeW6mS60VfyPJj9q2N 0oeehHft3wdNjAjYByDXa9iV6oSbDWu+KWlgSUM28RvrSG9oo88YsxQ/11EAvnXX3bbjoq CbBn+X2IaNSdnjoXgxEPOrEbdJPbe6Q= 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> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Rspam-User: X-Stat-Signature: 8aen1csb6jfp9zgbz53kzatj49txo38i X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A22284000F X-HE-Tag: 1706532465-617581 X-HE-Meta: U2FsdGVkX1/IksZo/Ucf9CzdJSQ2+d6oe8nRo7Rco6FDg5xH0f5wGbKjdWC2cVRUuaAX7uLpnjiv+NxGUEkdAzCZWemICp2Mb+AelLJ8vmTG81IdDZWj81eUfmTlWN4l6bMEiTNzt+Hlt+7SQrj1EejRIODVbMh78uC4m/hFtsemYfsNhjY3i76ihTxmM12ZE9WlK+XsCQ2CsO7tv2zEUkYVbxFZvUSKPYT0+UHqPeL14iwscLUZXHVZZfXupPMmeaFhHd2ynH15QYIXM28k1/iAtJzK7wss9A0ZyCnyaP4v7jGyPzvlGm+0QSYVSiIz4uPI35YblAQ0nARORdzVQpOZRzVdTaAGYwpbGaWDGxfkde4blilv0Jo0HsbOEAE9dl+Nhdah8wO+AyAf33mP/wevnY6p1SRRyfSInbX4y9sa8FvGhK+nezpw7BIJFHEiXq3LmtB6ARKugIQ0W0KuVld9m1vlYrggEX9Ctcm0tw9mzYLd1EDb8Bj+S3R0KCt3VAJ0lsfBBxtn0sJP70vscdGZsLom4JUjlcL6qTxoHHe0rEf0ahQBDjGX9PJcuTQtLGMqJfhoFzcXngtWxlZ3WUsDYqZsm2cszU1r/9TJQ/NKnzxSvBOG59eSjhmnFKSOq3yY3F30d4hhbBfa0HrAnYZKZRIWbi+X83QLmZrgOu80vL/gg9uK6zMOF3Qp853uPkwxnstJVgF5no/+Mvxklq2xKbhtSF1Mk58i3wTgFqPwQaLj+pipAlO8o51cAKeLN8PMiIY6hbIrzfVzGWYJXZs5MXt0NXKzQn2/Pc3FEQFUR1r2oTajRSTzuxdwX3w8QJ3svGvbPJ/NtEKJDh4bsAzIRg647y/HQ1GpYz9xd75DpMTKS0eQGZMKIlG5tARZHIal5fMrjhN87zAen/szmy/1mQinCwIO4f/92VXq3EXMFY8lDl9mWNC53Zk1vdTMSfGyfKeMHpJJgckeG+l JqdnrUyM Qe0I3/Y5861ric5bpx6pUKdEkykeYlH4KJwuZ/oOJAhwik/Rq1eouZpy5zpwVmP8QqvUXh6YvHVM94QW7Iw0MjYqily3t3MEorJ+kMCVMfPBS2bbuBnQq6GiTN6awsCnZVoIoAFfS3KxTY4pNZQCbox/e9Tl1FtNZRpDbe7O+ynWq3hSA+kJhp6pzRAO0u9nupXuU5Sjj6w1nhvP4qUM8JWHICqHkc09VaEIK X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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) {