From nobody Thu Apr 9 11:16:17 2026 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (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 A6F6E40F8FC for ; Mon, 9 Mar 2026 19:31:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773084675; cv=none; b=Qv5/QB4HOqmeB21Jkc/g87Eq9wyrPJ9qvEp0xRVSxUrDkaniSUZBOeVS4+xHxe6UJeewNKzyZuj4MgOE3uVcFuKRMh4lYZqgPCUuSPIZjfYCnc8qqFDCvHZVdWznqsPcpyp7MxjMNGknMtUukZgASA7dOD2CnxiZaNMFdFBvL0M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773084675; c=relaxed/simple; bh=zqSouceZtFC5TpkGpy+KiFus4h62hOvNb+G9ZODiRYE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=KZUTEWyC2ji4avkh6e5m1nwuK43M1mz8AEsqfOCVrEoSugUeGVgsmLU405MiT8lEXzFaPesguBTwdRKjfcNsr64jRL7x+gEBL1Ndy8AgQ2ohVgTwFYF2g6NgRkOa7T1PQ45A8CMW6QcR429CjkeAr7UEjqSmTHPm8jYQ6ts0HrY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=XUgzOMyp; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="XUgzOMyp" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2ae669a8ff1so327515335ad.3 for ; Mon, 09 Mar 2026 12:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1773084674; x=1773689474; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=wblNA6bj3f7w06PD/nTLmV/SuffW2mSGdWVBXF9Y8dI=; b=XUgzOMyp9Y1oN6fXRl22p6JHmy+Xk/0x9JJMz5aNgNrg+0pZAzkdJhdZsLswx6n5JD ciR4DVH6f4KR6mMlag6337uQsGjHDcGmcEtv/GvO9B9yvCj5MrUS6JDPZ37lI0Fkmmir wX8bMRkP4t+3Il56No5JdzJMxuKv5MWXfqu4R8t53MJ5f/pESOzRwkfvTabK7WdYBu1d WcKbWcr4u+FHYuLs/zV6DMOOAuWOlYx5l6lw/5+vLwLnpYT/JUJ/IETPlA/NQStMviGE JbEHh7ZDbsx/TSGttOlv/lUtV8hPCgo6sblYdZDRBWMMAIc+EBLPle/VpeqylZr7jlmq RVmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773084674; x=1773689474; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wblNA6bj3f7w06PD/nTLmV/SuffW2mSGdWVBXF9Y8dI=; b=pzSyZefG/bJjmN85AI8GanysjvcI8VUOqC7fQ5xAVnSG9hKNiiH5xFRilds2+yQ5re V6oYh20fLny6xdTyEq1Udv7+SP8KkCdBueES8k/U3Z/JqMxXZrpSLmdpJPQRP0ZWHR3u va+9+YvKTbqyxa10j9iTvwzgNm2vEYXJ6cNXHmf78r1kAfKZZtFQWRoUPrSET1CVNRRt vsnCPqEnSp/s1ztkTp1lGN+JzoyHpkmdWCUQ7OUDOLaSNsFw8gzvIFin143X2SFBKrkx CWeHMQqtAZJSsZkIcICZ0Tmsv2GSBy1mnCGr+PQVA/6r6Z8yhMGvyX6EMGkKa/B5K0Y0 PuVA== X-Forwarded-Encrypted: i=1; AJvYcCX6yalgKm2NM1GGU/GaObfom4A03e+nmO0EFVmvv0g9c9NFQ/cXplIeqxdQVvJ6skAouICrHqjeLnikTwM=@vger.kernel.org X-Gm-Message-State: AOJu0YxZVqBieYJpseWBaLFhSJitkkng7+Ba0hZvunumaEIBXsNTM2oO QsJ5TdWIS+sk2gbVj0Le0XGOdzTnxzmrvgI/HDzEaee/2jMjMkPynDlhU3Ygz2kKq/1RB4mXp1z 1+8Wd+w== X-Received: from plcy10.prod.google.com ([2002:a17:903:10a:b0:2ae:45a4:ca9f]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:2b06:b0:2ae:50ec:fa2e with SMTP id d9443c01a7336-2ae823a1f61mr121594565ad.21.1773084674028; Mon, 09 Mar 2026 12:31:14 -0700 (PDT) Reply-To: Sean Christopherson Date: Mon, 9 Mar 2026 12:30:57 -0700 In-Reply-To: <20260309193059.2244645-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260309193059.2244645-1-seanjc@google.com> X-Mailer: git-send-email 2.53.0.473.g4a7958ca14-goog Message-ID: <20260309193059.2244645-2-seanjc@google.com> Subject: [RFC PATCH 1/3] srcu: Declare exported symbols before including srcu{tiny,tree}.h From: Sean Christopherson To: Lai Jiangshan , "Paul E. McKenney" , Josh Triplett , Paolo Bonzini Cc: rcu@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , Nikita Kalyazin , Keir Fraser Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Move the declarations of call_srcu(), cleanup_srcu_struct(), and synchronize_srcu() above the inclusion of the implementation specific SRCU header so that tiny SRCU can provide inline wrappers, e.g. for expedited versions, without needing to re-declare synchronize_srcu() and call_srcu(). Opportunsitically use rcu_callback_t in the call_srcu() declaration instead of an open coded equivalent (all implementations already use rcu_callback_t). No functional change intended. Signed-off-by: Sean Christopherson --- include/linux/srcu.h | 10 +++++----- include/linux/srcutiny.h | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/linux/srcu.h b/include/linux/srcu.h index bb44a0bd7696..1cbc37e3b59c 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -79,6 +79,11 @@ int init_srcu_struct_fast_updown(struct srcu_struct *ssp= ); // instead of smp_mb(). void __srcu_read_unlock(struct srcu_struct *ssp, int idx) __releases_share= d(ssp); =20 +void call_srcu(struct srcu_struct *ssp, struct rcu_head *head, + rcu_callback_t func); +void cleanup_srcu_struct(struct srcu_struct *ssp); +void synchronize_srcu(struct srcu_struct *ssp); + #ifdef CONFIG_TINY_SRCU #include #elif defined(CONFIG_TREE_SRCU) @@ -87,11 +92,6 @@ void __srcu_read_unlock(struct srcu_struct *ssp, int idx= ) __releases_shared(ssp) #error "Unknown SRCU implementation specified to kernel configuration" #endif =20 -void call_srcu(struct srcu_struct *ssp, struct rcu_head *head, - void (*func)(struct rcu_head *head)); -void cleanup_srcu_struct(struct srcu_struct *ssp); -void synchronize_srcu(struct srcu_struct *ssp); - #define SRCU_GET_STATE_COMPLETED 0x1 =20 /** diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h index dec7cbe015aa..4976536e8b28 100644 --- a/include/linux/srcutiny.h +++ b/include/linux/srcutiny.h @@ -64,8 +64,6 @@ struct srcu_usage { }; #define init_srcu_struct_fast_updown init_srcu_struct #endif // #ifndef CONFIG_DEBUG_LOCK_ALLOC =20 -void synchronize_srcu(struct srcu_struct *ssp); - /* * Counts the new reader in the appropriate per-CPU element of the * srcu_struct. Can be invoked from irq/bh handlers, but the matching --=20 2.53.0.473.g4a7958ca14-goog