From patchwork Mon Jan 29 12:46:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13535516 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 D9640C47DDB for ; Mon, 29 Jan 2024 12:47:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 597166B0092; Mon, 29 Jan 2024 07:47:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 51E976B0093; Mon, 29 Jan 2024 07:47:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 398926B0095; Mon, 29 Jan 2024 07:47:16 -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 281936B0092 for ; Mon, 29 Jan 2024 07:47:16 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id F1B2212010C for ; Mon, 29 Jan 2024 12:47:15 +0000 (UTC) X-FDA: 81732324030.10.7CF1B3E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf06.hostedemail.com (Postfix) with ESMTP id 5CF1618001C for ; Mon, 29 Jan 2024 12:47:14 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QntP4EtW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of david@redhat.com designates 170.10.133.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=1706532434; 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=dZBuztrATUgWrwPaWrq4xl5RtiXYg83ssHnQD4Nso+0=; b=2PKZRDXR/fvY+0SZJ/vDrKRNTzKn+PW8AoBWsoO1Bzu9cDg2I3YevUgFkh8LPRKO8hmf5G GrbeLPdA4U2XiCFD7AZe1jMA5IfdNqOgIUlGsdMmuxZf1WC8ZctNJZyijuk9kHfRJUXTRh ymWdH4fvKqF6g0VcenvRASJO8LwdWsY= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QntP4EtW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706532434; a=rsa-sha256; cv=none; b=s4RDXFT/8EnsCBAUixD7enr5yYyTYdqxSK+EQCpkHJSv2z7kJ1XqGpCKm3eGFw/iGKEF79 L/wN3bqzrEmrP3fPGVmUjTDK/nAWbhNJoEyCWYUef6oHw2ZpnMAS4fbnKVS1DJwf3GZBQ3 maVa0N1taCUKssO1Zk+Ehuvfex89mNs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706532433; 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=dZBuztrATUgWrwPaWrq4xl5RtiXYg83ssHnQD4Nso+0=; b=QntP4EtW51BYS+iiMun9hx+iE4+fCp+swcMqpbe7PxmcZasC02MkCoozks4XscqHA+WQSt mqUo04VixYCeCHXHpPwgrsDf287lFlQFPBMuCyk42X44Up74sLhHcoE6/pUWTGgoKXD+yV ae+Qyke0f9BXYa+jDf6fe7T+PYO/Ry4= 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-662-iEa3Fx0fMcCsFoiq-is6nw-1; Mon, 29 Jan 2024 07:47:10 -0500 X-MC-Unique: iEa3Fx0fMcCsFoiq-is6nw-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 D2C1F185A783; Mon, 29 Jan 2024 12:47:08 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.194.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B5E5107BD; Mon, 29 Jan 2024 12:47:02 +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 02/15] arm/pgtable: define PFN_PTE_SHIFT Date: Mon, 29 Jan 2024 13:46:36 +0100 Message-ID: <20240129124649.189745-3-david@redhat.com> In-Reply-To: <20240129124649.189745-1-david@redhat.com> References: <20240129124649.189745-1-david@redhat.com> MIME-Version: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7ZlNBlzhW/Q9DmwKnnS0Crj5M+K5wq2WRW9MtxRED/zI 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/arm/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index d657b84b6bf7..be91e376df79 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -209,6 +209,8 @@ static inline void __sync_icache_dcache(pte_t pteval) extern void __sync_icache_dcache(pte_t pteval); #endif +#define PFN_PTE_SHIFT PAGE_SHIFT + void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval, unsigned int nr); #define set_ptes set_ptes