Message ID | 20230501192829.17086-32-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 152F3C7EE2F for <linux-mm@archiver.kernel.org>; Mon, 1 May 2023 19:29:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 67B8A28001D; Mon, 1 May 2023 15:29:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 60738280002; Mon, 1 May 2023 15:29:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3942928001D; Mon, 1 May 2023 15:29:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1E255280002 for <linux-mm@kvack.org>; Mon, 1 May 2023 15:29:22 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F390F14080E for <linux-mm@kvack.org>; Mon, 1 May 2023 19:29:21 +0000 (UTC) X-FDA: 80742674922.08.B35D326 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by imf16.hostedemail.com (Postfix) with ESMTP id 3467A180008 for <linux-mm@kvack.org>; Mon, 1 May 2023 19:29:20 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="JvPLlmC/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.174 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=1682969360; 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=uIsUNYOwSPNxjYFxvF4LgB4Ah8JH2T7Nmtlw8Cz+gsw=; b=ZpGB34YjCEMrwrhnGE3LKYPywKcKH72X5BcPLSGv3L8iw0Ln+pZOoX0GJm10RF4SFvHZ9g fARneN1pcbK7OG4WKi5V1YKZXrN6ha2K2P9pk8NyMzcEUjpzyhNAoYclyEA4aYTRx90aV3 p/Q2coqo2H+RF7Mgx0AxYP64EK3OW2o= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="JvPLlmC/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.174 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682969360; a=rsa-sha256; cv=none; b=bkoYEn6XUJg/vsI3y6gFiAwFQgw9tqoc/lhsDJoQoqi78tUu8Q1s64RKXnDpj4ZKvn0xCi /djjNIG0HIxgK3cwFXwY6aJUlNnYSG2gpJ3b7/JShAcFa3eDZ/YlWfPc6YYzcbhM2dhoNw 6pRlAYy8KEfdkb6NzXhC8NMtZr4kMq8= Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1a516fb6523so28452745ad.3 for <linux-mm@kvack.org>; Mon, 01 May 2023 12:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682969359; x=1685561359; 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=uIsUNYOwSPNxjYFxvF4LgB4Ah8JH2T7Nmtlw8Cz+gsw=; b=JvPLlmC/XzUWqdECLyDwvfeLFLPFT450E92A3QXyvZyOZFiHjs0SqrfxeBMPzeb8LI K2VYtEv3r+e+UcHKuqN8TTRgEDMk5QiHg2w8LWe4aiFQNNV8Hh6df9gt7z6D8qxOouWJ wLPmS/k/ifaj+fNqHq4KBrLkalomexLgsPcDr4xMzpwyPwPn0hyVLwNcBBGjvlXZkwRl lPtqWGJrBs3wn3DJU9zWYI2bb/1KFvoVhNYahmv1oY0+idoipKM5ABGGY8tIdglpIS4E WqBtNig6OCJrivJLAJr7mSv5nUheWG1j4pFaa5KN6zFjtfYkKhLunWXNp9G65rPn/E55 zhpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682969359; x=1685561359; 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=uIsUNYOwSPNxjYFxvF4LgB4Ah8JH2T7Nmtlw8Cz+gsw=; b=YEIAXEGSB9z2I3DXzm0Ys0+5elhpyuYhpzmMyiMWSitPKa9giJ/T0OcNCXFEJEYNy9 js8N2D40VDvYje4nds801NGpjn3xzJ7H4stUKacHcNVMnLdbRsz5pW/aLP9feyujPGPw YskDbuHdwqlfItKVZOqqV1KhORhsH5f1kD7ldjv+Rvl2gOSaZFdb2H1BNGVHl6YBN418 WuE16aGmZr+lqCYNRkMNOCfZ3HlMRWhfgiui+Gsy3ulgAYdQrORB++lrBz9G3t67ad8a 7HFs1Pkm6XRvU8zoYBO6MVnRhUVgXJtTQYZduCAsJq1Us/uQtG9ISqte94G4CSTWXcla He7w== X-Gm-Message-State: AC+VfDyFYNu00RGJvplmZARXOCZmT/Bg4KUugUzmEyP82n6AGPlPrIqI ABXXtGVCIQopbRY1VJOeVNQ= X-Google-Smtp-Source: ACHHUZ4XGLMgkIB9Q6wCsJwFAYUMJfuCSptJDhnDjc9kz87hQFDk4CAG77uXolw+VTSUtUndXFrgrA== X-Received: by 2002:a17:903:120c:b0:1aa:f53a:5e45 with SMTP id l12-20020a170903120c00b001aaf53a5e45mr5020547plh.39.1682969359666; Mon, 01 May 2023 12:29:19 -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.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:29:19 -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>, "David S. Miller" <davem@davemloft.net> Subject: [PATCH v2 31/34] sparc64: Convert various functions to use ptdescs Date: Mon, 1 May 2023 12:28:26 -0700 Message-Id: <20230501192829.17086-32-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-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 3467A180008 X-Stat-Signature: ybng5cpmoyju69d74tot6ekx818t7yq6 X-HE-Tag: 1682969360-51840 X-HE-Meta: U2FsdGVkX1+2apvUrcdC8BqQSnd3Rl/jYTDhJyImPEIPWMdAeD7RvB/YyeVDvj7MnAvFUEIS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1j48b1CwMkj87osdLsevvFu3B18mXjieDR6ny07eZ73Py0BsK/HwHMnSPjWhilsm9WCp9saMQeKb5o/Tph1lrKtVP7pFKLIVOFKKw7NYtmInNg36IctaNXetqfjjbwgBdPbovsvtmsmDyVWO9Bra0fYVKaXNDVyVd2ifROLT/h7AbpoMgNByWVY50GkgDlAVvWil0ZfQVPtWcPXTc/lv7/aH/Ka5fjKql725ifUB8xM69hnTudgwYuO/QN2JUk6MiVBSGsAOU/6V0AdmCE0I6NmK3RRBUiFPEIjdLr/RvFhsIawYefGsqAby6lMi4a+DayTsbQLVvGnC6cchQm0ezgeh/I3u/1wevgZy1OKpJE88waODbhoaylsxhEIVtcm//OfXcDw== 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/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 04f9db0c3111..eedb3e03b1fe 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -2893,14 +2893,15 @@ pte_t *pte_alloc_one_kernel(struct mm_struct *mm) pgtable_t pte_alloc_one(struct mm_struct *mm) { - struct page *page = alloc_page(GFP_KERNEL | __GFP_ZERO); - if (!page) + struct ptdesc *ptdesc = ptdesc_alloc(GFP_KERNEL | __GFP_ZERO, 0); + + if (!ptdesc) return NULL; - if (!pgtable_pte_page_ctor(page)) { - __free_page(page); + if (!ptdesc_pte_ctor(ptdesc)) { + ptdesc_free(ptdesc); return NULL; } - return (pte_t *) page_address(page); + return (pte_t *) ptdesc_address(ptdesc); } void pte_free_kernel(struct mm_struct *mm, pte_t *pte) @@ -2910,10 +2911,10 @@ void pte_free_kernel(struct mm_struct *mm, pte_t *pte) static void __pte_free(pgtable_t pte) { - struct page *page = virt_to_page(pte); + struct ptdesc *ptdesc = virt_to_ptdesc(pte); - pgtable_pte_page_dtor(page); - __free_page(page); + ptdesc_pte_dtor(ptdesc); + ptdesc_free(ptdesc); } void pte_free(struct mm_struct *mm, pgtable_t pte)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> --- arch/sparc/mm/init_64.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)