Message ID | 20230627031431.29653-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 5BD57C001E0 for <linux-mm@archiver.kernel.org>; Tue, 27 Jun 2023 03:15:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C57248E0001; Mon, 26 Jun 2023 23:15:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB7698D0001; Mon, 26 Jun 2023 23:15:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A58B88E0001; Mon, 26 Jun 2023 23:15:21 -0400 (EDT) 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 95E6A8D0001 for <linux-mm@kvack.org>; Mon, 26 Jun 2023 23:15:21 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 68C3BC08AC for <linux-mm@kvack.org>; Tue, 27 Jun 2023 03:15:21 +0000 (UTC) X-FDA: 80947062042.09.2D5BC44 Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) by imf12.hostedemail.com (Postfix) with ESMTP id 730CC4000B for <linux-mm@kvack.org>; Tue, 27 Jun 2023 03:15:19 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=MeM3v1Kj; spf=pass (imf12.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.181 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=1687835719; 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=5MMx6i8bJUxARp5QNqsq1CJUY3hOxlwkAEMcUNtK7dI=; b=xg6v4coi0VkKlH/8r6zc0LfZGyl+ncWZRqT3qIukK/0ZeRyYjdTptXfOfgxy5b6q4qqSzq TuCxfxr6IWMoPODpIwpgObuze4pQDh9+L1FSg849eGTJyFBoVMLHYGWRmD34ZJGD8uQ/Of Xl5QiVraomSscKhuIWekSVc3RwnaYYw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=MeM3v1Kj; spf=pass (imf12.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.181 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=1687835719; a=rsa-sha256; cv=none; b=WMJcQYKuTeT+zw1zWpO9TnJBxGjn2FI0+4LLdmpMmXpSpapB17OdIR+67aCkaLzNTyF/IF BK+537lKQefE5porZ01Rz5vmqOJXkE8HIm6DoG9SzN330ybFX6lWLjB77qaWgLeHwa1qMY Zp7fJUWDmfJlUschV8ubnzcA2giZHZY= Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-56ffd7d7fedso42547737b3.2 for <linux-mm@kvack.org>; Mon, 26 Jun 2023 20:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687835718; x=1690427718; 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=5MMx6i8bJUxARp5QNqsq1CJUY3hOxlwkAEMcUNtK7dI=; b=MeM3v1KjtFoJ68g67QFEF1NyVxMiMYgvdlNUvONCKTcddCTBLfXbCvjdDQ2rkMkntp NglXMwE26fCvz5F9nMSZMUxoetH1ZAcsVpi0efOXfEwN4DA6ftYlLFo1JApHI/tubC37 33sHqn+NMB2tr9HBuBdSW/hwIa8uL6U/SOUDWuLzyTAiHAPzWUOM8CjVLD+EbbHd/5kR FnMJGohaY21AmJl4Lrba1v1FCtiqCThvY8//FgKgMI5nMolrkjqa5ElszWe7So6X4/NA 29o+uMEWd5I0Ihfj0/TIUUwfyyspThDiVrfoH9mpbEwmREVQeVNhmFuIVnTUiZMir9ah 1F3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687835718; x=1690427718; 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=5MMx6i8bJUxARp5QNqsq1CJUY3hOxlwkAEMcUNtK7dI=; b=Tt01k4WES8lBJvaAN5cAVlZFaQNl1A2MHBv3HUx7hdFfF3hAdhZMbIBXDppFgHBJWM ZkpQMSYpo3gFHmSwDTRFahGh9k4dOJeOIls5ITJwgEGhftzGoAxsB9L8RdcWmGhDVqQV EI33dcAnSIpYsQLg2zGk1Ol2Oi5WPohasM9i8dtiAp8rEAtm7DqkEA/Q7dwufuwQPlFC rBqEAS13i4RNuUqUBBDxsfMBcAw+9slRhImCAkFYM9u5ZJzXjT+XcipCVKOJcv8DgOci q4txOLSh/YS7vVf5/W6Y32JfRJ0kJ55ytNdK3fPtc5wAPeK5xtp9za1dyoT+YTOQNz+R UGFg== X-Gm-Message-State: AC+VfDxOCEGvXFrDaQLlz3M2UGvlYhmdVqxnFK3lNeidLQUqpBiMxwwm QeQL+12enFmRWvTSzlFzaGk= X-Google-Smtp-Source: ACHHUZ7jG3JdEOLXHoTlHZs7iMneXhbSi5TTL08hXZ/YgCW6ZXi6BK/DGPcEgnHcQP1gwkgg+JH2AQ== X-Received: by 2002:a0d:c506:0:b0:56f:e627:8545 with SMTP id h6-20020a0dc506000000b0056fe6278545mr30778532ywd.39.1687835718493; Mon, 26 Jun 2023 20:15:18 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::16]) by smtp.googlemail.com with ESMTPSA id s4-20020a0dd004000000b0057399b3bd26sm1614798ywd.33.2023.06.26.20.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 20:15:17 -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, Hugh Dickins <hughd@google.com>, "Vishal Moola (Oracle)" <vishal.moola@gmail.com>, Mike Rapoport <rppt@kernel.org> Subject: [PATCH v6 05/33] mm: Convert pmd_pgtable_page() to pmd_ptdesc() Date: Mon, 26 Jun 2023 20:14:03 -0700 Message-Id: <20230627031431.29653-6-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230627031431.29653-1-vishal.moola@gmail.com> References: <20230627031431.29653-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 730CC4000B X-Rspam-User: X-Stat-Signature: 9j6b9b7yxhxq5geqy9tsc3zo5hrypk5a X-Rspamd-Server: rspam01 X-HE-Tag: 1687835719-807233 X-HE-Meta: U2FsdGVkX1/oBzPFMC0eD/j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HD7qg4s2WYltvPgSJNLZduFY1OOEd7SlxsPeg2mknjON3Lt++3mlDYwMVjkxYfoscdJh3BLAhPEL6TAjmluVFrKDfRxJpqDvFl9hQ7caV6HhpnFNVcmb9ssxaYx9upPK3nPLMDPykcQcUB4ixyOPy+U5hOH6zHsgeOrOXcg2oS51T8xUC0mpBBhkeON/uqZhzbVC3BgDZDOMRhgzuxNhZ9ced59V1EtPRjJDpPaO+3tX8ED8k/IiowKil+WwhUj8CREgZzMXCWAuR3jRIAYVY+e/ld9qcHn1gohkk+BZrdGdPyqszI7S6TDA58IDHmUpSyoU09D+1xJKQJ4X9cuAPNReB6eSBJ2LFRx4Beva/nrwylKpy63jvLMV8sF6N2B7msRbMXmPy4kbwKkXk/dQyRvZ/XHeLwToamnjF9ANL25UoaHUi/BUaK3kNLIgmuZSOSU1QID17NizW4/qe6J7SGDx4JTW1FelJvflUVRoMyGUSinar1HcUUTMwoaD8DosOk9Pa5rbIgvkMTKTW4i4H5j9c= 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 14d95d494958..1511faf0263c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2915,15 +2915,15 @@ pte_t *pte_offset_map_nolock(struct mm_struct *mm, pmd_t *pmd, #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) @@ -2942,7 +2942,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