From patchwork Mon Aug 7 23:05:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13345314 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 F164BC10F00 for ; Mon, 7 Aug 2023 23:06:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B2513940023; Mon, 7 Aug 2023 19:06:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AAFA4940008; Mon, 7 Aug 2023 19:06:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8DBD2940023; Mon, 7 Aug 2023 19:06:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 7205B940008 for ; Mon, 7 Aug 2023 19:06:23 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 50A12140250 for ; Mon, 7 Aug 2023 23:06:23 +0000 (UTC) X-FDA: 81098844246.09.74E2C53 Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) by imf09.hostedemail.com (Postfix) with ESMTP id 82D00140024 for ; Mon, 7 Aug 2023 23:06:21 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=ZmZBlK2B; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf09.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.180 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=1691449581; 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=T9QlLO1dPeyZnWI5hHw1TuJlTK1nfQVgIvIYX0JocUU=; b=ea+mHP8YW9YXRmRnKvsvgA7+YBPmL+6q6xdn95uOK62+PBwwnpV91lHxe1sJfBuk1qE+Hu m7tXJAAF0lm4Lb2MTp/zFYUYOpFOb9Ob3QXAL2Di/k64KanOnMW3Zyl1qzJr/dIPR7j9zZ CAoMt9mxyKoEjiWaYh/7TsO6jONZj0k= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=ZmZBlK2B; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf09.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.180 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691449581; a=rsa-sha256; cv=none; b=epO2QnnCibBmFvpP/V4tpaGILy3VAsBONb8QjBJgqePS4zgVDUgr+FnOwXp8HWQgjcJRsw JUBl0I1muXDF7VO6tlnWY3gOf+XryYE460HouoqYDp9y0rp9PnPh95+qXkcBz7N8s37w+o fpquZO6pQf5Zz/UzRGMcuzl3FgANP3Q= Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-d44c2ca78ceso4742227276.0 for ; Mon, 07 Aug 2023 16:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691449580; x=1692054380; 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=T9QlLO1dPeyZnWI5hHw1TuJlTK1nfQVgIvIYX0JocUU=; b=ZmZBlK2BE47dPXTqc8IQ1uTKCUobrHijjQnotS76WbJUUgCGVOPFVEmsLAOFQve7Mq 8k04A5/AuFSS607BBJG/Nd5XpAmnH5zPypJPEnlo7r978iqN52fpsMDyDxOev3Z41hLb CpvzpxqdWGHuM0xgZvYoYbOi2GTwb0pfPUe0oyJziB36Q6lozhNOIAq2JTvWjnhFdQ2U 4BFxzsH5/HG/XXl5/YPVavhDi3L4gvkLB1NxxGw9654yYac9diJlEe3+5Z8y0K4G8C7u mJwXJ96QObfNW/oMJd7PgnIP4//NNbVjGeiAj0SJF/1wFKYAbBETcCfRmwi4qkbVDTFa RY/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691449580; x=1692054380; 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=T9QlLO1dPeyZnWI5hHw1TuJlTK1nfQVgIvIYX0JocUU=; b=hDCMdZPFRyRGhAU6htYk2TLHy5o+mtxPKLioTZlLzWdFTaMwXRBaaincYaiXTZRpZW W/etwGmGGiuoxPNrOIaPnq6z3GoTyoi74Ip+dO08zkZniyv1Sovb5xvRROtrnhd3HSxX QwCKEdnqzR8/WfwhCDfTM0ZRzggyZ3fI/nHQt8rd5ErIx3iluQeARrlccuTjHw/5erjP bBcCEtLDgg8LlC+jYwYgDW3MylAeBvHZUUO+mod8bp1EQFGqP+/lpGmxOnCF7e2+YakE 4yqgzJvmmMtjfz1vRcy6QGnr3CtpJIrX8WQMb0VjioWvQEmdSUWupswHShmcOZkBsaBE vJ6g== X-Gm-Message-State: AOJu0YxI5Q6p2UwGmg7v7uTbK5F1va2BFLDJAT+zvrrx1JYCBfIzjYAJ Jiq/u5KXB9nklIsIAI1wNf7nOSiSbl8Tgg== X-Google-Smtp-Source: AGHT+IFhMlpHJ+7onf6BYxf2ZEVLLZTaCynnVlAbd/4Vka+RTYiQ5OXzXPwOq0O9emhI9trC6wG3Sw== X-Received: by 2002:a5b:f8c:0:b0:d0b:7e30:6d17 with SMTP id q12-20020a5b0f8c000000b00d0b7e306d17mr8498276ybh.14.1691449580620; Mon, 07 Aug 2023 16:06:20 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 16:06:20 -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)" , Richard Weinberger , Mike Rapoport Subject: [PATCH mm-unstable v9 30/31] um: Convert {pmd, pte}_free_tlb() to use ptdescs Date: Mon, 7 Aug 2023 16:05:12 -0700 Message-Id: <20230807230513.102486-31-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: rspam09 X-Rspamd-Queue-Id: 82D00140024 X-Stat-Signature: zjup8q3mkgabpa18beozn39b3wkbkbf7 X-Rspam-User: X-HE-Tag: 1691449581-57732 X-HE-Meta: U2FsdGVkX1+2fN12wSYHzdA6jWbvF9EKAccB9daBL6Yiz6YNRiGPuahVi3Xuq+z6WHL2SxMxhVeiHXM2f4Yp+OMWASJMIj25Rmx3UX/loOcXUwS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LMNW+I4sMhN82zcSoxzMAO/UO9k2lW2NRtigpF8pIeFXe6jQVevG2QxYDeAIxPUslVVpKxOLgBhsJSdlbLCDF+zoaIKrQM8ngmtknDY2JCgKlKZv2PRukoqStqC51OYYPCNFA/iGGnZWwnBjlcron5eyD/y94lYtXasZ5Vp4TsFVmgZZfYS3SMmSJA2ui9ZBx5zhV4KuYjpfkYZOlkSemahvm4MJWxMvniyw2T2ykGig4zSsKchCgUukErTLYOg5UvdKLv2OTgQJtOyqt2ySL6sSljFpbno8OuMu7mXWAokoEohcDCd8LcvQ2u4JB9mn8ELhQ00UU3R9f3nnoSl7q2mUlpD0QqKjAd7goqkfUJzNGjH3SPoinsZbkT9OtIpoDioFw 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 constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/um/include/asm/pgalloc.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/um/include/asm/pgalloc.h b/arch/um/include/asm/pgalloc.h index 8ec7cd46dd96..de5e31c64793 100644 --- a/arch/um/include/asm/pgalloc.h +++ b/arch/um/include/asm/pgalloc.h @@ -25,19 +25,19 @@ */ extern pgd_t *pgd_alloc(struct mm_struct *); -#define __pte_free_tlb(tlb,pte, address) \ -do { \ - pgtable_pte_page_dtor(pte); \ - tlb_remove_page((tlb),(pte)); \ +#define __pte_free_tlb(tlb, pte, address) \ +do { \ + pagetable_pte_dtor(page_ptdesc(pte)); \ + tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte))); \ } while (0) #ifdef CONFIG_3_LEVEL_PGTABLES -#define __pmd_free_tlb(tlb, pmd, address) \ -do { \ - pgtable_pmd_page_dtor(virt_to_page(pmd)); \ - tlb_remove_page((tlb),virt_to_page(pmd)); \ -} while (0) \ +#define __pmd_free_tlb(tlb, pmd, address) \ +do { \ + pagetable_pmd_dtor(virt_to_ptdesc(pmd)); \ + tlb_remove_page_ptdesc((tlb), virt_to_ptdesc(pmd)); \ +} while (0) #endif