From patchwork Mon Jan 22 19:41:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13526134 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 E0C2BC47DD3 for ; Mon, 22 Jan 2024 19:42:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D3E96B009B; Mon, 22 Jan 2024 14:42:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 685256B009C; Mon, 22 Jan 2024 14:42:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FFEE6B009D; Mon, 22 Jan 2024 14:42:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3B7CC6B009B for ; Mon, 22 Jan 2024 14:42:30 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DD39BA08C3 for ; Mon, 22 Jan 2024 19:42:29 +0000 (UTC) X-FDA: 81707968818.06.07A537E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf21.hostedemail.com (Postfix) with ESMTP id 26B6C1C001C for ; Mon, 22 Jan 2024 19:42:27 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Tjm747rz; spf=pass (imf21.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1705952548; a=rsa-sha256; cv=none; b=GdE2Zw/5YrSPtxJsFseql2owjTzNhb6iBBATXD6Czva6siesUA8amMdYCeXSh2Yp0U+6XJ yD/b0SXkXMYfhndw3U/qgOSIkwpSXayq36h6jduoCohXVKXfwTdkplZXshZ7euroiFEur3 hhXL3XFpogHkCieo11wctFXFFNxrskc= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Tjm747rz; spf=pass (imf21.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705952548; 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=OA1ZFxm0ba3AcXcmS+8/ecOKI3aFHalZlUfREzi3hZE=; b=1Td19w6lrJWCyKutnqD5jxxQRL24yCcuUDgtF6jpPHrTiJZHxj0hzNJH1gkV7ddbBe+smO uwW4BZwynrwHVALMeDkEndzyWaN7Z7kGgN6gqRiWgxH40JJQMBd/52STqPfeukS2pPKq7+ gzdBShx3WMQ9EzsvOpBcVSznT12RH90= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705952547; 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=OA1ZFxm0ba3AcXcmS+8/ecOKI3aFHalZlUfREzi3hZE=; b=Tjm747rzCbeJ9Nvjzpncp3ayvHRQEAB7MowtNvha+nBWZ166WxLfnlopbUNKwOf/NGghkP WPfr76RouZcxrzUuAZUtVMwqqhOpDTtMBQXejOvFdb3a9cgObVIf2q/xUoRPn04emo3cZN Vqtlw4TmtKLbsMEh0xwoPh2sDu+AeSU= 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-66-LD2D6IcIPfyJ8rm49qezLQ-1; Mon, 22 Jan 2024 14:42:23 -0500 X-MC-Unique: LD2D6IcIPfyJ8rm49qezLQ-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 72494185A781; Mon, 22 Jan 2024 19:42:20 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2CA03C2E; Mon, 22 Jan 2024 19:42:15 +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 02/11] nios2/pgtable: define PFN_PTE_SHIFT Date: Mon, 22 Jan 2024 20:41:51 +0100 Message-ID: <20240122194200.381241-3-david@redhat.com> In-Reply-To: <20240122194200.381241-1-david@redhat.com> References: <20240122194200.381241-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 26B6C1C001C X-Stat-Signature: hghm49b1bcx5xp5e5qkssmb6jhrxejjx X-Rspam-User: X-HE-Tag: 1705952547-573411 X-HE-Meta: U2FsdGVkX1+/xWa3RakOMi26oeyCH9XsEKgefmXVd30+58A/ONjseoHqG2f3vXBBiJDNNvOjQ/omRCug133EgrowwKvxvWsajwx8ZA+G2DC7JGhttfbQ/IX5eVoSDI/YiAuPtqaPWuNN995greaEA2LPsp1yuWfQwYSm42eAXRGFU37/VSSlvsubPltKL9d40k9IpLh74xR9HON0vEMVXeKWoTD4C81QaUazM8DZK6+LIZirAid7Pb6l/4NgRuq/ZO1TEqtUr+HGhbd4e1asJNwUV2y1Bb41F0AkAZQMny2c7rRtGRME7gZeKlLFZG5AG3glfPURgkjQR/yDHh8zzo7cTJuhoM5DZEPeTiT+CU75g8dsi7N4ax/6ZX3GkEx3BpvsnHAd2c0ff1XuH0j6UBnx5MmlIOB68dA4Hl0tw8hWSaeEZFKr+H7OzsX+snUOV1VbrBz1P2gvbW1MzvlTjFJh5TZBOFfKXt3tzBsVsQhWSOb7uHcnIxnGIitctkAuaZ85tovRFd+D1IKMp6wHVgff7txvQcOUBZ/Key49k4WFJXdkGkMbXT3Hnj/VIUz3NaiCwwVAMkUqj+FlanuSY8H3xZQ1p/3809PGB5X6q3f2IQTjbLG6/EZTPNy6buhGVUBs3/AztuscX/DaiXXg8qWYctijYXRFZRbzZvOPYMe0dJIdZSX2b+Vzu5UNllm3xm+bOXfAvwIHu6ePYF0ywKEL/LN0mF20ZVl+uC94QQ/7bwstvge1ATF6AdEANF6GhT8Z6TfuOqpJAk7PW3OZHzaZ/xlpLqDR8YoGG1Qz6sF6CY+5NYdbNiZ3Z5JRZvOMeCBPKvU1OxGPD/rQDtULWnXQpwiXVSPSZWM6E8g75ciPbbC8AHFu/K8VnnAontsFxYLwD1PusBOQWk3ibAoAYNIv27q3FXZe7a67Vq0JxHVBaZoLLtzFbRpxeHIoYEhKAJbdKOwZiBsp/YdV3D5 lPEb1yGd Y1Xc4Oja06tLYNz1iXH1cpLRbMPPPqfVhYaP40E8ymg0Q9g8kpoYzMU5WQP6TyuFuE3bpCif6Pgi7YZUz6XUe0saM+Qm4sOTRYzzI1RTdsB457xS76KrxzQqDzQflym2i7yQRFYVw2SJP8lO1QY0hmag3jPETgyrlvxSqIk9XvT6OU5evuF/B9qZBVwIfOy3LOf9OuaPTfoVkw6x6jjTUHJinTjn5IS1PvhLc 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 simpliy define PFN_PTE_SHIFT, required by pte_next_pfn(). Signed-off-by: David Hildenbrand --- arch/nios2/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/nios2/include/asm/pgtable.h b/arch/nios2/include/asm/pgtable.h index 5144506dfa693..d052dfcbe8d3a 100644 --- a/arch/nios2/include/asm/pgtable.h +++ b/arch/nios2/include/asm/pgtable.h @@ -178,6 +178,8 @@ static inline void set_pte(pte_t *ptep, pte_t pteval) *ptep = pteval; } +#define PFN_PTE_SHIFT 0 + static inline void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte, unsigned int nr) {