Message ID | 20230807230513.102486-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 ABAEEC25B73 for <linux-mm@archiver.kernel.org>; Mon, 7 Aug 2023 23:06:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A8888940021; Mon, 7 Aug 2023 19:06:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A1213940008; Mon, 7 Aug 2023 19:06:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 864EB940021; Mon, 7 Aug 2023 19:06:19 -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 6A1A3940008 for <linux-mm@kvack.org>; Mon, 7 Aug 2023 19:06:19 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4597516052C for <linux-mm@kvack.org>; Mon, 7 Aug 2023 23:06:19 +0000 (UTC) X-FDA: 81098844078.25.C63FF6B Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by imf06.hostedemail.com (Postfix) with ESMTP id 5829218001A for <linux-mm@kvack.org>; Mon, 7 Aug 2023 23:06:17 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=cpy8Xcl1; spf=pass (imf06.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.167.174 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=1691449577; a=rsa-sha256; cv=none; b=ETGvc4N+ejKf5485PYvSh4V9eelMjsgubtZQ3c2RA6D4N5xb0HiDJOrtBHkpWO7oMokdFn BEds+cv2r7ah1YBsGx0r931JRcfN3ULeffUrwLJ50JR0Oc8SMlOsCbsWcr6iqFjPo/bMu7 I6FhijTWry9olfPtwdcWA5Y2ZyGrEUI= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=cpy8Xcl1; spf=pass (imf06.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.167.174 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=1691449577; 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=9BaWlDiv5V7gFuBlQl83W1x9C2ZQPjYd5FMjDEEKLfk=; b=4tjth8kv2/xqliu1eGorwCVZYY4bUdcHgTJZ7EXZoms5ynVY/xCVyMfc3HqRWyjclSWJy5 xNlncWanqgmwBZ6sJnC5vJEEBZiYC7wm2kYbZA0I0TcPw6mk8jKkUs6DqvfezLRsc0/q2p /jCwVEpB3pQ857HliKo2fqd25uJ7208= Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3a74d759be4so3751261b6e.2 for <linux-mm@kvack.org>; Mon, 07 Aug 2023 16:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691449576; x=1692054376; 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=9BaWlDiv5V7gFuBlQl83W1x9C2ZQPjYd5FMjDEEKLfk=; b=cpy8Xcl19ScHIaEJohMfnXLz1DqejMUY8L9glfoRJKsJ7GTvGcuQsYlnxy1uVil+vX sKLd/jl5n7/nYQY+c94D1q52xLTeGbCjuaSsuOaGb/1E2rdiSHktCUTDo4f7HqbeV+dj TPAGwr0CoWyRhx6mzwQflnUob8s/y/rCKdVhSwURC5eFFFvRnN/tn2Qy2PbiuytULAR6 gF0MKwRWTHX4EnLLnTfGRqqibjjUEq59j99BhXKpF7aj2wSWqBVgMsp2RTnzW+/7J2fC DAIl8+bDSwnR/XjlkNOvluV6Us9KQMDrngkUDG9ywXNDgTmwYNXsy+sDpdm8duXtW4+4 Ov0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691449576; x=1692054376; 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=9BaWlDiv5V7gFuBlQl83W1x9C2ZQPjYd5FMjDEEKLfk=; b=MUzoOc0LU+Ea14rqix6XjrOPl3FxLYx7uppgYwtHEamOrME8NHlFtsHxxCf99Amj2n /OiJXUn+T34FO+sY2ifwAVrL2pY9URf+Fbne6Wj3M3WLprHJlRBwqaIaKImmqWGhDceD 70SmNSOcDEP53P4KTwimsCPWYIgixazE3Ar6+NcRZWhmmXufp1iiz8JSELt1Xc7n7OxV JOApy+GAiXqWXRV+8vVLDboiyXl26tYMNf4xU076LJ4rMhvXhCC8Fy8smWRlsQuV8Kdt XFn9ZNNvikZ3sTS6dfszpQ+nMde9DUmgZno+W36mzn2P2YQOSERB6HvJdEkUex14iPal +apg== X-Gm-Message-State: AOJu0YxefuSCC9pvQ0qacbYt4lTaOpnf228WTK835OeosVMqWm1xwBLU bC89hTiExKW9uJUozY3jxiYjMd3EpsCoFw== X-Google-Smtp-Source: AGHT+IHyrg/p55954UWSWEFSK4VAgtzO3wGDAXzmBNoLynnb9Xv8FQKgcm7kods1XM481PofrT4NJA== X-Received: by 2002:a05:6808:23d3:b0:3a3:e6eb:9c53 with SMTP id bq19-20020a05680823d300b003a3e6eb9c53mr13630414oib.23.1691449576353; Mon, 07 Aug 2023 16:06:16 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 16:06:16 -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>, Mike Rapoport <rppt@kernel.org> Subject: [PATCH mm-unstable v9 28/31] sparc64: Convert various functions to use ptdescs Date: Mon, 7 Aug 2023 16:05:10 -0700 Message-Id: <20230807230513.102486-29-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 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 5829218001A X-Stat-Signature: 3gyagiw88hxh17jqgs4wncfgjp9xgfgt X-Rspam-User: X-HE-Tag: 1691449577-279022 X-HE-Meta: U2FsdGVkX18YmvFVESWm3I7fyqZqIWcdrd9uwCx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R8W9SEWx4EVGX/dkxcYjXeO7NsCBwX8LvISORaTGFVap2/EnsV4doO77jZIkMnNCoUB3tIAdlyTZTMJMhyRSGG90SKQw2WwZEvzIpM2uGbGmXylTF4qcyK5JbSUDv9fV8l6Wc8LgCYCMjUZ+72i3CpgppxBTu6w5O+1ciOvRIvTbcz5df+UtpQitqUDcmt03wVB9+Dq3tt/mNSocbuv8K0KO+D1veSeRp0L58K95qLQzBDgY7g455JM/lV4zoyFyA6JcN9k4Pkw1vLfAIRvEnWwLccqkNQ28EFzl+0reZNHacNjE+rp2xXkrerHiGU9PAq9WSNDyt9dBXn8UuPrEXpmh/MjgyjvdRErXm3IMaKVVVTA1RRJRnfaq4gmolENji3JCI5pUUrnfEHoKWTqgJAmlpZoZZGaUBJToIB6L0MTybrE7P22jxHTroZUaHyQJBTBfm3ei8O2m8K5A== 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 680ef206565c..f83017992eaa 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -2907,14 +2907,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) @@ -2924,10 +2925,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)