Message ID | 20230417205048.15870-6-vishal.moola@gmail.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 92D69C7EE21 for <linux-mm@archiver.kernel.org>; Mon, 17 Apr 2023 20:52:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75CDB8E0002; Mon, 17 Apr 2023 16:52:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BD30900004; Mon, 17 Apr 2023 16:52:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5ADBA8E0003; Mon, 17 Apr 2023 16:52:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 41CEF8E0002 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 16:52:55 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1DA7E1205E4 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 20:52:55 +0000 (UTC) X-FDA: 80692082310.20.CB5ED6F Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by imf30.hostedemail.com (Postfix) with ESMTP id 4607F80013 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 20:52:53 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=IRDdSASc; spf=pass (imf30.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.49 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681764773; 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=BPCTGsUKFtNZ0E2E3gxAeEJL+3qovRd//xVc9xUETqc=; b=DgNm6nr0uryvmZt9LUCdf11pkVn5Oj/B4UO8TnqjG/Y8c3fBfAms/rw1zHhfr5dQvlJ4H/ bLkpXJKQ1NA3FJo/nUJUGx7irZpHBrQ8Ty7FpKx7P8klFujI4/Iy8j2Wm7+SUhMMRgiy44 braExKyEM4BI2gb/gmt4rAdtB3e73Dk= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=IRDdSASc; spf=pass (imf30.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.49 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681764773; a=rsa-sha256; cv=none; b=iOsrHxTCx/3+pow3OcSLo7ZVnBPvgnv/mw9LQEh+M9fG8KFNbPKS4egvPQP1N+HIBdL1Ic 9m2p7qj3nbbbKUQug6xlSXCuVSbOJR+fm+uK+nM0DDB6impVJYjehCsd5yDtyLx948YxeP Gx6meqZ593tBTwmwPyKU3ZJaok31WoY= Received: by mail-pj1-f49.google.com with SMTP id kx14so7222039pjb.1 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 13:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681764772; x=1684356772; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BPCTGsUKFtNZ0E2E3gxAeEJL+3qovRd//xVc9xUETqc=; b=IRDdSAScs3TBGztRzu6QZgH4fMR7/UKueaVS3DDhFsZMLZlJQUDaWkKiPXvov39z8Z bssT73UYUy1LP7uOeEalBEo3irDXhaxWlDKHCjJjWa82XbzBt1YrruOwks0GGaa/KE2/ kcH9ajFlIINgfw2e+eWdEuaQpWFwhb8tF79JjCU2EAC5A/73X/TUfQV/8mop72+F/v41 nZHSSM2ss9/OewEDYIYb1Iz4F1hF7m8KXVNPHD0iWKxsJnaQ4CmjrVdNW0xNgbwEICJR VACO7VFEKZxOIvTtIDcu6wtwdqmMEpSRB4owcroJF6TbGx9VSAN4uiN81drhHklILqhb p9aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681764772; x=1684356772; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BPCTGsUKFtNZ0E2E3gxAeEJL+3qovRd//xVc9xUETqc=; b=UiWLa+oHn3w9QTrjDQmJx3n38prvgVdFGt+nLXRlb9pGEQdYrzxfoMJSmPJCJeUSea 5Uz8P1f0hCA7BwqawAiFe5h0TnYrKurO4SiSbLDj1ouZWTBE4RFvOniRUX5qSAkT7sSp cYbWJNxk4ykIEyeZjHrtwt/9tWnQLXuLC6BNfM8iysd+DX8oLdX0MTVzIRPOF470vUXd wbYGxDPhvK/bZ8e1HoQYalGWIRqyMjPNADLsLCvjrdPEgZtmq1Y3bTocVM+Fa6z8ZGLz CmvI+Ig0wt1KQQX22rMAAyDJiWIfDvWav9m+c3sENpZjO3rxsbfrpQnMTcGN4K0LN8u0 p/8A== X-Gm-Message-State: AAQBX9fbD4BBQD02Mn8gpZWF7DCdY7UTNqOIoAemPTjCXvmg1mywuDxo XStrFMIOfPHcMKEukMClLRg= X-Google-Smtp-Source: AKy350bms9aSjWgOwaAnzsnpGuFvcEqsOo1myEWAVSaCBXxzFAqV0lCr0DmPVe9wT5EHiIOY8l5jIQ== X-Received: by 2002:a17:90b:f84:b0:246:fc58:d77b with SMTP id ft4-20020a17090b0f8400b00246fc58d77bmr15834371pjb.44.1681764772342; Mon, 17 Apr 2023 13:52:52 -0700 (PDT) Received: from fedora.hsd1.ca.comcast.net ([2601:644:937f:7f20::c139]) by smtp.googlemail.com with ESMTPSA id h7-20020a17090ac38700b0022335f1dae2sm7609707pjt.22.2023.04.17.13.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 13:52:51 -0700 (PDT) From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com> To: Andrew Morton <akpm@linux-foundation.org>, Matthew Wilcox <willy@infradead.org> Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, "Vishal Moola (Oracle)" <vishal.moola@gmail.com> Subject: [PATCH 05/33] mm: Convert pmd_pgtable_page() to pmd_ptdesc() Date: Mon, 17 Apr 2023 13:50:20 -0700 Message-Id: <20230417205048.15870-6-vishal.moola@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417205048.15870-1-vishal.moola@gmail.com> References: <20230417205048.15870-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: zo8z9dui75z5piutx8hgpzga7skfxpd6 X-Rspamd-Queue-Id: 4607F80013 X-HE-Tag: 1681764773-591829 X-HE-Meta: U2FsdGVkX1/WZswlp0/xy1j66OdIPkROPVbp7LWLlTK1wIEdDDgcKUL5nGmrCNM4cf1MhnQBqhVs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QkfGx5jiNWwP6zAXFQfEWqLI8XZA8sXjtIb6nDqQ8aS00r6YziblMGcJgfwYUJh9WvojoGKLZWxh1I39JFNZv2zRb3yKIO0ozp61Pwu8SsDtYZpF3qm3+NdjtHqDUZx+UrqblP6fgfy5lGHow3FUNZ1oUoKRmuw5AFiCKjbFvTTldT1KVFkTGO/iNm/GrzqlPx1jzIghrz/40RBARyt1cuMsLouYqfZnJGE1FXeobGluXxMmfigdQMmFkACD7z0ULAMGwaKRDKzIW7Iw+TUNyXeD+NAXDNWfKruoBwXOiXYd8jLyE6M1jE6hQIdUP5nRomNrbVl7EZW4u9B6tyVEG6/yax+DL6Pa5w3gNso1/xbH4d8Thi9TfBTlNQj41h0YcmGzURKz+pM6KGeFfxMm3Sb6+4qezABPFIrTS2BNwA== 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> |
Series |
Split ptdesc from struct page
|
expand
|
diff --git a/include/linux/mm.h b/include/linux/mm.h index ec3cbe2fa665..069187e84e35 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2892,15 +2892,15 @@ static inline void pgtable_pte_page_dtor(struct page *page) #if USE_SPLIT_PMD_PTLOCKS -static inline struct page *pmd_pgtable_page(pmd_t *pmd) +static inline struct ptdesc *pmd_ptdesc(pmd_t *pmd) { unsigned long mask = ~(PTRS_PER_PMD * sizeof(pmd_t) - 1); - return virt_to_page((void *)((unsigned long) pmd & mask)); + return virt_to_ptdesc((void *)((unsigned long) pmd & mask)); } static inline spinlock_t *pmd_lockptr(struct mm_struct *mm, pmd_t *pmd) { - return ptlock_ptr(pmd_pgtable_page(pmd)); + return ptlock_ptr(ptdesc_page(pmd_ptdesc(pmd))); } static inline bool pmd_ptlock_init(struct page *page) @@ -2919,7 +2919,7 @@ static inline void pmd_ptlock_free(struct page *page) ptlock_free(page); } -#define pmd_huge_pte(mm, pmd) (pmd_pgtable_page(pmd)->pmd_huge_pte) +#define pmd_huge_pte(mm, pmd) (pmd_ptdesc(pmd)->pmd_huge_pte) #else
Converts pmd_pgtable_page() to pmd_ptdesc() and all its callers. This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> --- include/linux/mm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)