Message ID | 20230725042051.36691-29-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 510FEC04FDF for <linux-mm@archiver.kernel.org>; Tue, 25 Jul 2023 04:22:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D58B690000C; Tue, 25 Jul 2023 00:22:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D0B5B900002; Tue, 25 Jul 2023 00:22:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B340790000C; Tue, 25 Jul 2023 00:22:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A1CA1900002 for <linux-mm@kvack.org>; Tue, 25 Jul 2023 00:22:09 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7E7BD809E6 for <linux-mm@kvack.org>; Tue, 25 Jul 2023 04:22:09 +0000 (UTC) X-FDA: 81048836778.05.6F7E38C Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) by imf05.hostedemail.com (Postfix) with ESMTP id A8B0110000F for <linux-mm@kvack.org>; Tue, 25 Jul 2023 04:22:07 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=qNSUsqiV; spf=pass (imf05.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.170 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=1690258927; 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=K9EaWELDe99nUon5K3Z+iJo2yPeaFSzyCnD+eyoagSI=; b=NM0FslUQ9uk/oBMbpC8eOzRl+6rFKAgxWLmBo6uwG5EHq8Ym7iL4SlnQ90VeqDAhAyGcXn +Io6IP1sARO62cZ1yMpPlzRgbSe2YBwcR5++qwYvRncgGy6zYmrSeWzpJVLHbQO/H4fty0 OII3mFea6+eD72Xo36SB+l6pUejbVek= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690258927; a=rsa-sha256; cv=none; b=ac4T0vuc6EtVlq9XAkNrf24N50feE4Zp/wfrK/ltF4yjqw03r3Mv28KMcyW96h+hzltsCR MYWq3ggmMLNdTolDGE+5J84QqIPc1ctu9OLW+9Zpv/OCK8TZaIAFflPDONAQ7YMzyW5+au A6E/ob/avz/WC55TWSemEOArUGzQTIo= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=qNSUsqiV; spf=pass (imf05.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.170 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-d075a831636so3448406276.3 for <linux-mm@kvack.org>; Mon, 24 Jul 2023 21:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690258926; x=1690863726; 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=K9EaWELDe99nUon5K3Z+iJo2yPeaFSzyCnD+eyoagSI=; b=qNSUsqiVKVB0ESH5eMh2318rltbeTzVNrLxONrPQx/nleyciLPoBJAEyvEQiA5s1Tn 685R6sAh2RRkBOJ+dHhwwHaTsDfn1Dq0fhp7maY379FRtPvlZFAioZBWPPk7fa1Wkq01 qN75vY9UJqWiLkOixY4L6XdTPAaqKlrcR9SWRLlUZxoXjG975sFhxm21WZutHmQKl3h2 OQ9WcHoISTJ2OjIGWYQNx9W6xFSNLrPRAFCGXfmCK8TcPNzYvmKngSTkC45cBTIzIEjY 73sY0YERl7Ohg+xplAh/xTNZowvdAeC+fipfIzPvDIC0nmap4j6fccJNDYEXWoxWM6gV WCvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690258926; x=1690863726; 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=K9EaWELDe99nUon5K3Z+iJo2yPeaFSzyCnD+eyoagSI=; b=bF20zQ4MGH3IUuWU54G90STOhPrhsoGTlo5LAY3iYSQkq74naSjY9PhL47QR70v7O8 W6q4br1ocQKJwzhWRD5u3j4TITq7RTqj11u4iGOWPHVOtvKscxj1Km3zEs/TKy2CgXnH qCZ/XIfTDOcj5Ix5O2r5nzMhzhA0fj27Fs4GzYK3Mbk1IMQ7It2pK0tiggjG/b30K6q8 lJBG2rdOZMsEQ1lrmuCurD5gQjeVUfFrWNrZ7xCCrz/W84O5p3Nvb60+ntB24yP65wHe m6agKGnwIXpdLJ2TvOtIflixK8AexbCroOdf/KZfgKYpqXwsc04GW1ibUO1y6RzusMhy noLQ== X-Gm-Message-State: ABy/qLYyv7yedFcFcwvqIEvszRUOvnBgBT9Pv5o9Zmy5spWVfkB5v0ph ApEWYTF6d8QbyagN1l4gNik= X-Google-Smtp-Source: APBJJlEYsYvwES4yIHo2kt7NPKD5Twgr2oGLJnzn9f7qzh6ZvPXJtQdH1+pOAmNJT4cd1ABpvr+wDQ== X-Received: by 2002:a5b:88e:0:b0:d0e:3831:fa2b with SMTP id e14-20020a5b088e000000b00d0e3831fa2bmr4772882ybq.62.1690258926669; Mon, 24 Jul 2023 21:22:06 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::16]) by smtp.googlemail.com with ESMTPSA id h9-20020a25b189000000b00d0db687ef48sm1175540ybj.61.2023.07.24.21.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 21:22:06 -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 mm-unstable v7 28/31] sparc64: Convert various functions to use ptdescs Date: Mon, 24 Jul 2023 21:20:48 -0700 Message-Id: <20230725042051.36691-29-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230725042051.36691-1-vishal.moola@gmail.com> References: <20230725042051.36691-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A8B0110000F X-Rspam-User: X-Stat-Signature: q5ew1ty3pzpnwetkyady16z847mie5y5 X-Rspamd-Server: rspam03 X-HE-Tag: 1690258927-957860 X-HE-Meta: U2FsdGVkX19l52KxdJ0r6oNx0+gv43L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7uO2t9Fv4SS1V9A/jXbilqtKGqy7PVaBwdzOyX2YLHRrQAUr8hKl0U60HarAmhy92KczSXclhKfh8Uwzdwa/yHCrwS8j187WoJEL6G7VYR0vOVYa0G655j3QqOniSc2LpKGnkJFpHdhQugt6pp9gPQcwMCDFNc7ve4PlyL3UjAITmcZnUO7Jq8teopMBldDnCtevtxv6WBmD+tN9dO7Kr5Uj71k7k3LkFCim0DOamlcQejcwUFr3opGqivyschwqANyrzaURVVebFWN3qzmuBX3usgVFMSVuvthROFbXQ4Sv+0bWG3VaddJpJOrCpxlFijs8MtHExzkHytqL5Gi9znjjj85pIdjrFHIAaUbUr2hYoGxRg9mio9RRMJcDQeXr0DqJU5RTj/fYnDxWXHFbrFAe6i8S6J30ctmPimhAdt+48xKS+SediBm87ZuRKlp8UXrI/KYrU9+rvAS2uc2FNQHko6OtBkEauQ== 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 0d7fd793924c..9a63a3e08e40 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)