Message ID | 20230501192829.17086-7-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 6EE9EC7EE21 for <linux-mm@archiver.kernel.org>; Mon, 1 May 2023 19:28:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 654B2280005; Mon, 1 May 2023 15:28:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 60802280001; Mon, 1 May 2023 15:28:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4578E280005; Mon, 1 May 2023 15:28:46 -0400 (EDT) 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 3351D280001 for <linux-mm@kvack.org>; Mon, 1 May 2023 15:28:46 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D648A8085F for <linux-mm@kvack.org>; Mon, 1 May 2023 19:28:45 +0000 (UTC) X-FDA: 80742673410.02.2271CF6 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by imf11.hostedemail.com (Postfix) with ESMTP id 079E040004 for <linux-mm@kvack.org>; Mon, 1 May 2023 19:28:43 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=lFLswDg0; spf=pass (imf11.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.170 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=1682969324; 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=0Ii9PvRdhTMRqBop+JFdKAWa6G/XpZkmB9p8iHmrwUc=; b=Ply6+Ow1EH/19RzMBd8KT09G8oU9Psz+lwOprimv1YIi89BKCpwOP3rO752PhnYKQDDF4s 7K6FutjuXZWXGoEq5EMixN5CNIGliSVVchhI+jpA3CKPPtl6QsJDMT3avCvgiAxU7t0Hd7 md0bcxaqdWyVfPU9yRTASOTpUOz+nC0= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=lFLswDg0; spf=pass (imf11.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.170 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=1682969324; a=rsa-sha256; cv=none; b=s40Q3eGEfzlcGSBIYtG0oDXMiDoF5DeZ8C8STOS0QnmO9APUD/LLNgGRrFd6pgFkGCyxIp IcHNgaoPp8t+poTuim1xFDRWT0uWGRok08MBJmoIicl5rn2OksqwFf+B1TUF1XOwLdgLU3 o/x2qZOr7tKwNYHBen23vsiD1rM9308= Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1aaf91ae451so11829945ad.1 for <linux-mm@kvack.org>; Mon, 01 May 2023 12:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682969323; x=1685561323; 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=0Ii9PvRdhTMRqBop+JFdKAWa6G/XpZkmB9p8iHmrwUc=; b=lFLswDg0HvrPkF+dtbJhg/asaCBgi3e00w4opfv2mri4GHWG5ahGHxm9sLAnqC4qbq cQ+9MPTjwHhlk51h4w8lOE5zFHDICMVPmNnmwWW2l0krumAZ2PDeWC1WEjJOX3LShLcV g0uvqMJBbig8RslrcZc6EAJCiGxazADIIfKt9bAt8yGDMo+5nIH4mdhXs+LaHQV1OVik U1EjmbMLOLA/7Pwt5TKTUK+w95+W73jVDYdL+HuxsLXipLy8KET4HB50FeUWTlZzXbc3 qFSctTNSvV8Q7v0NapgoBkUZ/cCAkZoFPz8ver9uL6iYj4+bfmoOnnABcA11qHjnQcrq /yHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682969323; x=1685561323; 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=0Ii9PvRdhTMRqBop+JFdKAWa6G/XpZkmB9p8iHmrwUc=; b=cQkSZ7NbZBuHvn5ezFgbvsTRtwicu4XdyeZLN8XjI4v2iPv4bXdgBgwFCSzUW8Hqd/ CaPD2pKGQz7tzlaPgL4STjEbneIYEjxK3uQKVzj3mrDYi6OLuMyi/eF97Ja/DTdB02XO piYCgbOEL6EILEqyd6PYKQNL2AvrkdmAMiMjQ7/ITRrFCHHtaOVxRXFC88XW2MpdMLQN e+OlYNZg9AJI5E6b87tG5lPV2PZVIPWlmqG++/4vFXg9irrV6HuQTymqgL8s5t7zjj3e TxOpF05v9rr30R8xSqKFEzIzRAZ7dY154i5dXffck0vYJFqjTs1PkHmqodYV2CPnrl8j 2YQg== X-Gm-Message-State: AC+VfDznt0dcirK9tpyYiL7eb7xTVrCmx0U3UlZHh3Gyvzhwvfr60cDp ElqPTAy/am9IStEjVNR3HKU= X-Google-Smtp-Source: ACHHUZ4gWlsAH/48zhDdvicQeallszzZORdrHEFL4BiABQ6zj3x4/LHvqIQGrX0uRjqorCk+ulIxBg== X-Received: by 2002:a17:902:e805:b0:1aa:f6c3:ba24 with SMTP id u5-20020a170902e80500b001aaf6c3ba24mr5259994plg.4.1682969322807; Mon, 01 May 2023 12:28:42 -0700 (PDT) Received: from fedora.hsd1.ca.comcast.net ([2601:644:937f:7f20::9a2c]) by smtp.googlemail.com with ESMTPSA id u8-20020a170902bf4800b0019c13d032d8sm18175622pls.253.2023.05.01.12.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:28:42 -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 v2 06/34] mm: Convert pmd_pgtable_page() to pmd_ptdesc() Date: Mon, 1 May 2023 12:28:01 -0700 Message-Id: <20230501192829.17086-7-vishal.moola@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230501192829.17086-1-vishal.moola@gmail.com> References: <20230501192829.17086-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 079E040004 X-Stat-Signature: x3tds6zrrwrg9xnzf6oosae83wmom6ae X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1682969323-197998 X-HE-Meta: U2FsdGVkX1+rAdnmpog66T+pSdGBO2RJsipi/JycncZ1R+AKzMKW8kuJ4ofGUh/BFuc1jRrtASthPtcWwSnW5qQgprrOEgReTdESuFLSpijVV5fUtSC2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m2Z2RATTyMcF9HP/qYvDWKioxyYuBx48/9BT0F8KqrjXTfwlnFBiAO6VjXklcUhJcjc6wNllJCl+3BLNHiilJWoZaQq4LDG7UhIf+gCiLugbW9au6vjApcraTW0mwa0Eh22R5Lu7zYo71u/lNXf85lcw5cZjAYFB3cijD75Kk1bbq5NgtnTeTnV7DPRwFijnhsUmOtHcQYsIPhfGon+0izRH8jHyljsZ1nWGWk+6AJVVwQR+V+gruZqcAzRqIiMMQVHTyrzyGNSBeMGInLqgqyKrv1lmrKkU8c1SY+gtDvQTSXm1la6tg7LuLyIk7cYx1ZgszaMsXCKoaNmGXXozhL6yLtoSgobFmjPp2ywAH0= 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 258f3b730359..62c1635a9d44 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(-)