Message ID | 20230622205745.79707-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 58720EB64DC for <linux-mm@archiver.kernel.org>; Thu, 22 Jun 2023 20:59:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC2D68D0006; Thu, 22 Jun 2023 16:59:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E4D918D0001; Thu, 22 Jun 2023 16:59:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D13F58D0006; Thu, 22 Jun 2023 16:59:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C29628D0001 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 16:59:01 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9D8131A0594 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 20:59:01 +0000 (UTC) X-FDA: 80931598482.04.1145877 Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) by imf25.hostedemail.com (Postfix) with ESMTP id CF611A0016 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 20:58:59 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=YrTQVBS1; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.181 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=1687467539; 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=2x+E7/HO6cxS1FKNHsH+YAjV99GeoJ7wX0XOkEEtc8g=; b=Jf64YYgjMix+bP+84EGlLYToZrQmhYBhpHwBSPDO7lwebpLsBXJMKg8bVQ1y1TIF0Aw8A6 yoFcq38eRDtEy4q5LPUOClclFROLWCe6kmJV9oaqiA9fs1Zz1zA43Ocfog+uehvi+WRwTj /KOPb9ZaZbWWj1rAJUgzzJELv+jZyZ4= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=YrTQVBS1; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.181 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687467539; a=rsa-sha256; cv=none; b=xdxp3pHbV7luWz3z1yDeXRAFyVm2fv14LaqqANxsWMMDTz1tGpuBG05569hJ7pfglY/ryX bhS+9C2JUY5aVa6cGMW1p2RnhBW2L1vePLKWryVUZUJSkpHtCY9S2iB51szvlvztGlUs2U oNsX1pjLao61K3c8Y4zraatCAO3DQvM= Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-c01e1c0402cso953342276.0 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 13:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687467539; x=1690059539; 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=2x+E7/HO6cxS1FKNHsH+YAjV99GeoJ7wX0XOkEEtc8g=; b=YrTQVBS1aaA3+7mVapNSFssjb2+AQ4IJNUOZvGKIi0FFDtk+PI4lWjji8UMW0kBniw NnyjjbhzJwR9iWxQ73lOHY6xUHgKO2FQSJubgoxvZQoc6uqJluiv8iO+GgjzyRPTTUNL H+9Lt9/vRpqFrdhngSNsPgL94g8nz/f64RVJUcVyBqSkPnGnipXpH3S7tTsIQsIL/Sfj /1Ey+dh+UNfiOBDZVuuR0MUQqWyu0BLKscPyo1/sCfwSnYduy/XWfVP10dsKPKfMX/jd CyoAvKAcNWnuFLqmsDX4R/ZAToeYgRboOEEoeu7mlCBRRzYoIoPibXR4stY18tIHtLmi 9aNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687467539; x=1690059539; 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=2x+E7/HO6cxS1FKNHsH+YAjV99GeoJ7wX0XOkEEtc8g=; b=YD49zsrqOdU2w0G7/oekg1OayHYRp93CyUxOEMn2S51bcT4T9FLh8PcUZLQ5pIJXli zInMmPAL4HuSO2zMxHobnrPkJ6dYX0xz79RC4C9eRjoh1uqDTJMJR1laccwbvGGPoksu 5n+vJsQRNFcKoRT0RoNj8jIC65rw8gJj0HInbHPB5ridHRoKa+iepe6PQtUZzgg24PBG Hx1L5HuOnJmF4B35mXn8sEWMCXihvWtCBJ9eEPqcjyp02yJcpERdPs/CnIfZtqHHSHFr Iodf9lIFR7TFWTtbzF5wH13kIBX/noHUr7VSJ/1b64174RmxCUwtLDpzSOmg7wEdOViC BqPw== X-Gm-Message-State: AC+VfDzHHtTTF/Ooafvt1TpLS+lksT4oyY+Ni58D+Q/TamLQQjUeXO+W ovIHyZptXUmFMHrspI5/gsQ= X-Google-Smtp-Source: ACHHUZ7RSJK82blK0n8uMP8fjUDg81SPK6py6Hg2BA1/I5Xa80rVzDG2S/aTt1mnsQBJvwPYu3STMQ== X-Received: by 2002:a25:2102:0:b0:bc8:914b:c83a with SMTP id h2-20020a252102000000b00bc8914bc83amr11442005ybh.22.1687467538676; Thu, 22 Jun 2023 13:58:58 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 13:58:58 -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>, "David S. Miller" <davem@davemloft.net>, Mike Rapoport <rppt@kernel.org> Subject: [PATCH v5 30/33] sparc64: Convert various functions to use ptdescs Date: Thu, 22 Jun 2023 13:57:42 -0700 Message-Id: <20230622205745.79707-31-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-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: CF611A0016 X-Stat-Signature: msdqbyampfxmhdhkesqg4oxgirrsipx9 X-Rspam-User: X-HE-Tag: 1687467539-674519 X-HE-Meta: U2FsdGVkX183K5ux+CRff/nBTuImGadxc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rMW5NdAMUY2qhFJaaUDuo+LWKvaFIjhUJ9+YpEV41nEIH3AXTXUVIy0CQw5f9H26Ht/BvYweaRkSSHp0KI3GaKuysoBrNuzwdXu2lhGCxhApEiCpNrKVg6URYGlrZnPOF5VI1jtKEW28Wrl394Ig38KE3j4JvElozr/MAHEofSN2V9B8Lk31T7mht+i+UtCdPicaB+BByvuqiFG6OHekHVGPLlUjTRHajLR2YqYOfq9yN9aO+cZ/qH2+90EMGKzdaTQiDolKa/N9wXtyvgTp1gzM24zMFEatvGcesWKuM30I6drWv82kh6vu5lIeIT3aS3CqlfXi3KgFypPjYsBKYUP0NxaFp22zHg5MXWsLmeuw1iVV8DnKe6oudBE8czzmEhVMn0rLG0YV7ezybXkyBNUFtJg6Ho1/rwph3ixw5qRfkFfrYx3W/55//6wF+59fQxjcEzud1LfQYsL+S+7JUy2a+nyOhOqhwGSMrIYrfJ6vkmRS3zJd2SQJhl1p7KA5M+ea8Kq6adE9diSZZVl2qzh6LFB+hDkvegysNqWPAjlxy66MPNrE4e6gW3xAmrtI1aa3iDAWzux 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..105915cd2eee 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 = pagetable_alloc(GFP_KERNEL | __GFP_ZERO, 0); + + if (!ptdesc) return NULL; - if (!pgtable_pte_page_ctor(page)) { - __free_page(page); + if (!pagetable_pte_ctor(ptdesc)) { + pagetable_free(ptdesc); return NULL; } - return (pte_t *) page_address(page); + return 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); + pagetable_pte_dtor(ptdesc); + pagetable_free(ptdesc); } void pte_free(struct mm_struct *mm, pgtable_t pte)