Message ID | 20230622205745.79707-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 7B21AEB64DD for <linux-mm@archiver.kernel.org>; Thu, 22 Jun 2023 20:58:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17E158D0008; Thu, 22 Jun 2023 16:58:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 12E5F8D0001; Thu, 22 Jun 2023 16:58:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F37268D0008; Thu, 22 Jun 2023 16:58:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id E43FA8D0001 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 16:58:09 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B26E01A0234 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 20:58:09 +0000 (UTC) X-FDA: 80931596298.19.460766F Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) by imf15.hostedemail.com (Postfix) with ESMTP id BEA45A001C for <linux-mm@kvack.org>; Thu, 22 Jun 2023 20:58:07 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=UdIEW49a; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf15.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.210.51 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687467487; a=rsa-sha256; cv=none; b=Be4wBD9tvoPp5grtVjdJBJlgvh3kdPJY1tlcsfLscyx067vZgzuMjBooFUHEjbhcZAmC3b 9aWmizkxehhkEKTM0xtpydZ9P/VU5gDH23zv3Grpsit/okigYP+mMUCMYw1obatvv1OrSe YgrFUxoA+jN/PngsCF5Bsgh9PskrD/I= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=UdIEW49a; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf15.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.210.51 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687467487; 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=P2qjxBiu3vraGRg3SIdzn25QUgv4P6tQg/QNd5dWVUfcqucDmKpmVImku7Fw1v9Z4QmjFB Ji+0TsFDCNIlAUviEcThSTa4IPMEwGZ+XFhqIJZbeE/9O2lbWwFaucPubEsB2YhFPIoI3w OEdcomkQ2adOjsfuGvKBrHgAZxc1ZpA= Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-6b5d57d7db9so1630321a34.3 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 13:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687467487; x=1690059487; 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=UdIEW49a6VlVFdeDO40XUMIhkzu0TZbzMPBM/WacFFYU0Mf2IMmAOz+NL1cV98Ton4 4zQ7N3mgDzFH/zAeyyuA7dsXAtz6L9a3ryBLZR0keuhq84g9s5CyaVK84D28lhUtpY1k n1Pbrc0aBtOd2I2lssPU62Gn+t4FuAK2YSMld5ItzYd2Gb7upO15jx4dCKR0ZoMoveD4 fYCQ1IFYfK8OlRQ+gZ/yAiK4LxmWYPlg8lrZ4XnMaYZEtLSmgFLWfXItXcddGU79r9OH 9d/82j8McTJZKyaaoZkqZMldnjmKIChpQ0nH7tpNr90msjJzxK9KTHEvxYDWGujERLdc e96g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687467487; x=1690059487; 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=llhS8W+6xLYB7mIJi5hnRa5WsrfjUN7Ybtw9/jQhzHX9qjPjdMpRgXX6dWsegFkBsG 1UE+CFqF0PGMjrOLpTNb5YTX+S0Gq8gwqlDfPBJ3o3y0ZnNS9+d9FwBkd6v82shW1+D5 xA+yeNjsMckVX9tL74PAXsxTzi9ME6on4ITZ7xB35ftg/P0njyratdRBziCeISfW/3dM Rma7KXzBDsSRP4aR0PAYd1GT3pXOKVGdTZ80gaNbFlO9XiXV2oWmvski0Kjl+a/BvxNY 26lsyUPpcKLw6dt568szdSB5btBzLOBInJ7NZDOYfZI20Dv6+s2d8tsEr/2oNFK9/jYo 5QHQ== X-Gm-Message-State: AC+VfDxrkupN1byZr/2EUMZaAM9SUWVg7VLA6AGpgWwqFL8asqCI0vIB dwYta0C2wBhW5X6PYslazGs= X-Google-Smtp-Source: ACHHUZ5msoxCs4WtHFESbyMK1EuaDf4wukFNhVJUOVId63qr2aSW3HXx+zFK0CBZB4PkAluxQSVOjw== X-Received: by 2002:a05:6359:2ea4:b0:12b:e5b1:1c9c with SMTP id rp36-20020a0563592ea400b0012be5b11c9cmr10630381rwb.14.1687467486510; Thu, 22 Jun 2023 13:58:06 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::36]) by smtp.googlemail.com with ESMTPSA id d18-20020a5b0c52000000b00bc501a1b062sm1684937ybr.42.2023.06.22.13.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 13:58:06 -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 v5 05/33] mm: Convert pmd_pgtable_page() to pmd_ptdesc() Date: Thu, 22 Jun 2023 13:57:17 -0700 Message-Id: <20230622205745.79707-6-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230622205745.79707-1-vishal.moola@gmail.com> References: <20230622205745.79707-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: BEA45A001C X-Stat-Signature: spk5rea3jndosz8b68c9u77rwr9iobmt X-HE-Tag: 1687467487-8513 X-HE-Meta: U2FsdGVkX18gROZZRCdIs8/AgrgPV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sKbj2i76CfV7SoCVlPUZnB9uhM9MgCE6q9v3JrrqbvOdCpa6C46cXdlu3vcEnOb8oZxDIe/4EUo/llohllkYK9tFRA+T5lOzFAifiWUS3CUjxM4ohw4hQx5AyyBoHj8X+4Sx3nDOcOLXZ6XrJGNCyKlUcanesIvEsBNWOfQ4fnW28nyedOtlXMiPJFXl5Gkb7ZgYwt9wbl8H0j+Avz9FHw/z+BohnLalRz3xohtKiFoMmprINI0SrEg5EuAwEHqvlwirJ3P3+ClrmyDrKI2vJ8abhpKE19Q/zIpUvKVosYylHcWSwadoP1zrqaClYCWT9BHeMvXmdgbWrgQsMAVPGcGV+HrM0co3Uan0rSkROZZPxRTEuLL5R2o58xuQvA9zIfUhSXe2FI80oK+znXOTk+uHpenxjmVb8e9qes+TiPjmXyvqT6AZg4eTfQegBVZvCymNfzsbfMDUucto1R0gig8z2BBAWeMI4pkTmsSJJGY3gsZy/2VNMlv0qegC8OG1YtxcufsBm1VNYKFtaEBZ8vvPiG 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