| Message ID | 286e9777dd266dc610de20120fae453b84d3a868.1734945104.git.zhengqi.arch@bytedance.com |
|---|---|
| State | New |
| Headers | show
Return-Path:
<SRS0=3wUy=TQ=vger.kernel.org=sparclinux+bounces-2880-patchwork-incoming=ozlabs.org@ozlabs.org>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=bytedance.com header.i=@bytedance.com
header.a=rsa-sha256 header.s=google header.b=jCnmVm/T;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org
(client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org;
envelope-from=srs0=3wuy=tq=vger.kernel.org=sparclinux+bounces-2880-patchwork-incoming=ozlabs.org@ozlabs.org;
receiver=patchwork.ozlabs.org)
Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1))
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4YGtWN2JtFz1ySC
for <incoming@patchwork.ozlabs.org>; Mon, 23 Dec 2024 20:48:32 +1100 (AEDT)
Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])
by gandalf.ozlabs.org (Postfix) with ESMTP id 4YGtWH3Kd7z4wcZ
for <incoming@patchwork.ozlabs.org>; Mon, 23 Dec 2024 20:48:27 +1100 (AEDT)
Received: by gandalf.ozlabs.org (Postfix)
id 4YGtWH3Hw8z4wvg; Mon, 23 Dec 2024 20:48:27 +1100 (AEDT)
Delivered-To: patchwork-incoming@ozlabs.org
Authentication-Results: gandalf.ozlabs.org;
arc=pass smtp.remote-ip="2604:1380:40f1:3f00::1"
arc.chain=subspace.kernel.org
ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1734947307; cv=pass;
b=BGIyouI5ANDt8bpeNIoftDZcV23+7a+blXMg0pQbj23nI1ycvxScrC7OYvqIZkTXY9ABjEpdPgDdfzG2Z3jembRbTX1miSRCU8lvqGuAOz/kBLJHxvgfQLFwgqxUW4LZ2pCkEUriCsaP9Uc8/iSNcVT3fFf2shE+MichX8z2/X1f/gXkEaB3hWTOofBIQoAv/2zQy9IJRO7wLuts49TB8f136PZzC1b8gD2YqklQAANEREjZjob/rBjG5EJmtX15ktyspRPWB1NSfKZUj/qDpej2mhVMJwuItXkr8rVHUBYPp4P/q8/XP5/+Be+EQRCNM1rqA39ep/mpQAQzi3p4dg==
ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707;
t=1734947307; c=relaxed/relaxed;
bh=VAJKsDdGNb+ALwQvMYs9Oz9Vq8VGrLJsA8GxB+kZmZc=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version;
b=LkVhCqlcg9vnDafMhIfJdjHrzZE7fjvc1XmBpmpxEi+XITGD4lXkuuYCpF2MdKvUJ/7y9I0oSdb86uMYmVCHBJMk1kE9K0VSkZ7T/yb8Q0TlsBMRNcRItuP9mqM1aizhoNpJ4oQMhIgS775A59femkZtjejOp3OpFy/Xk3KrnwWkXnquHrmdxPSDlTtjbOtikvApafk4v5V5P0hx2L2OrdLLnovLun6yR2H9smcGBzozmDrL2KtByjDtOzaXWC2U4/xM31c9W/xEXE1SXIzif3LEM07Wpw5WlAe6TjY7CpQnt4B90KaNLBZEJBTkQnygdUURUvwUPBHzBf/EhAOOjQ==
ARC-Authentication-Results: i=2; gandalf.ozlabs.org;
dmarc=pass (p=quarantine dis=none) header.from=bytedance.com;
dkim=pass (2048-bit key;
unprotected) header.d=bytedance.com header.i=@bytedance.com
header.a=rsa-sha256 header.s=google header.b=jCnmVm/T; dkim-atps=neutral;
spf=pass (client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org;
envelope-from=sparclinux+bounces-2880-patchwork-incoming=ozlabs.org@vger.kernel.org;
receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org
Authentication-Results: gandalf.ozlabs.org;
dmarc=pass (p=quarantine dis=none) header.from=bytedance.com
Authentication-Results: gandalf.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=bytedance.com header.i=@bytedance.com
header.a=rsa-sha256 header.s=google header.b=jCnmVm/T;
dkim-atps=neutral
Authentication-Results: gandalf.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org
(client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org;
envelope-from=sparclinux+bounces-2880-patchwork-incoming=ozlabs.org@vger.kernel.org;
receiver=ozlabs.org)
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org
[IPv6:2604:1380:40f1:3f00::1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits))
(No client certificate requested)
by gandalf.ozlabs.org (Postfix) with ESMTPS id 4YGtWD3Dkkz4wcZ
for <patchwork-incoming@ozlabs.org>; Mon, 23 Dec 2024 20:48:24 +1100 (AEDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 75D147A03F0
for <patchwork-incoming@ozlabs.org>; Mon, 23 Dec 2024 09:48:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 23E211ABEA7;
Mon, 23 Dec 2024 09:46:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com
header.b="jCnmVm/T"
X-Original-To: sparclinux@vger.kernel.org
Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com
[209.85.215.178])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88B141A01BE
for <sparclinux@vger.kernel.org>; Mon, 23 Dec 2024 09:46:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.client-ip=209.85.215.178
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1734947165; cv=none;
b=l/waAAx5FYxBjYlMVaD6oe7fJOuIS2mc8V38UTUZd3vk9wfXWcPyNnZyb129szX1Tx7xOwTbaJ49aaFsEE+ihqWPT1E46DiIasFAErczOtJOiUuOZk/lheXGbrWh2riLkCWJghVZOOPlL/vWDfI7pQzT4yNAQlSgJgzoGBfEkwA=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1734947165; c=relaxed/simple;
bh=AOHzYz3e0W68bypaywk5PqwWiTbsh7X+wa84FHfFzTo=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version;
b=tKvS8+5VDp4bc1nGD0qoKwte9KY12CLcwIe0J2BqwBd/25WHkqIw/ND1w4u1SdoUmxNViJlZb0tjYxTVxIHlQx1ozgjtKRwkHqsRw5uw833f1iAKnAvFcCbnI6mK/gYiqwUrJ82Y0LsJOCFBBi9L9NhBMFnaNKMTIBJsQjC1ytw=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=bytedance.com;
spf=pass smtp.mailfrom=bytedance.com;
dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com
header.b=jCnmVm/T; arc=none smtp.client-ip=209.85.215.178
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=quarantine dis=none) header.from=bytedance.com
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=bytedance.com
Received: by mail-pg1-f178.google.com with SMTP id
41be03b00d2f7-7feffe7cdb7so2366294a12.1
for <sparclinux@vger.kernel.org>;
Mon, 23 Dec 2024 01:46:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=bytedance.com; s=google; t=1734947162; x=1735551962;
darn=vger.kernel.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=VAJKsDdGNb+ALwQvMYs9Oz9Vq8VGrLJsA8GxB+kZmZc=;
b=jCnmVm/TIkWfMytO3QSvme+fClSmAs5pduO/mAkMupwhIOpUfFfT0a3ztDvuFTYn5X
xT2uM1aGyiOwIR+C9EaLYuyPxt2SR/yGOOBAUlRT65QH2trNelA5QjzYqPSWsJMv/i/d
l4xnCtTVB5DF9mzcFgJjM0DMcPXqsEH/UO4gwmjhAOJMRBiue2pkcDHI1Rg/S7WuRQDa
ihyfSL5wA9wS6NUaqQOQzoMWsZcVdkfUZeATeboLiBmZk0Po2kUCbCy0SrDbrr/RRcPi
+Yq4JF0UJqbtc7vn6uPNiBws5Y7vMX6ew/SjBHUnM/zACZH0GvcMphrcUP3vLj0GTQg4
b5jg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1734947162; x=1735551962;
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=VAJKsDdGNb+ALwQvMYs9Oz9Vq8VGrLJsA8GxB+kZmZc=;
b=iit7Uav4MIFBt6boHYc2+8dP0fpAeERg0o6GxVcRv9jTVLe//gsKtq8MBTkltTSJFv
n5wX8ke66d6x5vXUgn8AjKJJLl6lqvO47e72GFMnZGtgGG+ozav8ALMSwP8jitbNXey1
pX1UPnAHEyPW85hy0M3fgKcs8Df0LaHDNl/GWOggjp3DpD5D/hy4jyI/Un1urnQZ9b6e
Ed9JwrW+mbVEwAN2ztTiu1TZ7bGCYkekcZ9CSmXSGJp++T41ge2bekmpYPsbJL5qSNLm
S2BeBp72j9WcbrrsIijRWzbZnMVZv8kDe05544DlZgH1uSw7mxpzKzv1vhCyhT5lqAVH
NIfA==
X-Forwarded-Encrypted: i=1;
AJvYcCVBFuQozzv4ZT24Ey1Hshq1UQCiRO1PHinr84yaif4hIQ0/iWGYKsmTdVjA36iFcesvEM/aSkHdcaqz@vger.kernel.org
X-Gm-Message-State: AOJu0YyP4XwBoT7UpfiGcRGIem95DVbZQY553JxnaUKv4Ex3tj9LkyEH
IT7TBaCR0SOJHX1P3hAsT3gGigntjrNOJK41SJdxBW38crSXFr1WLWQaxO2wBBk=
X-Gm-Gg: ASbGncs0pQxi5SyY8mazu7hbLDxNlbwjZUP1iZNLxPL1eTUaNSHrGay+Oj0222SMw/7
wVdNP+M/L+EgvPOMloMnMe4GMlDMrbPNMIz2KlQ4GaMDi0x5nmkXU4mnnuOaCi9dBMgJLpRnJ6Q
fn+ZNpzDLDv22yAGVCl4Y4ZF5jRrfggRgFlQmW/Qql8UKj4ePdA1p8UFxu/Qq81Av1TnRojm0jF
HCVBirRZM3HHMjEHdLiXEjL6Gz5fZw9IX76TteDBTEt0uIgjzPi+W2L9WvwH4eSmsUnaqX2wjOz
FcHsPuBT8MYrJ9NrqYhWSA==
X-Google-Smtp-Source:
AGHT+IEiKQiNoCztX+vEmXJ78+SVJHcoRjQcReSYKDpgexw8hG6RQW+fGx0o5GN+OmUz8JwpFgmgkg==
X-Received: by 2002:a05:6a20:c88f:b0:1d5:10d6:92b9 with SMTP id
adf61e73a8af0-1e5e07f88demr18787949637.30.1734947161832;
Mon, 23 Dec 2024 01:46:01 -0800 (PST)
Received: from C02DW0BEMD6R.bytedance.net ([203.208.167.150])
by smtp.gmail.com with ESMTPSA id
d2e1a72fcca58-72aad8486c6sm7468309b3a.85.2024.12.23.01.45.49
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 23 Dec 2024 01:46:01 -0800 (PST)
From: Qi Zheng <zhengqi.arch@bytedance.com>
To: peterz@infradead.org,
agordeev@linux.ibm.com,
kevin.brodsky@arm.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 v3 14/17] mm: pgtable: move __tlb_remove_table_one() in x86 to
generic file
Date: Mon, 23 Dec 2024 17:41:00 +0800
Message-Id:
<286e9777dd266dc610de20120fae453b84d3a868.1734945104.git.zhengqi.arch@bytedance.com>
X-Mailer: git-send-email 2.24.3 (Apple Git-128)
In-Reply-To: <cover.1734945104.git.zhengqi.arch@bytedance.com>
References: <cover.1734945104.git.zhengqi.arch@bytedance.com>
Precedence: bulk
X-Mailing-List: sparclinux@vger.kernel.org
List-Id: <sparclinux.vger.kernel.org>
List-Subscribe: <mailto:sparclinux+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:sparclinux+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.0
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on gandalf.ozlabs.org
|
| Series |
move pagetable_*_dtor() to __tlb_remove_table()
|
expand
|
diff --git a/arch/x86/include/asm/tlb.h b/arch/x86/include/asm/tlb.h index 3858dbf75880e..77f52bc1578a7 100644 --- a/arch/x86/include/asm/tlb.h +++ b/arch/x86/include/asm/tlb.h @@ -20,25 +20,6 @@ static inline void tlb_flush(struct mmu_gather *tlb) flush_tlb_mm_range(tlb->mm, start, end, stride_shift, tlb->freed_tables); } -#ifdef CONFIG_PT_RECLAIM -static inline void __tlb_remove_table_one_rcu(struct rcu_head *head) -{ - struct ptdesc *ptdesc; - - ptdesc = container_of(head, struct ptdesc, pt_rcu_head); - __tlb_remove_table(ptdesc); -} - -static inline void __tlb_remove_table_one(void *table) -{ - struct ptdesc *ptdesc; - - ptdesc = table; - call_rcu(&ptdesc->pt_rcu_head, __tlb_remove_table_one_rcu); -} -#define __tlb_remove_table_one __tlb_remove_table_one -#endif /* CONFIG_PT_RECLAIM */ - static inline void invlpg(unsigned long addr) { asm volatile("invlpg (%0)" ::"r" (addr) : "memory"); diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c index 1e21022bcf339..7aa6f18c500b2 100644 --- a/mm/mmu_gather.c +++ b/mm/mmu_gather.c @@ -311,13 +311,29 @@ static inline void tlb_table_invalidate(struct mmu_gather *tlb) } } -#ifndef __tlb_remove_table_one +#ifdef CONFIG_PT_RECLAIM +static inline void __tlb_remove_table_one_rcu(struct rcu_head *head) +{ + struct ptdesc *ptdesc; + + ptdesc = container_of(head, struct ptdesc, pt_rcu_head); + __tlb_remove_table(ptdesc); +} + +static inline void __tlb_remove_table_one(void *table) +{ + struct ptdesc *ptdesc; + + ptdesc = table; + call_rcu(&ptdesc->pt_rcu_head, __tlb_remove_table_one_rcu); +} +#else static inline void __tlb_remove_table_one(void *table) { tlb_remove_table_sync_one(); __tlb_remove_table(table); } -#endif +#endif /* CONFIG_PT_RECLAIM */ static void tlb_remove_table_one(void *table) {
The __tlb_remove_table_one() in x86 does not contain architecture-specific content, so move it to the generic file. Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com> --- arch/x86/include/asm/tlb.h | 19 ------------------- mm/mmu_gather.c | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 21 deletions(-)