From patchwork Mon Jan 29 12:46:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13535518 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 51A7EC47DA9 for ; Mon, 29 Jan 2024 12:47:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C9B806B0098; Mon, 29 Jan 2024 07:47:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C4C0E6B0099; Mon, 29 Jan 2024 07:47:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEC846B009A; Mon, 29 Jan 2024 07:47:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9DFCF6B0098 for ; Mon, 29 Jan 2024 07:47:30 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 45010A1878 for ; Mon, 29 Jan 2024 12:47:30 +0000 (UTC) X-FDA: 81732324660.03.15939E2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf29.hostedemail.com (Postfix) with ESMTP id 91CD012001B for ; Mon, 29 Jan 2024 12:47:28 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="B/7MsjCe"; spf=pass (imf29.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=1706532448; 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=L0fTElPXKbhRcKZPS8pXPd43BafZhSoj1KxvgrbHzPI=; b=Y4W4D7O3I3ecwrDc1d3U1ySfchEwF+1NvJfeLHGAiWY7ob8aVbCsQjoGFdWJEuWYSMatIy oIBo3b72NKB/lS5Zl+ezzLjwxl8XJ8bh4jgrFcYEB/klGRzguXsuJJJVkp1my9lQzp9UQo X7tEJmg/uac0zuS5KJZqjYYu03+wKzY= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="B/7MsjCe"; spf=pass (imf29.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=1706532448; a=rsa-sha256; cv=none; b=eGrxMtiHS47fXVK+TxhoP25cn5HQ08Z+XpFL6ippRbkhX6CrZl7R7hxu3uOtowZw86HPbF YULZpUvOkaCatRUL1fAloEBDKfrewuRx6HrK5HOFkpiD8vqqib86ZpyCdRNK8vi4sHgOSY N4RzjSq5TnOFMAFjwCeZ/3QQlZCZhqA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706532448; 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=L0fTElPXKbhRcKZPS8pXPd43BafZhSoj1KxvgrbHzPI=; b=B/7MsjCensDAWyR4imcgMAg9gIs+ROjS5MOjNdf+aprzTrLkRgJjWE9l5i9cWv1UTXljq3 HDbwUrP9QE8xR8HZawDgCwzYRhqc31U9BObaB/tKaUqOrtSYhf5Vig0h9fK6AM0mMBmSa3 hk49rzYFPVjW+5N9OyZEVmS8PzFQaWs= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-176-gZS2zg1RPJqdlEPYFP4sAA-1; Mon, 29 Jan 2024 07:47:22 -0500 X-MC-Unique: gZS2zg1RPJqdlEPYFP4sAA-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 0C24D3CBD50A; Mon, 29 Jan 2024 12:47:21 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.194.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 850D28B; Mon, 29 Jan 2024 12:47: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 v3 04/15] powerpc/pgtable: define PFN_PTE_SHIFT Date: Mon, 29 Jan 2024 13:46:38 +0100 Message-ID: <20240129124649.189745-5-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-Rspamd-Queue-Id: 91CD012001B X-Rspam-User: X-Stat-Signature: fwqonijb67yjws444doitwkdsn93zosd X-Rspamd-Server: rspam01 X-HE-Tag: 1706532448-357161 X-HE-Meta: U2FsdGVkX19Tskf8/5iDk6pcw8k2Zppl8Qq5RXyxpnO/jLGamNteTVbkP5Tvd2eOVYlYHkc8s1RtPP+a9wTm46GVDC/42LptfVdbW04yIU44FVxWLMv19bNafqz5yJGV9ycDIhuZfZdjdgJdQE1dvPvt16vc3IE/j+7u8KHqlupfnpXl+0HnShyxc9mC8UfbXftJCuhNwyBKdITY+b9XsVYypcHHeDT9HzjDZDezyi3TBKPFPh9VpJ1xga+wru2E0RVOBN1Qq3NjckDdaUv25xD9zEWX6RK2KKbby8nPpGRy5LAbKybKQkKuUQSGaI+OU9faRQjGFyu0PhcmzhSG6Gexe2pwoNV3G8AZzIyhGTD4KOQ2KykOvtGsR7xLiNYeTJr0fFp/ihgdMTG+tG6Nz0DKUEPhWJhZYwAJL4Nl8DS9GBbptseBNFAMaHcTtIGJhCkwtUEHov5eVO6+rxTkih6As8u71oBpH9R+gqa+4Ym6ugoK/1dtHKIK1BpvHO104sQH8HXzjZlaGROebRXC5UDFU9jc6UOrj7ibdPjg926smFzvLgDPtn+Qn61jKPZCN5BmxB3kVNkWObdQJnrFx3P/4ZYO1zKXZhHAXKxw8xr6O6pkicEoQbZ4jhNf0mveOnZMEOwHxX4gQvCCtgGa09IRy0IQWtOdkhmyssjDkVWpfbLaYnkMzG6BIgIkkqa5TeNINXu/UKEqQANNC/9cN00iYc3EKBcHPpKKAK9+w+xNnwwLU6DnZUSp3sejWNhOiGUb8C1JT2T8iiRPOkG/K40ZJ0BJYSwd4+CbEUKi3VpI+k0Ut5n3lV2VX+Z7YQzGrm0flSgtFaSRFvbrdSsOnsXhSwjHgiJKgITU1JLqjicveue7ZodFaxGmqEYraKhMe1YbojUPOjIqFKw6X6hy7LFHOa5LeCK2Uxtk9NuU0tdNrjaTxfiEl3g8brEyJSwV5Ox3bCyiMorBpvkksse QPr3GgVa APP5tTeynmThIq30Balc2xrS5X25i2Qv1lycLzvl7v2tXwgNhYH+0muCGSqyV436cc5nhEjkBlJAAhp7XlLXelE0ivB13JuC4bDy19q4y1MsH+1uUhmUYJNNgongIKQlkke9YMndkIz8kkTkQSMdvvbG3aLwgRI6VHWhTLdsztPc33FgTUTEvxw/cDUP/Udz4TSeH5IaU6SwLL7H31k9i+Do/dWlPQcUCLHHa1BnsSdMtWM3lSTv6RVBy25hrv72zhrpbGJDElPmJjI68/gECsvUwGQ== 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(). Reviewed-by: Christophe Leroy Signed-off-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) --- arch/powerpc/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 9224f23065ff..7a1ba8889aea 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -41,6 +41,8 @@ struct mm_struct; #ifndef __ASSEMBLY__ +#define PFN_PTE_SHIFT PTE_RPN_SHIFT + void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte, unsigned int nr); #define set_ptes set_ptes