From nobody Mon Apr 6 20:03:05 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1E67378D61; Wed, 18 Mar 2026 08:02:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773820978; cv=none; b=NOO94Rbqptlq3ZPvUyhd1L9G+k/Ur70ty0M3MW8miSWWl9t0a3AyTnPSI/mZxdVYfRt5rX4L6m/ElJpegHCqHvOKM8DZN3V33FpeTQCi8qrcjItd7Wiv1irM5V1KUa1/8G6QWnwiwdp1eC7DiioFc46k3e9CUlI+b1OPZP8nkj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773820978; c=relaxed/simple; bh=3/dHUMuqoE8wBOKkNHKxB7zGaoCeVBLtN+G7I6oBGZk=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=XePlrvn2PRA64hCH+0Q+rY+QeI16Seh7vNqaNBitd0mUk2/PUmv6IECzGhZoUEfsECPSCAvPj9p3FG8oscAKZEVoVYOmeohJhkQpgC58CqrQLc/bKzmOFo7LGIsqs2G6cijHtyl6M5uZuQIO52MXFslZijdO1rtIeF+Y4VVCIYY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=GyASUkJf; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=btHgmH82; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="GyASUkJf"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="btHgmH82" Date: Wed, 18 Mar 2026 08:02:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773820974; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zmkarb8rPxtrgmE0hiU/kzvWwQDaAXLhk/0sthQFe98=; b=GyASUkJfpoYFHOxIR1u6KIaU+7FSUu+YPNR5vKa7TovgH4vHj5PPSqtRKLTQ0SFtZtrakA rkKy4NZ/vr6+ZfYxOfw50AlSlHB5tNApJ0GCCHHDPw3GzZ2FxtEh4LR5GzSwv51+Hb57WL /C99ULUBfSZQ+HFj6vRTjMhFkJy9LonnUiBCyJme2D8hcnci/JRY7EIjUDyxpdAo2pXFUT D+UEwHPABKe35RD7BRpfzUXHh4pSa3Vwa9kXDQsrH1oOckZQPWQmK1buV4geqNuVoADz7Z e1GhoN5AGfBH+FY2mWCYcZFfmbNyUuBwjOiDCuKnlo2r6H10l8JKXZrMfHHG0A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773820974; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zmkarb8rPxtrgmE0hiU/kzvWwQDaAXLhk/0sthQFe98=; b=btHgmH82kGqfeAKTqgNFrKmKksAUltAwwTk3TGj8af/FcdiSBMzv6ZF/2Xtga+iUv/CkbO Vih7Maj2FkQzSxCg== From: tip-bot2 for Thomas =?utf-8?q?Wei=C3=9Fschuh?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] jump_label: use ATOMIC_INIT() for initialization of .enabled Cc: thomas.weissschuh@linutronix.de, "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260313-jump_label-cleanup-v2-1-35d3c0bde549@linutronix.de> References: <20260313-jump_label-cleanup-v2-1-35d3c0bde549@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177382097325.1647592.12172919509912639183.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the locking/core branch of tip: Commit-ID: 428c56525bf5dbc3bd5e30014df1f5213f8bd7c8 Gitweb: https://git.kernel.org/tip/428c56525bf5dbc3bd5e30014df1f5213= f8bd7c8 Author: Thomas Wei=C3=9Fschuh AuthorDate: Fri, 13 Mar 2026 09:22:18 +01:00 Committer: Peter Zijlstra CommitterDate: Mon, 16 Mar 2026 13:16:48 +01:00 jump_label: use ATOMIC_INIT() for initialization of .enabled Currently ATOMIC_INIT() is not used because in the past that macro was provided by linux/atomic.h which is not usable from linux/jump_label.h. However since commit 7ca8cf5347f7 ("locking/atomic: Move ATOMIC_INIT into linux/types.h") the macro only requires linux/types.h. Remove the now unnecessary workaround and the associated assertions. Signed-off-by: Thomas Wei=C3=9Fschuh Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260313-jump_label-cleanup-v2-1-35d3c0bde54= 9@linutronix.de --- include/linux/jump_label.h | 11 ++--------- kernel/jump_label.c | 9 --------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index fdb79dd..e494b36 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -238,18 +238,11 @@ extern void static_key_enable_cpuslocked(struct stati= c_key *key); extern void static_key_disable_cpuslocked(struct static_key *key); extern enum jump_label_type jump_label_init_type(struct jump_entry *entry); =20 -/* - * We should be using ATOMIC_INIT() for initializing .enabled, but - * the inclusion of atomic.h is problematic for inclusion of jump_label.h - * in 'low-level' headers. Thus, we are initializing .enabled with a - * raw value, but have added a BUILD_BUG_ON() to catch any issues in - * jump_label_init() see: kernel/jump_label.c. - */ #define STATIC_KEY_INIT_TRUE \ - { .enabled =3D { 1 }, \ + { .enabled =3D ATOMIC_INIT(1), \ { .type =3D JUMP_TYPE_TRUE } } #define STATIC_KEY_INIT_FALSE \ - { .enabled =3D { 0 }, \ + { .enabled =3D ATOMIC_INIT(0), \ { .type =3D JUMP_TYPE_FALSE } } =20 #else /* !CONFIG_JUMP_LABEL */ diff --git a/kernel/jump_label.c b/kernel/jump_label.c index 7cb19e6..e851e4b 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -529,15 +529,6 @@ void __init jump_label_init(void) struct static_key *key =3D NULL; struct jump_entry *iter; =20 - /* - * Since we are initializing the static_key.enabled field with - * with the 'raw' int values (to avoid pulling in atomic.h) in - * jump_label.h, let's make sure that is safe. There are only two - * cases to check since we initialize to 0 or 1. - */ - BUILD_BUG_ON((int)ATOMIC_INIT(0) !=3D 0); - BUILD_BUG_ON((int)ATOMIC_INIT(1) !=3D 1); - if (static_key_initialized) return; =20