Message ID | 20230417205048.15870-31-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 B82E7C7EE20 for <linux-mm@archiver.kernel.org>; Mon, 17 Apr 2023 20:53:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 42671900004; Mon, 17 Apr 2023 16:53:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AF7E90000D; Mon, 17 Apr 2023 16:53:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2047C900004; Mon, 17 Apr 2023 16:53:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id E9E4028000C for <linux-mm@kvack.org>; Mon, 17 Apr 2023 16:53:29 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CBD1F1C63F2 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 20:53:29 +0000 (UTC) X-FDA: 80692083738.23.BF0BE5A Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf26.hostedemail.com (Postfix) with ESMTP id 0396D14001E for <linux-mm@kvack.org>; Mon, 17 Apr 2023 20:53:27 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=fsz9HBXp; spf=pass (imf26.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.48 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=1681764808; 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=KZVX/mWjJrSrjjYCriq83N/Wo947JYzoUIEmEL+2beHZAUuSmzw3WrcG7bVFKgD2OHe+pz 0QTA7aV3kg80huAXl1egEsdQT0VMb+F1d+j1wNSmvXto+ifvukJp2lHWAMSLot0ry1vnX+ 8rz8DxvLisOBbYJZ1HunRtG8UKYXREI= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=fsz9HBXp; spf=pass (imf26.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.48 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=1681764808; a=rsa-sha256; cv=none; b=L6AWqXjtazgY4ztXU708japVcIc5XUZE9u2NL+m/dvQmCUiHLczmIxIBbYsPZYhPzKbK3G FoETGKEuXPH5IJdpwE1MT1/FEb9h34W8tnbOqsaWqrB4B+UnovPiph/LYe0h4hBMWNKoTl jL2aqAZcbjd4MQ50X+NVJey5hz/t0z0= Received: by mail-pj1-f48.google.com with SMTP id s23-20020a17090aba1700b00247a8f0dd50so3411948pjr.1 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 13:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681764807; x=1684356807; 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=fsz9HBXpyixYv0zGEIQNfLPb4EjMqtI/28pihon+vRduZpglxs4kGo7QlnsgzbeVep MUefXrtmBIPAEKph1/xE0Hixz+XFSj9eLb4OXqcCPGwVWZta2b+6OV8DcUNUc3MYWho8 foQqBfLzT6QF4GBhL/zISw/ZQfIxqSnZu2sd2q6CE2U54ygVclXX08i47edCNHvoHxB+ sBBNY+ovhIlsXyYoYKNVSm2boGQ3Di1szM5293gnTSGOnWYTxtAAUVimXGr6dZV0Zyrz TtkMrcCltGZOVK2SbO9vEj4TQWwRgKIU6/H0ozoMQVL6Kfmq0ZrnJgq0p7Ga0/De5Qi0 sDcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681764807; x=1684356807; 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=I0X8llqXgt65tgCvOKVEvH9QOCdMU6oCBWTsjart9tcDwQqUwsGzIMESPUPIMc+yrB Viv6sXBR0D1gZACZLMzlMXDKtJZ7L+FliivdCb0s2y/QOfj+FNtegWQXVNLpY3XsI3E/ LZcyafvHTwd/B1eZ20tYFLebitJHVREsddSaI2gGGGWNaJb8jSvA6NDXqcGHfcwADo+C tMVllZLcs54h06yxSvS0ATj+sLBJ1AhL8IZqZMrYa8JS8Q6piJp81K68H63cMdbD2Les p+x2im19uEzcA/H6csURn6rBiLaqxdq5YnTGczu0wgY41NQyLpXFSv6ciJIsu4Gp41OJ u0ng== X-Gm-Message-State: AAQBX9fjT/r5XPnnzm9KJ1rBkqL8W2+fz/Iyq+J4S+kRCR05KkJZ6/qZ eIh5qONSB96fhTwTBKAOP0I= X-Google-Smtp-Source: AKy350YfnaT8KE6LOLQ9wRoeSIO99cnRXYKnv4nnzRXnI3u1QAONlMDFC8rrZFtHP4TZD3hWsCKEag== X-Received: by 2002:a17:90a:fa3:b0:237:3dfb:9095 with SMTP id 32-20020a17090a0fa300b002373dfb9095mr16284735pjz.6.1681764806946; Mon, 17 Apr 2023 13:53:26 -0700 (PDT) Received: from fedora.hsd1.ca.comcast.net ([2601:644:937f:7f20::c139]) by smtp.googlemail.com with ESMTPSA id h7-20020a17090ac38700b0022335f1dae2sm7609707pjt.22.2023.04.17.13.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 13:53:26 -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 30/33] sparc64: Convert various functions to use ptdescs Date: Mon, 17 Apr 2023 13:50:45 -0700 Message-Id: <20230417205048.15870-31-vishal.moola@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417205048.15870-1-vishal.moola@gmail.com> References: <20230417205048.15870-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 0396D14001E X-Stat-Signature: m7dohc5xgbw4fih4xic174f5zbn6tcsm X-HE-Tag: 1681764807-990154 X-HE-Meta: U2FsdGVkX19c3EYMCR1z8bdydxyPVK2T4Z+KbqtNaRpqPg6WH812vQsE69yWH0K84Z/+uIu1ndPJ7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989mlINjfKS8HvAPFXWxd1O2MgrlSCWQoe5uQmF3UklOxnufa46FbTDgX5h92T5xkcUwq/c5U1g4S7AQpc/bFQZE9fjpOUyIuobmKmxKWLOKsCYgGhGenxqZY24L7tD0EFA/ELMTwcD4ltEPKS11l2Kq5iJ5y+BVj5R4uZYA9p494aBH/ayYciUZ2jog9U61YXgWifBnmfcHo3TWOtyCVIraxPyMLdFKi+iQIsdv0T+7jWbzW6+0ca2/MR9EfLBCtTMF4T8OXogb74v8DMlL/1KRjePr72Nyledh5jtBy6PtRk0zEfnXgHD2Fde4Xn907m5yHf1shu8JIQmJ7xlCHhLcM15Jz+1W1DRBCpQH/cAbsSBny7wHnMFUrc7FmyBDl9WjH1vI= 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(-)