Message ID | 20240202080756.1453939-6-ryan.roberts@arm.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 81F14C4828E for <linux-mm@archiver.kernel.org>; Fri, 2 Feb 2024 08:08:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F1D06B0082; Fri, 2 Feb 2024 03:08:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A1D06B0083; Fri, 2 Feb 2024 03:08:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 090BD6B0085; Fri, 2 Feb 2024 03:08:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id ED10C6B0082 for <linux-mm@kvack.org>; Fri, 2 Feb 2024 03:08:37 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C6D40140F2E for <linux-mm@kvack.org>; Fri, 2 Feb 2024 08:08:37 +0000 (UTC) X-FDA: 81746137074.11.ED11A0D Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf14.hostedemail.com (Postfix) with ESMTP id 35A06100006 for <linux-mm@kvack.org>; Fri, 2 Feb 2024 08:08:36 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706861316; 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; bh=AwvDF9Q3mfZgddP7u26CnNByjWvMvI5KLwLV5SoUP/M=; b=M3mqg9cYHpctq++ko7Tvc7Q1FMOxxiUUZBPObCkVquuXkeyHHkS/4c7OPw/JLOwqAF+OKA rdiSTc0hcFwil1jFdhHGTF9IRLr8u6I/HLvOPo2h0iIsvJTucnuyhQMd0T39Dkb45d8xov FaVUGAwB0GmsnvbWSg7hwuTlVeRxI/s= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706861316; a=rsa-sha256; cv=none; b=tKZa4kG6VV7WYMegPFaoj3wkO1trEsrPuGscZ9LxGTIq/3L+g7xIv48We7i58IzMPdTcvV uuxTxhNWN/d5OXW3edSpArN/CfDVdPg7dPQ+S6MKFMuhG7PYvECxLOzmNZBl/I9SwiCWbt ejjiy69Es9AvnyxOtjEYdaRs/DOrHHQ= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BF9921764; Fri, 2 Feb 2024 00:09:17 -0800 (PST) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D3F633F5A1; Fri, 2 Feb 2024 00:08:31 -0800 (PST) From: Ryan Roberts <ryan.roberts@arm.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Ard Biesheuvel <ardb@kernel.org>, Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>, Andrey Ryabinin <ryabinin.a.a@gmail.com>, Andrew Morton <akpm@linux-foundation.org>, Matthew Wilcox <willy@infradead.org>, Mark Rutland <mark.rutland@arm.com>, David Hildenbrand <david@redhat.com>, Kefeng Wang <wangkefeng.wang@huawei.com>, John Hubbard <jhubbard@nvidia.com>, Zi Yan <ziy@nvidia.com>, Barry Song <21cnbao@gmail.com>, Alistair Popple <apopple@nvidia.com>, Yang Shi <shy828301@gmail.com>, Nicholas Piggin <npiggin@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>, "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com> Cc: Ryan Roberts <ryan.roberts@arm.com>, linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 05/25] arm64/mm: Convert pte_next_pfn() to pte_advance_pfn() Date: Fri, 2 Feb 2024 08:07:36 +0000 Message-Id: <20240202080756.1453939-6-ryan.roberts@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240202080756.1453939-1-ryan.roberts@arm.com> References: <20240202080756.1453939-1-ryan.roberts@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35A06100006 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: tswsfm19nd7sny9poamzryo13rhmgodx X-HE-Tag: 1706861316-330789 X-HE-Meta: U2FsdGVkX1+eYVTNN4P02roWnsnMd/8iFRGdbQGaJSsxBHG34R/4QzjgO73fHZjAM/dAinEcwuWSEVy9e2FVadiXUKXDjdguEFyB2d6VlD5ZaO2ddvxLvWQ8Vv0IZWjp86DHuXr68uDjWIpbSv+/0b79VIu0TNT0X4obwI/I1Z6sMgEF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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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Transparent Contiguous PTEs for User Mappings
|
expand
|
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 9428801c1040..6a6cc78cf879 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -351,10 +351,10 @@ static inline pgprot_t pte_pgprot(pte_t pte) return __pgprot(pte_val(pfn_pte(pfn, __pgprot(0))) ^ pte_val(pte)); } -#define pte_next_pfn pte_next_pfn -static inline pte_t pte_next_pfn(pte_t pte) +#define pte_advance_pfn pte_advance_pfn +static inline pte_t pte_advance_pfn(pte_t pte, unsigned long nr) { - return pfn_pte(pte_pfn(pte) + 1, pte_pgprot(pte)); + return pfn_pte(pte_pfn(pte) + nr, pte_pgprot(pte)); } static inline void set_ptes(struct mm_struct *mm, @@ -370,7 +370,7 @@ static inline void set_ptes(struct mm_struct *mm, if (--nr == 0) break; ptep++; - pte = pte_next_pfn(pte); + pte = pte_advance_pfn(pte, 1); } } #define set_ptes set_ptes
Core-mm needs to be able to advance the pfn by an arbitrary amount, so improve the API to do so and change the name. Signed-off-by: Ryan Roberts <ryan.roberts@arm.com> --- arch/arm64/include/asm/pgtable.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)