From patchwork Mon Aug 7 23:04:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13345288 Return-Path: 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 6F56AC001B0 for ; Mon, 7 Aug 2023 23:05:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8BFE1940009; Mon, 7 Aug 2023 19:05:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 863B8940008; Mon, 7 Aug 2023 19:05:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 72CD4940009; Mon, 7 Aug 2023 19:05:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5E661940008 for ; Mon, 7 Aug 2023 19:05:29 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 27888160BA1 for ; Mon, 7 Aug 2023 23:05:29 +0000 (UTC) X-FDA: 81098841978.11.FBBFF83 Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) by imf03.hostedemail.com (Postfix) with ESMTP id 65AA320002 for ; Mon, 7 Aug 2023 23:05:27 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=g0HQFm0I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.171 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=1691449527; 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=fEHGQmND3TVCalts2Xn8ptU7qEA2BpyVbaRRrUVwgj4=; b=2+yys0F3x0C95lYnMueocSl8UD5kTFt/6/nCtUaBs+CANSBJVlCchSQKwuOb1ECokCTqfI 1xX8NJPAp3pI3p1j08NOXxyVSrrE9H8ohX9QjzcFtvzFVkUqtfi79XkVPltdPBvdcBnmBz a3lDmJPxU1+5TBOtxBVR5MvdK8NSqW8= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=g0HQFm0I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.171 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691449527; a=rsa-sha256; cv=none; b=3NxDqxEGgOhVSdwnj0OR43vun5555qH6/0fCAWcCgkYW6ny/cZTSBKusqpU0WFLkHJPt2b p8+VAkhHTmzUu61Ur4YTZJ7ScztrMPiy5h7atHdLboBn/lonsNps7gyzViU8jfbyqG4KRW huPYCY8j5h+pMwIj5U5yndhkCcNd/Ps= Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-584388ec441so52570697b3.3 for ; Mon, 07 Aug 2023 16:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691449526; x=1692054326; 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=fEHGQmND3TVCalts2Xn8ptU7qEA2BpyVbaRRrUVwgj4=; b=g0HQFm0Ih+ONj9bbGpN0SAoMFwZH1Hyy1LHhk9Yh2p6W+FyLdnCJ7RPABmEq6UvV+/ I0mwYg/T2n8LaliwXnPTiC9GBqIvZu49Qi1V/N0MmNRCKbxincxnUS9jodhc4yydOwRP aDjCJ2ni1nNWMxe4NQznDsxKIox8DPgLSsmzUNzOiHFpehQua0QatbJlVlVObrSVTwwk ZCujc6+dVnog1ei5Zro9QqEP+ju61k33bEcuj8U0Qr32h8YYXwWu+8Jh8gouVCHVOaNS iYc6V/t51fkGJ7ybJ/9xFdZCGVtXquz95wk1/VRVK/X9HGuHOqtxoDT8S6kl5FuAfQB5 VZ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691449526; x=1692054326; 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=fEHGQmND3TVCalts2Xn8ptU7qEA2BpyVbaRRrUVwgj4=; b=YJbjdqo0y2G8YgF2AUSMC/AAD094YsyyiTRvGz8wVYmqXTnSLQcmvhKFScQPhOjU3/ RExDhFKQvXlNhfRm4pAcnhiKXdMInUXErSouU8tdSVaRDqoauN1kYXlKdtqNDQRne/Oz 4Lm7wuKPJkDpIhGQWDrRfiVxybjTI4hkE2l5GoTCVNU0Qk36KN2PXlUk4LC3JwWq384b i3Hx+5jYOUbCi0cHZuf/hb5foIALvBJs3YNuSgRuu5NzeP0jDRPouj6Am66b31+VH25v 7BTk1N7Y/R1lIg9VlyM0FuCJeWvCzaL+Hut4o+nw9pRW2JCnFKtlApzvm+MThetngeIV NqsA== X-Gm-Message-State: AOJu0YzEkJYnVBhcElXUE8VGXpvC0CWNtljZKdU7IvsCrQ/2Sq/XT3xq uoJ7aUChhVfeNWUfYf2LM4k= X-Google-Smtp-Source: AGHT+IE5Cb4oRalCjMZQpBv2Qvb3EAIojgwuAgurnfPzGGotvhmzGY7E65P/TqlBpHFwkOco7I+V2Q== X-Received: by 2002:a25:d56:0:b0:c67:77be:9ad9 with SMTP id 83-20020a250d56000000b00c6777be9ad9mr8584839ybn.30.1691449526389; Mon, 07 Aug 2023 16:05:26 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::16]) by smtp.googlemail.com with ESMTPSA id d190-20020a25cdc7000000b00d3596aca5bcsm2545203ybf.34.2023.08.07.16.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 16:05:26 -0700 (PDT) From: "Vishal Moola (Oracle)" To: Andrew Morton , Matthew Wilcox 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 , "Vishal Moola (Oracle)" , Mike Rapoport Subject: [PATCH mm-unstable v9 04/31] mm: Convert pmd_pgtable_page() callers to use pmd_ptdesc() Date: Mon, 7 Aug 2023 16:04:46 -0700 Message-Id: <20230807230513.102486-5-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230807230513.102486-1-vishal.moola@gmail.com> References: <20230807230513.102486-1-vishal.moola@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 65AA320002 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: s1id1z8a877wx8xr5nhhi6di4c4uxzou X-HE-Tag: 1691449527-691393 X-HE-Meta: U2FsdGVkX191dbd4iamdqN/7RgCtKKJbn9BlnlhMGRTTzBPpxMEaT/A+u8brSS+EKBkHn0NwkSKT5owWoyBXHsIfbS0T1hetrb5+jM4PLQqndC07UCngxJvwKksV+xzL08gLru40JONsyKMUUA63DqVCrM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dcAlcS85npxP1dd1wD+tkTXhMYPnJxy1hNCM18B0I4Uv9YqTjKkxzco7A9KQjrFdrO6/MVDI5OkspSVHMdQ3FgbQHO/p+exSqnw8/nHM4j4EneiVG8jJbDlGxyQl0OFN5yo+qDiXtaEvmVf/Xo6QOkPaxWtfcp9yEfSGeJS0cfXMPZT4psnkQq3BG/9U6+M9OfHl48xoqaHNCLkA8U3TZbCd44NdbttYSAhjAVy+pDfg65mnmIG0zCLClKCpbF1IE1VExkESJkEZPUa3jeKpxZVOzBPFqPV5AN/5ZLQA8/ehu0UXLKaj9y1umUONdZCj3/QmeFIEFwRexkFnYC7aj3ipZgsc6e6nux7THutPIhS75qX/42A765zFzkxYhj6cvcAcdFy/kOqdylcDUc7R4tWtHUco5zXzhHAgkOl2eKpqI 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: Converts internal pmd_pgtable_page() callers to use pmd_ptdesc(). This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 54dc176b90ea..f6d14a5fe747 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2990,7 +2990,7 @@ static inline struct ptdesc *pmd_ptdesc(pmd_t *pmd) 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) @@ -3009,7 +3009,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