Message ID | 3fd48525397b34a64f7c0eb76746da30814dc941.1736317725.git.zhengqi.arch@bytedance.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 77E7EE7719A for <linux-mm@archiver.kernel.org>; Wed, 8 Jan 2025 07:00:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EFEB36B009D; Wed, 8 Jan 2025 02:00:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EAE386B009E; Wed, 8 Jan 2025 02:00:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D281A6B009F; Wed, 8 Jan 2025 02:00:38 -0500 (EST) 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 700B06B009D for <linux-mm@kvack.org>; Wed, 8 Jan 2025 02:00:38 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2A7BB422F9 for <linux-mm@kvack.org>; Wed, 8 Jan 2025 07:00:38 +0000 (UTC) X-FDA: 82983386556.30.8B13DAE Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by imf01.hostedemail.com (Postfix) with ESMTP id 3C43240013 for <linux-mm@kvack.org>; Wed, 8 Jan 2025 07:00:36 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=fRpDMN4u; spf=pass (imf01.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.214.172 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736319636; 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=s3ajwCEJzuBWHLhfIS3uOIg9mbtSga1CIaOnP3nLDr0=; b=s9Uomz9tlxN38zwtb7vDGHTShzg/AnogDeUjA6QAkmTJL+sj7bPMpWmksdC68UqmQH80p9 st1djVKDWPh50+4Yk9skU47j3EwN5C/W3x+MRgU5mYN2OCDoc/hQa/SzxMi9yT8+6qgTm1 Acmc2yJ6O/JDo7yVKkx6JTSkzSNPOn8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736319636; a=rsa-sha256; cv=none; b=CkZ4pEiPTpB9NPl3n4P+AkjR3zPCar0f8DaGaSbMJ2QJkv7+b4vtqzU0UqBehQ1uMLctzr NjnhEBNaO2oaJfiNjwQO/dR3KSf1Qv4ooB5hg9NVaElWyhjqzHGMF2n0fVwZWl+t4zJ3zw pnc+qB/EUCe83b0x3zsHEiFV4BV7DJo= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=fRpDMN4u; spf=pass (imf01.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.214.172 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2166022c5caso215981835ad.2 for <linux-mm@kvack.org>; Tue, 07 Jan 2025 23:00:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1736319635; x=1736924435; darn=kvack.org; 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=s3ajwCEJzuBWHLhfIS3uOIg9mbtSga1CIaOnP3nLDr0=; b=fRpDMN4ulKGN415gjvYDMvAW2J2hZ6ZyaF6kMFk9o4Mwq07/JXv1qOku7lwQ/MhkbP NAih8zs4EnNX5GHRNm81FOYqL84mrNYfGpOHyxXzooQU91p2bTRnrnDmJuaw1jsWdb5S uFP2jr+1Fq1NPXhrJovIJnfqDKupoMDq612w3JjvmsBYob62HZl3TKqoq5NaEzLFCkvP NptzEPPmHzlcF1xUKmN42hr8YkK1Tt7MNe7Ao0nFkwdh4XT9aCok/+Xs7k+7dA7QrSvn Q0bbgPmK6bn4s1r8ja4E8CbVEl7xHs+gWLxxaf3GMrlCren0pXlyslEZmO2kJufq5Qtc NKaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736319635; x=1736924435; 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=s3ajwCEJzuBWHLhfIS3uOIg9mbtSga1CIaOnP3nLDr0=; b=jDyCIt4JzlTYiSlN87rF9033BXK/d72mdZ7ehnmPZd/cPFlnd7j7GO6xQH12WyLrZz WmDTsGRy7mMBS4QYGnU6cO7wzqgpsM/dfaZWasR37zb668QtAQk7MyriGd/ZAy6NqmuO mpzzvbB5297G+VaXFrgmVXRyP01JBgtfJWFQMyRWO1PuvOmCD+jSv57yMW6n+k5BX8GZ c3tWWuU29ku3+xuUQP08k1esng3yY130e7GhqpvoSnJ/vlvMyNYbsFNE8LafQHldu82e HYJsCIQzUEh1W4cMmFYFQ7qklTTPZaSDZMchXftXB3+WaKtaut2SgHDEfM3gOM/4Jdax o8Zg== X-Gm-Message-State: AOJu0YxkkG7+HQQuOlyY8E7cFrPLsMDbjrK6rLlHZVZF1zgNu17ZiMm3 ifUOrusfRvzu4CnyPcfuXbSJ66QHNTNYZBBm1vtqUm/woJQpX5pXP3fbxvey0mE= X-Gm-Gg: ASbGnct6IyYhawTUC27zkYxVlWfsxvufOIycwXebF3dcdvIk9ntf7cGGPyywKgYSLyn thu2R6ZKjXdPX9DA21TIKjAkoG6IyAjArTSnSnzQHGqo6HsWo7pKSqm87p+mxiFx+GmBLV048Z/ 5RH4tAFQ/fhY+up7VxM2q/SY0HOpU5faq1hbvGWhB91hganopDIooGZBGL6woEc/X8o6DI6rhNb eEg3Kpv/ssxjlhOnYr15bg9OwubznBpp04heXnU+PgRc+4ckg33X6JKBIlh6OvWrfi1qYSjXeyn JXI9VPY+KRnB1CqwpUBGWFYg5/Y= X-Google-Smtp-Source: AGHT+IFQatZJEh1vMaYN2M2lTtxd4TB3DgwS5fDlIHVUeP0cQjVCzCSP2sGAFE7qJT7hKS5hKn1bKA== X-Received: by 2002:a17:902:d4d2:b0:215:9642:4d6d with SMTP id d9443c01a7336-21a83f55157mr23731385ad.17.1736319635015; Tue, 07 Jan 2025 23:00:35 -0800 (PST) Received: from C02DW0BEMD6R.bytedance.net ([139.177.225.244]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dca023a3sm320067275ad.250.2025.01.07.23.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 23:00:34 -0800 (PST) From: Qi Zheng <zhengqi.arch@bytedance.com> To: peterz@infradead.org, agordeev@linux.ibm.com, kevin.brodsky@arm.com, alex@ghiti.fr, andreas@gaisler.com, palmer@dabbelt.com, tglx@linutronix.de, david@redhat.com, jannh@google.com, hughd@google.com, yuzhao@google.com, willy@infradead.org, muchun.song@linux.dev, vbabka@kernel.org, lorenzo.stoakes@oracle.com, akpm@linux-foundation.org, rientjes@google.com, vishal.moola@gmail.com, arnd@arndb.de, will@kernel.org, aneesh.kumar@kernel.org, npiggin@gmail.com, dave.hansen@linux.intel.com, rppt@kernel.org, ryan.roberts@arm.com Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-arch@vger.kernel.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, linux-sh@vger.kernel.org, linux-um@lists.infradead.org, Qi Zheng <zhengqi.arch@bytedance.com> Subject: [PATCH v5 05/17] arm64: pgtable: use mmu gather to free p4d level page table Date: Wed, 8 Jan 2025 14:57:21 +0800 Message-Id: <3fd48525397b34a64f7c0eb76746da30814dc941.1736317725.git.zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <cover.1736317725.git.zhengqi.arch@bytedance.com> References: <cover.1736317725.git.zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 3C43240013 X-Stat-Signature: q8y6e114bghqw93rcb4mtpbfsoi3no5o X-Rspam-User: X-HE-Tag: 1736319636-267282 X-HE-Meta: U2FsdGVkX1+Rn9/nxSF3HmxETDacwN5XzxpLDxN72r0ccQ81YKsAazcNS30cnZHfpzlqCJBQ2BTTXVm/q+PF1mjG9BW7pw90CwbrkLMDpceSgyEGUAzm/r11cteoAAEpzwL6dH7wMr9HMMZfX58qWzxJquBrP5lG/P7tzd4DoF67gOwlYA0igOmsXwsYLo/CWWQmBMNfBABiiYbKCKijpwc6dGMGsIy1ZvqXZheVLNfTdshdHkZiJkfCCywdN1mk/goQHM0k3p8w8YLXs/SAXGOFgFw9N6/I90sjOONWoAlNLirI81Y8u3QPtS4l0sWE/v8xfbB9ELzgv0DddYHDrfqzdyfQCXbDSsNkxIOJDdcYexRGROv8bPSGgNHYQuFaDZ097iMvhoofVw7QPDegut8tfhTB0CTaJdJLVJsprJwdXZ6BNcAWKK0GCzSoBMvYKEpFXEZl5P8wzIxHEgIsaWE1bAdqN2dmE9+pMdbBXKvQS3krGj1i8akbyZcZhNMY79gcvTtLW+NwbfC3ePBeAXR5e//JUVysa2XZ0JW4TJ2b5PSRVKZNFlLPYgYSjE/pKMgmRKlgfmXhQ6NC9nf/sat4f99ey88tlyu5V28BiFd5NQ4U1sbe6LvNXvpfLVii/YvzTKmBJaEOYSjsAfT6r7350u9s61NF6vdsrQmKvOrMaPmKiBYRDkPUu8L1ev1nqnADPhQkU0mXTBqvBoda5orsk91GUNU7FQ9B/K9rT2Ha/WHm88NtDin6vNtouUU7MhUdyV2beGWKMWj2msYsQOxOfZ6yEJuEkuyQNkyA9IR0yf0YQIRJ7/99p5E1eFw349D5QrvoKqTBLFvxUPd8BGHBeVWxIKBof0GZbLhtP/dgSCQ4NuMm9yi3JxoJpgvpcMWB5ztTcXutKLtkLi0jCITTKOXV1W9sH6LvslTqTe0U5vhVUzPqIu/5glzJC9i5MD5Ry8Ylvsx0i1k6vjF Yo5DtpBH AotJDrMwmz7/cJX+lbbh1o8M4hdoxFBPR488/AokGYxcSjI4cIKDllZPLvT/VlVHdWcswUwd+dMi3+50aQV1Ya8D8abpp+gMixcEVwgPvv6NU7wYiN54hyYIcZo6vH1WH5DpGtr3gPhz9OuXlu2Fe1FaFCE8euJrkQpDB79HrhkPoWxppxnqWi5PqbAIJ9xFb8LulHdwJra144jKmLMM9LxtfqkzIFvzmbdTqBmen1NCRu7hFK1okpNsJE/khzaIw+s+ygSllQLjrDDioQDXNA7v3/p/X4zi13v20pNli3mS056OQVjGxCByDwTlrjzHvV/u8cacYTfHRyuLlVR+8palqtmEFTBallprhZgv3YMrcbda0WKLxiWfh244geemt/pdbTRM48kyPjASovY2kYEUTCQFILby6uUmPWReYvKe92n3iA0e65R306PgfLIvwDFiJlq1onj3KT90SJX36BTFNR56ZmQRvZQ+umCJMafaEbZb/H+OC1k75eA== 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> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
move pagetable_*_dtor() to __tlb_remove_table()
|
expand
|
diff --git a/arch/arm64/include/asm/pgalloc.h b/arch/arm64/include/asm/pgalloc.h index 2965f5a7e39e3..1b4509d3382c6 100644 --- a/arch/arm64/include/asm/pgalloc.h +++ b/arch/arm64/include/asm/pgalloc.h @@ -85,7 +85,6 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgdp, p4d_t *p4dp) __pgd_populate(pgdp, __pa(p4dp), pgdval); } -#define __p4d_free_tlb(tlb, p4d, addr) p4d_free((tlb)->mm, p4d) #else static inline void __pgd_populate(pgd_t *pgdp, phys_addr_t p4dp, pgdval_t prot) { diff --git a/arch/arm64/include/asm/tlb.h b/arch/arm64/include/asm/tlb.h index a947c6e784ed2..445282cde9afb 100644 --- a/arch/arm64/include/asm/tlb.h +++ b/arch/arm64/include/asm/tlb.h @@ -111,4 +111,18 @@ static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pudp, } #endif +#if CONFIG_PGTABLE_LEVELS > 4 +static inline void __p4d_free_tlb(struct mmu_gather *tlb, p4d_t *p4dp, + unsigned long addr) +{ + struct ptdesc *ptdesc = virt_to_ptdesc(p4dp); + + if (!pgtable_l5_enabled()) + return; + + pagetable_p4d_dtor(ptdesc); + tlb_remove_ptdesc(tlb, ptdesc); +} +#endif + #endif