From patchwork Mon Aug 7 23:05:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13345313 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 E4148C07E8B for ; Mon, 7 Aug 2023 23:06:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C5D0F940022; Mon, 7 Aug 2023 19:06:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBFC6940008; Mon, 7 Aug 2023 19:06:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A128D940022; Mon, 7 Aug 2023 19:06:21 -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 8C918940008 for ; Mon, 7 Aug 2023 19:06:21 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6276A1403AF for ; Mon, 7 Aug 2023 23:06:21 +0000 (UTC) X-FDA: 81098844162.01.8F2E8A5 Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) by imf24.hostedemail.com (Postfix) with ESMTP id 912BD18000B for ; Mon, 7 Aug 2023 23:06:19 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=LURal4Kq; spf=pass (imf24.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.169 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=1691449579; a=rsa-sha256; cv=none; b=azHFP+g/stO++4ZMk6fI6DYyJk1Vmm7jfkrS8tSAyReR9PwySxaFQ+NFr1awGlJ/DiNVDA +cr4iXVaRENnXtkqNKD7bGtJzAuF1vKGQ1sq+TTKNSUKN3sPYoVwxZvUrb167ovU3LmjGM C3vqlW8bo/1g0INgZ4SXOABzwWvrsNc= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=LURal4Kq; spf=pass (imf24.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.169 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=1691449579; 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=Yb5+fiX/YSPgeVruPImZCslC+7XzLtSDmAZ+KnCCvCw=; b=s6tJGdaHKRejes36F2g++XomIDuOevpNfFkvrxDkzK9exxVVOIUqFg0iLe4xt1FKurC2Iu rLEPB0gNxYwwHsm3Ze9GtXWAgjgMykD0yqU0nMaWOuf25DwCao0fKnivKsUSSjmilV9yZN ZePBnk2zkFpZYmTAbz8yXnlaaQiSY00= Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-d075a831636so5456172276.3 for ; Mon, 07 Aug 2023 16:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691449578; x=1692054378; 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=Yb5+fiX/YSPgeVruPImZCslC+7XzLtSDmAZ+KnCCvCw=; b=LURal4KqklmU9AiCOifU5Mxc6WM+IybZMw4f+H9b+ehsvWfF2rdEGUCUpHED/xgeP0 03+is7BherE6vDUPF9cInwhZZ6O6FVEP73Sri7+CBG0/7jN64G4bgtBq56ZrcLUBIxxT uSfx8fFqjmiqF0MtkULVgc1gjFJH4lOvkwRfZt9wzMVRnizjKRrxJwuFQ2mIfEo7cHgy UR2ZIO+mIWR9RWU4d+HJedZnPKiZaDv8i4STB2D6+pQaLcMt/pvWXKdhAwPxBTPHyGDc YUL8XwwyvOUHrQNxNKfZS8WVqZrgPXs80ZLFz3I7kRgWNiGS07HTyMzLuT9V1dLH0d1v g2Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691449578; x=1692054378; 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=Yb5+fiX/YSPgeVruPImZCslC+7XzLtSDmAZ+KnCCvCw=; b=Vr/sIBFkxBO0ZiiZQtpUwpHaHYxfofF+0SVZrdRjtGhQz23UHVKjkZD4EnxSQ5LR27 RNkVCqm0Pd+QKs0Bpup0kQ0c0kpnwL3yNiw4lxKFEQrGdio9TzjzuVEffkP6VTJ+vEA5 iF2qESFG5Pm3QEtgWSNWbUhdLwQQ+23JfTAgVN+4xmWyGgcyEM6iPoYllCogELYb1Cdu oB6wDq7X9ZaLS/aH6h8ebsdEUNwoPBlmPI+oL5ltIEG/lGAI76qd7c/2J97xdGtWIWmY jHMa0S/FlP0lm6A6xvyNdO4jtyBM35bMtiaoXqN9coUn45M0CrYbnBeHeFDL2zFmnOQt Dk3w== X-Gm-Message-State: AOJu0YycXjlNzV82p1rSV5Dh5xPOCewkyVqLmTCKkEL5IbMByZtmW6Pu pRPkGFI4DIuLWlpmx+gZ82g= X-Google-Smtp-Source: AGHT+IHSK0JHQfLZYNqZB3BuP0bNBVURutz2ITpQB4n2EhlNMl4NfRND8wevRJ4hRdMY0+rsbG2z6w== X-Received: by 2002:a25:ac04:0:b0:d0a:8269:e5d9 with SMTP id w4-20020a25ac04000000b00d0a8269e5d9mr9659872ybi.60.1691449578542; Mon, 07 Aug 2023 16:06:18 -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.06.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 16:06:18 -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)" , "David S. Miller" , Mike Rapoport Subject: [PATCH mm-unstable v9 29/31] sparc: Convert pgtable_pte_page_{ctor, dtor}() to ptdesc equivalents Date: Mon, 7 Aug 2023 16:05:11 -0700 Message-Id: <20230807230513.102486-30-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-Server: rspam08 X-Rspamd-Queue-Id: 912BD18000B X-Stat-Signature: kz3mb5dhawssq6zdi1scwcwhn8x97yix X-Rspam-User: X-HE-Tag: 1691449579-484716 X-HE-Meta: U2FsdGVkX1/I9cYobaMRKXg5WUuYazjrUdfFJSDkpV57f2NcmURVXTzVFmc3udMuhNwFKnUf4+vCaTpXfJVxstce+x8piL7jpwQNkBJ34P4F1W0ufI3WN10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+gOUW4lWT5pr4rhmTshO6iFEtJhA5iMK5So9J4msAWGWHLPjd8JmJegfU2X+QzgTPM2zyteuCTl/8eY7VE+a2oeZbZE7JQwzU47kKTHXkSu3f3sWIebtjRzjsYL7oWXHIaNjXZYOtelTaB6CXbEB7hR+hcFEF13Yk6fWC7t/59tKj5dYWIclhJkWBhH2jAwQrfb24TqnBnDhxuJFq7w5WDSKJaWH9p6wy1rmqbN4aKs/sxU15mzwBoIQImm34/YKgYbo42QZu1VklOpv5n8nIqAzdFIm1stPgGW8qPnYZxrjVz4kA8uxiKFDh7RUuuq88Y/CTa5ZucvCcqd3zhe6Qu1OVBAFMXH6QM3zFBnXkiKLqbSrLkXv08fE7OrVzxD6xBP26IK4igEsGmPPGNlJScXEs/cOHdL1CwcKdKoeUdZO9NaNcpTS6c/aYfbFy2U= 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: Part of the conversions to replace pgtable pte constructor/destructors with ptdesc equivalents. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/sparc/mm/srmmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 13f027afc875..8393faa3e596 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -355,7 +355,8 @@ pgtable_t pte_alloc_one(struct mm_struct *mm) return NULL; page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); spin_lock(&mm->page_table_lock); - if (page_ref_inc_return(page) == 2 && !pgtable_pte_page_ctor(page)) { + if (page_ref_inc_return(page) == 2 && + !pagetable_pte_ctor(page_ptdesc(page))) { page_ref_dec(page); ptep = NULL; } @@ -371,7 +372,7 @@ void pte_free(struct mm_struct *mm, pgtable_t ptep) page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); spin_lock(&mm->page_table_lock); if (page_ref_dec_return(page) == 1) - pgtable_pte_page_dtor(page); + pagetable_pte_dtor(page_ptdesc(page)); spin_unlock(&mm->page_table_lock); srmmu_free_nocache(ptep, SRMMU_PTE_TABLE_SIZE);