Message ID | 20240125193227.444072-8-david@redhat.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 33123C47258 for <linux-mm@archiver.kernel.org>; Thu, 25 Jan 2024 19:33:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B8F1A28000C; Thu, 25 Jan 2024 14:33:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B3E96280004; Thu, 25 Jan 2024 14:33:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A06F328000C; Thu, 25 Jan 2024 14:33:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 904CE280004 for <linux-mm@kvack.org>; Thu, 25 Jan 2024 14:33:24 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 6FC6580E67 for <linux-mm@kvack.org>; Thu, 25 Jan 2024 19:33:24 +0000 (UTC) X-FDA: 81718832328.22.0536DB8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf30.hostedemail.com (Postfix) with ESMTP id BA4F380025 for <linux-mm@kvack.org>; Thu, 25 Jan 2024 19:33:22 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=GkikgdEX; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf30.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=1706211202; 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=AR2hQWewzUwvICKUVjlsr+tzr4A8u7nsZckmD3jQawo=; b=Np861Qqa400iNNnh8GPS9Ge+4l8ijHw6ldJJv13b7FVmsE+3//VbLX56WpWkB1J7elUTVC pT0RvDKGqD6qVuR/HZiIsXYlg/BhUgl7+UhNeds73usnQzY0Xa80SCi8lpVC5Naa492rMu U9WX6i1CLL5G+ECI5LKWjezLe9NNIXo= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=GkikgdEX; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf30.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=1706211202; a=rsa-sha256; cv=none; b=mUZ7OmTo4YUe2w8I4mdR+xI7cdC5mmjNwyO2d5Jh1+F6aoGIvTXs8quHpu7ZC8kHHTSBzA Ej6TFBPgQD4J22bNDSyLhv8ifSJG2pqNXID5JTjP9Uo7u7ccIXgny/kWYvhQ8RF5lpy+AP 0KG301I1s+B1nDIPEvxnxNan+10uVQI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706211202; 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=AR2hQWewzUwvICKUVjlsr+tzr4A8u7nsZckmD3jQawo=; b=GkikgdEXW4sBM2Ma/ZADY9nwo7Ku4DjN++53HaKq5ZNwertCDT/yC6JdmwN1FZExd5geJY 1gbhVZcWNAC7PRZ2qE4lQ6vxWneBPBmosdbAYx0cw6oIcomaP90sQIla3SA1+kguXe1lrz YpsnKyt7Ob4yOrWKjdjNhF2+PO82POo= 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-353-WrT9vdwqP36DK-6PPc3Ylg-1; Thu, 25 Jan 2024 14:33:17 -0500 X-MC-Unique: WrT9vdwqP36DK-6PPc3Ylg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 459E7383CCE8; Thu, 25 Jan 2024 19:33:15 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.193.154]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2F94492BC6; Thu, 25 Jan 2024 19:33:09 +0000 (UTC) From: David Hildenbrand <david@redhat.com> To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>, Andrew Morton <akpm@linux-foundation.org>, Matthew Wilcox <willy@infradead.org>, Ryan Roberts <ryan.roberts@arm.com>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Dinh Nguyen <dinguyen@kernel.org>, Michael Ellerman <mpe@ellerman.id.au>, 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>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Alexander Gordeev <agordeev@linux.ibm.com>, Gerald Schaefer <gerald.schaefer@linux.ibm.com>, Heiko Carstens <hca@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Sven Schnelle <svens@linux.ibm.com>, "David S. Miller" <davem@davemloft.net>, 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 v2 07/15] sparc/pgtable: define PFN_PTE_SHIFT Date: Thu, 25 Jan 2024 20:32:19 +0100 Message-ID: <20240125193227.444072-8-david@redhat.com> In-Reply-To: <20240125193227.444072-1-david@redhat.com> References: <20240125193227.444072-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: BA4F380025 X-Stat-Signature: 3uohhc1o7346uxs64ky3bg41r66qzszm X-Rspam-User: X-HE-Tag: 1706211202-262960 X-HE-Meta: U2FsdGVkX1/OkuS8QIkdlECmI6i9AapevAz3n2fpXjpgcsxxMe7d1jMauBRE8UzYfyjvHE3FzYvebldUetORW4lgJoj3Vdq8AjJNbQtFXqsNh726UZhZuSiZdhSDvRpD0JU/zvaHsbQzQyUB/s/cUnSJbiKAdqcrQC6WjmTKHtAsVHW5DkSvbvEcwNiXBuvL21Mwjkq0gffbsQBX7baQsQz76+9yOJL/BXCwh4qKT/IW9k6msfL3nvrwYr1rMDd0G3A5gnUYE2J6MD0U0dPCKjQd4Hlg3ze9BQ3F5pGjhmLOSXnomZHMfzfaOb4AnrhbjSYLRoDh/pI5qiCLWtwyfkxaqnaa98t9Hn1h+d8f56+1l4IEyYfonuAUJ7j4NWXuczfaqus2977kHDCPEjn6qIx1w41UPfTE+hXwM6ESdRk2UgxXNNnSR3gtFyMHBw1leaS0J8LwsRcu7VxXUjyOnzZQciRwE67LJkqcnSR/VyA5LJ7/hY4tnyWphKxA51OCpl9yVffUJrWkt4DvYNVgS3Js+WSFsZN4A+aKTbLxdMNkP0KTcOJUvzn3AAXnbnlRvQWfpsxv/UgbEbBDeDvzS1RXbhQnE7DFXLAYLuRr+FIC0LWrvmxVAmB7diS+1ZtXUFBrKou4fzFhfpbiDBFMUrfpxyhcNMUCwWKW9ZJVDqWWYcJZgJ5GGJDy1knOPGPqjpGLNw+kG/3HV1fXc11/JiHcKjb9HlhcvC85aVcVmDdwzfHEWOhYXgWb9h8eCuHcQtEYOp/VPDscEzbkaAEWNKZcCDKfoaIZf9yUBTYaAN25AO08w/3A17lW6l8aw9sw/lMMp6Wfk0XB7/X0YRFRnt5Iyw5c2b9HG8ZazlHWyHxOxiGu+0PZvaIjImzu6WKGZFU6GIZVQAYjwNpPHsDkAa7otMr07CIRZa+jegOj2pywcLRI8Wg9LFR/NhUFHdnu7iPJBhqBYl7XJLPhClS w95cUykM 2H+5weqJ9KSLyp0GvCdAz51VXT4218Rq/j+6tObJtLNEBp/r1K8JQgnvKemdovxPhI+Q7gEjrreRLJde2dXJ79WJBir9TmstHh0wFFXJ/5sI+SO3HzSvoHQYruiCxGxAJpSojDahVH1E2pdsA1OEG7eub1KM1b1C1BVRWqaNRbxM4NSpakjA8Zwdzq5B1+r3IlcM8cIFlA1KgDE/NqQkLboIpVL53Fo/QzNT9 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 |
mm/memory: optimize fork() with PTE-mapped THP
|
expand
|
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index a8c871b7d7860..652af9d63fa29 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) {
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 <david@redhat.com> --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertions(+)