From patchwork Mon Jun 12 21:04:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13277376 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 33DE5C7EE43 for ; Mon, 12 Jun 2023 21:05:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B200F8E000C; Mon, 12 Jun 2023 17:05:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A5AFE8E0006; Mon, 12 Jun 2023 17:05:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8AC9F8E000C; Mon, 12 Jun 2023 17:05:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 7CC148E0006 for ; Mon, 12 Jun 2023 17:05:56 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 44FA2A031C for ; Mon, 12 Jun 2023 21:05:56 +0000 (UTC) X-FDA: 80895327912.27.FAF2A1A Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by imf28.hostedemail.com (Postfix) with ESMTP id 568D7C0009 for ; Mon, 12 Jun 2023 21:05:54 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=Tn4mHghr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.160.41 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686603954; a=rsa-sha256; cv=none; b=F74uSphlzn8cpDRW9NxRWLoUqq+2E1JhVgiGY2oVv2vfPwShkTSzTjTj9N3VQP+0ZZ8VfJ 1Ljr1GJgl0jlzhplQupaSI0BblIiTzhpx44M0aN/Pw9vjBMDWzJhsP/J6EvW7SfLbgNZcJ /nko1lTTiLEYG632neC4jcWGXYEq0Hw= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=Tn4mHghr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.160.41 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=1686603954; 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=cQ/uV998f7GBK3U8fEwXlOSI96PW+5wzkUNMHiphdSU=; b=77OYLagIcgYOi9EnYZwZd6zGbABvDUsPk1k0wMzgaiLyf0P52zgDv/8shCi4sk53ynFa5X hBNLyrCnuyo84RCaogGs//hCBZBX2IZXILOBlWWRiHuFpykqB+Ch4Zi3KirE9Hfq7UQQk5 WRaCdPp8vi17Jt83PgH31hfhkKQiinA= Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-19674cab442so3249655fac.3 for ; Mon, 12 Jun 2023 14:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686603953; x=1689195953; 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=cQ/uV998f7GBK3U8fEwXlOSI96PW+5wzkUNMHiphdSU=; b=Tn4mHghr2z50QboRcFFwBXnQDC7dmOVTmd7q6odwa9ofCDQNfilhaBNviFDHX8SrYA fagx19tWV5xnG2unDu30AzBD8hFIWArocnuzCUa1K7AMS5VYUgKKhDVTLptGD0WPUw8/ ZX9JliY6gx8+hXM3OztwRe71m1A+kx2eLC7qxtJVOpdoP5HVloTMtr0/abQT4yyYQOzs IVhZgoGgAdf28rfS5OorktySibfeqB5FLW0b+HoIsUsy+Q3Hv3TNg2zjbv2EGrbvSAhn +UJqDlCblQUHBUCUqLriRDZ3qurN8WXPOHGnwhy4vkGIt3E2YX1KhqR56pPwBtbb673W dPyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686603953; x=1689195953; 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=cQ/uV998f7GBK3U8fEwXlOSI96PW+5wzkUNMHiphdSU=; b=JVtk8N4+rD22bJsTdgztgpIqMv+ovdHZmPYnhKyuXiAVimCt5eIhBmaT4GAdGCpN9g RyslHUj5eW+nxxFq2tBEvNa/cuzegc1RtFgJdHfD0anhyQ/mmPVZBKspYoQpLmvaSzR6 d8YYPC5uqLpW0eg8z2r35PT9CVL5Kljn5bUSEPEJSFA16W48vpPebA/UBsNI8GSkFk3s Th9ftNwar4coXylwgpCXN743FUoh5EO+Z6+ztQRZkycghdLeY5IDfcQvH97yQLgcTriU 7Dexj80HNJgtknuNgYiMOq4F0TP5o9HgL2mJ4L8G3snwaTbeBQ3HkhMRIho72y4os6tm I7vw== X-Gm-Message-State: AC+VfDxKhS9j0tHP/zFhDxV88SZZkihkCID2C+DEYVsEx9mWH7SuHKwL M1Si48qrHCJbmH1Jra/CzBc= X-Google-Smtp-Source: ACHHUZ4ThTH5LM1afe2PTTFtQ0ZfGkzFFO1FbLLwGaoZUh9UZKP9YYPXqsENj3drsF2z7+M8WUTgQg== X-Received: by 2002:a05:6870:2207:b0:19f:5701:8c47 with SMTP id i7-20020a056870220700b0019f57018c47mr6429537oaf.9.1686603953383; Mon, 12 Jun 2023 14:05:53 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::16]) by smtp.googlemail.com with ESMTPSA id s125-20020a817783000000b00569eb609458sm2757115ywc.81.2023.06.12.14.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 14:05:53 -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 Subject: [PATCH v4 33/34] um: Convert {pmd, pte}_free_tlb() to use ptdescs Date: Mon, 12 Jun 2023 14:04:22 -0700 Message-Id: <20230612210423.18611-34-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230612210423.18611-1-vishal.moola@gmail.com> References: <20230612210423.18611-1-vishal.moola@gmail.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 568D7C0009 X-Stat-Signature: haryuswt4k34r656cumwtfiqgtmtwsfy X-HE-Tag: 1686603954-164995 X-HE-Meta: U2FsdGVkX191crIWr6SOGWMfjiG2L2SFD/TcYEBEzYxSrmeW6iW0A1Zf0GYcrRS0gBmPLiepiZZOP/DfbqLlsXZmbK7kgEnOyACEwLHxr41hCA34mBzoozJr7LEuHKn6CoExqzlqcB1mzacyZCvqexHoTVjVj4B62d/PpvQqp89S3gT4A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gloLu/vqBt2d9Ox27IELkLrjd0sQGWYzteMjan/U4DycEVNyu8N6yZJKKh6b3TaioxghurVOIt4sHtbr8rMJ/cnLdyc5SkflVyO2FW4q6003fjsRpAop/77NMxxw2Yo5dEqWLV+wFT8zq5WH4B71GE8anlbxh5Mb0pP8ZuV7JWBqkBYS/zvsDLyWcLhrRlrPGxYz3C6Y3qoG88R7Ha09QNdxLovDs6o5cjaHqUab1dW6cyfD6opXmci1ofnxivNuhi7tvQeXSGqPCDMh19ZR6HN56d8Jp/1aiQ+iHPA0d/5xO8dKd+b/vkH/vq/ZnSy3A= 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. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- 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