Message ID | 20240122194200.381241-7-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 5A122C47DD3 for <linux-mm@archiver.kernel.org>; Mon, 22 Jan 2024 19:42:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DDAD08D0009; Mon, 22 Jan 2024 14:42:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D63418D0001; Mon, 22 Jan 2024 14:42:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDC918D0009; Mon, 22 Jan 2024 14:42:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A9A448D0001 for <linux-mm@kvack.org>; Mon, 22 Jan 2024 14:42:49 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 7F30C140627 for <linux-mm@kvack.org>; Mon, 22 Jan 2024 19:42:49 +0000 (UTC) X-FDA: 81707969658.27.24AED3F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 80E2820008 for <linux-mm@kvack.org>; Mon, 22 Jan 2024 19:42:47 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QLq3fNNr; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.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=1705952567; 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=i8imtZo6vz5POOPfjS1eojctB3SqsK1V0htYi8JXsE8=; b=Qm6NpmeJIfyMiGVHb/b2bIdyRRGFVTmUcNsLCKBZqhZlPj+zka8M9bdVeLOLBItAzN1keh rddNLE2ONoCrmOG8TJGc98q4734glxU2Lsvxbs8Hm6XXppLar1QuEQxtRECAqhZBLVOcry CejVHm7ppQCdjS3N8r+UiDCHLZc06m0= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QLq3fNNr; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.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=1705952567; a=rsa-sha256; cv=none; b=iMk95xk+zMmmlG7T31I0EV6r/1ohu1A+D2Roe9zCSYwUAMF0E892PDFEIf80T75MJRTX2u A4TeQKO6At0pLwekI8yvGlcUxfjwx5oCfniI44/pjR06C5NDKibuyA0eumapFD7fSQKkaT 599cNRTmLA3RkSIZKEFyRIJocXm7AX8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705952566; 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=i8imtZo6vz5POOPfjS1eojctB3SqsK1V0htYi8JXsE8=; b=QLq3fNNrs23wtoTAxMg2qvuT6gFwZ/3SearF/qbUqiZWhT6Q/RS3lAKbqzVfQqoALqU9FA OSwKqkLBiZVkfNEMe5mCC1n47WAUNb7b/XEHxTvMf6XSY3xlB5MOv4jklQM0teZSsV/QPL JK80f8taiwWU3C3BV24+0c1r7mbqxn0= 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-451-DdD_mImzNUSPGQ0oBD5LBQ-1; Mon, 22 Jan 2024 14:42:43 -0500 X-MC-Unique: DdD_mImzNUSPGQ0oBD5LBQ-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 7920E879844; Mon, 22 Jan 2024 19:42:41 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3EE13C2E; Mon, 22 Jan 2024 19:42:36 +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 v1 06/11] sparc/pgtable: define PFN_PTE_SHIFT Date: Mon, 22 Jan 2024 20:41:55 +0100 Message-ID: <20240122194200.381241-7-david@redhat.com> In-Reply-To: <20240122194200.381241-1-david@redhat.com> References: <20240122194200.381241-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 80E2820008 X-Stat-Signature: kadrko1hboid8gtsw5axsd3zp1hjd8b6 X-HE-Tag: 1705952567-604871 X-HE-Meta: U2FsdGVkX1/5rN7bsFwS/TnZuZFbj+wcm40PO6gdFftJ9fDpCOqhmR5JqOXkJbnXIAQkNyEDJ1a7oYCA2CUeI3X3txfNJbh9vxKt++6FbTjzXroT3Adw7oG/RL/RGA2yCO0mES09rxtnuWHuyIQ5x/V1q4XwTLYQOFIb9qBMqsOUdZrhsjyiT+2yq72v18BhaKZijHNjcr1ehbIbRW9TCdVTi6wYTAE3BNGwSlfZrdRy5rS7DlNpyk6GgBxzCMr0kCgfadDtuxtE+SFhkuNVhH5qSfaR3aBZbJx5lverR5oehpkZUGzADOTn3XrKXNuKdcNL4VIJVLsGWbWOXf5z923tqWZrjRrQDk+lDHI2PZhmQUcozPMiW8uvgRrTJTMI45r3Mo9t46pc8EU7ZJaUTgY0G5YtanyB7GrM+x1r/BkcBHaAW+/t03oO58dZ0pIMU2nhg+pWgtJ22UtSYwCq4D4i6jQtutQ4mhNgUfYwaXPopcSZYQWJvq/SAxjfhyj2nzT2bmLMmuK6+dkQz5jgl9dkXq+oTiW4UDAVFzzJzQwR5BW4ZOmf6WcJVrArzwrHpvIPQY3B3E8wbm4otSPIm1h/hKY05RJU5iCdPXaqa1fRYHL9isg+jRxwq51W3SA91ZKXWiJvTURgwoKr07BZPG8XzuMaOV8YSKv8dYurgRVEd2kKQeypLA5v05vDjShA1XNeqE3u2ZmEZvkCHOg1yxDOf1ogyAgkBJWKE2PZWEWatvGU+Ou16ZUxyt6IqNluhgeMcmMXnge2uT4NkF7IE3QkZD/+O4ShI0o3GssrUzlwdsJCFqYlS+jwOXF9RjEWDd/JyycITejOpgJd0EID/O7na+iJml/N6D2tPZd6oo0dpRHT8qTNqssSPCZEQMDebAnEENsUIqHQ3oRY9gT3r7KJ5KRyOVXAuyHJ3mlwdMbJGdOf1s9xBL0WcvtS4rv+oFf1lxt8ioS7unn3Mpo Y49JHPhn +G15Qk92A0DIpaOp/sOhmKAJxdWL2jxyEEtS7IrY5FTlZoM2Hi76y/UG1PtlIUrtHoKg5wVRl7kmSbJcERCtOyLeo0lxO0wYtYPuo2Zk6qILgs+0Kq4BVWuVDxZFO7iLxDqfjjDAj9QeIRD/A5b1B4q+coIQOrysDV8brf++O9ucIXJLjw3LKX2aj9wJpn+0DFDR3W0BjvVZC6tU5cYABCwInobmjIeYuCFgj 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 simpliy 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(+)