Message ID | e2a1b07eda16eb84bdc51f6227fec02f2c0a54f7.1737637631.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 19C90C0218C for <linux-mm@archiver.kernel.org>; Thu, 23 Jan 2025 13:28:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 85EAF6B0085; Thu, 23 Jan 2025 08:28:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 836B56B0088; Thu, 23 Jan 2025 08:28:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D6F46B0089; Thu, 23 Jan 2025 08:28:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 4CD8E6B0085 for <linux-mm@kvack.org>; Thu, 23 Jan 2025 08:28:32 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C57458107F for <linux-mm@kvack.org>; Thu, 23 Jan 2025 13:28:31 +0000 (UTC) X-FDA: 83038796022.06.3385D34 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by imf10.hostedemail.com (Postfix) with ESMTP id EAF30C0003 for <linux-mm@kvack.org>; Thu, 23 Jan 2025 13:28:29 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=N1HFTiXO; spf=pass (imf10.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.214.175 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=1737638910; 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=nDJpscd5iDH1/vb94JK69W34zwsdKCnkCWvmFoEl4dc=; b=vaF08Q6HLjsYcqI7c1etJkK26qm8njWPUBVjcnAzZh3KFJwGm8kGAUHTqHq5T1Y8wRbC50 aDfoqCbGNiPBJLyGCY/IuDdy3aBiVnwPXncNPw7eq5oESGP9/avzOquCo77J4P2XMAYG+O H9mM732K9zpXEqIB8fAorRa5a0iCnjY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737638910; a=rsa-sha256; cv=none; b=AXbOZQ7owrDtrrDMo5uKlG+KdvY9FKOOkCVUKglw12L6CnG46Jh1C6vzjE6bIQA8g69V+m 4MD3BkE4qveqYZvrT0yNN5WElGSMGu/3RzLiWP9L3/3bCmS0lIYMTUtQHF9sLeeKU8VUyn jNRfKVHeRGcvre5zJ5WdHBOOQAcsr90= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=N1HFTiXO; spf=pass (imf10.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.214.175 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-21a7ed0155cso14783675ad.3 for <linux-mm@kvack.org>; Thu, 23 Jan 2025 05:28:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1737638908; x=1738243708; 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=nDJpscd5iDH1/vb94JK69W34zwsdKCnkCWvmFoEl4dc=; b=N1HFTiXOJQjRZB4bgG6PaiubgDGZjbxbeXT28gvg4Et/DUscMFuSgMbv2Ee/wLswO2 /ODhy6AjF6/wl3Dpx7o8DT6JqkoR4EsBFmR1PNUZKw3riKr5QvFuk4VKzF3/x3ZuHFWz HHrU/VNL6IHxlPwAeNbVRhbhEUI3ydJlN703AnGdXBKGTeiVoSo+/76fyXBFJfEpAAt/ bX+B+6yJdIHpurvg0W1qsC9OBHsmjfWF2FJ2sKIU3lVHoAV6AfXaCbCyAiesyhVjOKLe X4sqktotKZAm6HT8q7YwDwP1J1TeHI8NN6c2lXf6e7dYPjDnncHZO31a/zzj1IjlmUzU d0sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737638908; x=1738243708; 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=nDJpscd5iDH1/vb94JK69W34zwsdKCnkCWvmFoEl4dc=; b=CoF5wET+WUC9dYTuDzBPfzPoAqIOr22pbfDFSP0uBTX0OOQAFQHzLCLUUfikglBJ/s pM4t96prZ9Ve4wO2VLLJQGxTh+CfqroftKOFNjrMtncjvsoq+8iZ+X7wY+djz7EYT2GQ nUScTpkBGijxp3ilF7c5InTqCl/DHvbKzBJ6Th0+5iC6j2fst9wx6728eNOhHoW1GC+e Mtf3TwyQWkdKG8Z89wYL0CSBr/yMY5JpSSkZOIkCftWEfxRW+EuFryVLjPs7K/6P/P/E 8BA57wKiG88eTo+j4yx2k+2TIi0t4yGA4PZB0eKDJOshe+A625YC/NHvQbkN7qtfariM Wecw== X-Gm-Message-State: AOJu0Ywa3k4VeiPFZFSwBhgwkuZcLU/JYQH1gx80FoUbHkaIk9ZF4apL TDrTN6KZYN0D2kLZj69Q1V2am/vxPe6MXRhyCfpQQB5mFRH3+I9yeJ9466xdFGY= X-Gm-Gg: ASbGncuzBvJCDg21GENaFuoK4MV//19mTCeIFAPzgAkoN1dpGPCzL5EWFiv1xxsStgg /fpQArgyfs2ZMJ44zvL19+33XNJJeiQzB/VXIWw/FBTcLAV5lpUr2sUXw4jcW8jtUu6ydjKpg+I /iv4ZBgZmQArdKo0BcUGvN8aOwsPW8mS5UC5J8a14k4kCC/r0il+yqe7kB9A1wGwcFSqG4n8AqS 21Yf38l4qyWoy+YGo9GXJpcfymX/6m5qNWaETLCIoqkqXfbap0EsF++fzTKYr87z1fLnnuLMxX6 kdcaPFe/aam89KxXVlp9DfRH4/2EBEI/MSl6egtGPhV6 X-Google-Smtp-Source: AGHT+IGvH4jPt9gEk2i8wJlEQCGHtq7Z8F/nhrt9cHdxqXKECEeUfNk2qVC/Ig+lLuwaqRjslO9WHQ== X-Received: by 2002:a17:902:da8d:b0:216:386e:dd8 with SMTP id d9443c01a7336-21c3540cd05mr367659545ad.17.1737638908563; Thu, 23 Jan 2025 05:28:28 -0800 (PST) Received: from C02DW0BEMD6R.bytedance.net ([63.216.146.178]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2d3ac3e2sm111583655ad.139.2025.01.23.05.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 05:28:28 -0800 (PST) From: Qi Zheng <zhengqi.arch@bytedance.com> To: peterz@infradead.org, kevin.brodsky@arm.com, riel@surriel.com, vishal.moola@gmail.com, david@redhat.com, jannh@google.com, hughd@google.com, willy@infradead.org, yuzhao@google.com, muchun.song@linux.dev, akpm@linux-foundation.org, will@kernel.org, aneesh.kumar@kernel.org, npiggin@gmail.com, arnd@arndb.de, dave.hansen@linux.intel.com, rppt@kernel.org, alexghiti@rivosinc.com Cc: linux-mm@kvack.org, linux-kernel@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, x86@kernel.org, linux-riscv@lists.infradead.org, Qi Zheng <zhengqi.arch@bytedance.com> Subject: [PATCH 1/5] mm: pgtable: make generic tlb_remove_table() use struct ptdesc Date: Thu, 23 Jan 2025 21:26:14 +0800 Message-Id: <e2a1b07eda16eb84bdc51f6227fec02f2c0a54f7.1737637631.git.zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <cover.1737637631.git.zhengqi.arch@bytedance.com> References: <cover.1737637631.git.zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: 54qmjhci9435bgpb1fdahqxec8395q9p X-Rspamd-Queue-Id: EAF30C0003 X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1737638909-800770 X-HE-Meta: U2FsdGVkX1+6AftpZrZBFNF0095y4njIZtio5Ukd+hHDQkqw/UnuccuTjayN5cdIwcGlG4s+MQN2nXYveU3w/Wz8slbSSybQuLcU7I52GekqjN4s13ukXMOKuYhegZ+etEJ4mZ8e7EH/wJ11ocg3n1xUOlEKOeB2vU4iwa8pD/BZz6HsCyEZGzwdvezqt4w+UpyzcERcc90ynfvis12kCus6fMwpXcARTrmquFFb4NWSbvba/9tluZkZjjEhuNESk0o70G6LwRNzl4L2iOendKlX7wXsYyPJRAeRcna5N5xoqLRU7AhC9675ipAANrKXa2POAJhdXa3RpejtlqkXszAGJjyfdqKyGy6TD2CsZlIthZfwn1X6UccZh1Ndwlu+1L8KDfNLCOiWmYS8PdaX3gG8iZiDD94/VC3VqJ/WknaZOqRobqZ3goaPrGCa8QtxtGUM/tXv5TvYPAzdPMv30e6D0EpE5O8LL4Hd8rZLKSepYjpdzDdyaQCufEPwUfvYCnoyF0TSFUUvFk8dFBi0F0r0ybdLVb/qGTxv+/dWpfK0kmzlY4j6i83OIVWiMAcSZ6MV2qAie5Dw7lZqx1CYjkgaRAdRy9R2QsJ25gFD3K++njqHnvyy8UBitPkJWGeT8tqCiBGhutZbhWTGIajhjmNquy2A85iFN+1MvK3NttgU3UTqIrYnQaIDI7OfLYDfPo63TpNeVOk6ssrH9iYCqxC8/H3ehehwMwjkWDthyo6fsYPFUarhSh3iNXspDB+mCkSFdNfUINWOMlEg9UCW0udxNaqKAXVLzNCvlSy+kZNFU6lGq39In6WFunDbD6iIegonNGfJUteibd9LgcW9QpptEuD1LNhebrd7M5E3xn4oKJKcHL4VMux0vaoaLKdTSaDRV5Td0XpXP7X1/rs/mlf8LVRiykojvmR8EqeHKIFbNBVZH+zzZcfK7YyskIXNZOzla2r54tFRWITUULJ ugYBB37Y lu0yFPf58P8yVuNY2qkyS9Jl1GyaI8aoYkKBs+fsvKqhqM7kKKaNMky/VVfqSEbL5V0J0+xmV+6YbGuTXk+eI157gcRynmMzmZHQGzZs2ko//z4nvVO9B8pBVX77yganSkYFp5RAjtsGwzBK7sdYczz5EXhc27ajEWzsYFZzMiHrfkR9VP091+UHEApE9bNfVqg1v2RvU/rYG9oNje+VVF5xEhUK4Pptl8MYDpOCdOx24ZqwpBFk60Wqsvx8MtMlbEtggoRSHVor/HI+9Qg+wBd4USjdITdHZOyl9Yz2E6seDSrpdjxImVfPWAPx3bTpPoweby6sredTjZ/qahl/07BR8khS6cl8c4Xw+p8vefDPZoIQkN+00f149v0OtGUFXZHWzpujysrzS1QjhHnHbGw90bZiFDA6TDCGWvABU009pXNMW0R2e/fwsNw== 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 |
remove tlb_remove_page_ptdesc()
|
expand
|
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index e402aef79c93e..10cdbe0e7adfe 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -228,10 +228,10 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page); */ static inline void tlb_remove_table(struct mmu_gather *tlb, void *table) { - struct page *page = (struct page *)table; + struct ptdesc *ptdesc = (struct ptdesc *)table; - pagetable_dtor(page_ptdesc(page)); - tlb_remove_page(tlb, page); + pagetable_dtor(ptdesc); + tlb_remove_page(tlb, ptdesc_page(ptdesc)); } #endif /* CONFIG_MMU_GATHER_TABLE_FREE */
Now only arm will call tlb_remove_ptdesc()/tlb_remove_table() when CONFIG_MMU_GATHER_TABLE_FREE is disabled. In this case, the type of the table parameter is actually struct ptdesc * instead of struct page *. Since struct ptdesc still overlaps with struct page and has not been separated from it, forcing the table parameter to struct page * will not cause any problems at this time. But this is definitely incorrect and needs to be fixed. So just like the generic __tlb_remove_table(), let generic tlb_remove_table() use struct ptdesc by default when CONFIG_MMU_GATHER_TABLE_FREE is disabled. Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com> --- include/asm-generic/tlb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)