From mboxrd@z Thu Jan 1 00:00:00 1970 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 B77944963D5; Tue, 7 Jul 2026 21:49:13 +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=1783460955; cv=none; b=sX43na95hWq8ic2wIm4nnDP+1ZU5IUMJa3cHGUcrPtsiNbjl3oQVGOYohkhPaQeyN6HRbd/f4sujqemz2jtwSCDs3kgHMtEx/qiLd6vJJgYNmGgeUIk4RVlExgOgkQiR7akxh9YK9y4cxNETkC+zlLoBsJdo2BR288AKxOkbwwo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783460955; c=relaxed/simple; bh=zFKAdfgNQQclfOVvuMuj4VRL2+BOt4P0HMyuVR46eJE=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Vvna6ggIuibRTznitmokl9FRNFRXx73orH1ctxy7JF9nsBNgZzukrJ4XIIl51wHK7qJ297ymuvSbPWZhFMYrsQvsogrEsjfUvkGnEBJtC/UMAVs2wpOsDVaifae1Da3clD3Pjieu406Q+cabFddQpGN1NN1u49BmRstFhcDC50E= 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=1K7uJqH4; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=h+LJlKzk; 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="1K7uJqH4"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="h+LJlKzk" Date: Tue, 07 Jul 2026 21:49:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783460952; 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=yD/DzpZbhRfLN9y28oib4RrRH8Mh+Awi+zxHsNyddPM=; b=1K7uJqH4eOjEcW7/NaGQWmp6y0It8d3nVUrpqTNJ17tzZh+HCjnanB9QNSKmWrohu0BxGB HSmOlI5fhrTm/GDdi0S3I+1falqARGVR8yb8HkDt7nB8LvctwpUOmcaov8hoB3prxRT85E uaIwWY+jDo8Pbn51R+FV/cKM50gXcuamCZO6E5WaLxk761RnGyRAreweGB3t1DS/2zky/Q 41zN1NeFla2KJXzGsYGUM0NpBHRBjFv9UUlcH6o/6uEY4bWO6lIP0L6fTOsFzMIShxEZaV oIzb5ok127mybxaM+jygy9ZqQ5zHxP/mEMtLXCVCCvaJ1ZvUMkZwTi9Q3xW17w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783460952; 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=yD/DzpZbhRfLN9y28oib4RrRH8Mh+Awi+zxHsNyddPM=; b=h+LJlKzk/V7m8jrlcCmugkCh54UvQLVwerUV2z0/+zZKFWBYmAm8oIFGCQ30Giw74ERY/0 Zn62kecsykrOAgDw== From: tip-bot2 for Thomas =?utf-8?q?Wei=C3=9Fschuh_=28Schneider_Electric=29?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h Cc: thomas.weissschuh@linutronix.de, Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260702-hrtimer-header-dependencies-v1-1-c50b19bda473@linutronix.de> References: <20260702-hrtimer-header-dependencies-v1-1-c50b19bda473@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178346095092.744054.9462331878347577832.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 timers/core branch of tip: Commit-ID: 03b5d4c2798234d9ee3c4a719a2fefe785a6aec4 Gitweb: https://git.kernel.org/tip/03b5d4c2798234d9ee3c4a719a2fefe785a= 6aec4 Author: Thomas Wei=C3=9Fschuh (Schneider Electric) AuthorDate: Thu, 02 Jul 2026 11:41:58 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 07 Jul 2026 23:43:44 +02:00 hrtimer: Rename hrtimer_defs.h to hrtimer_bases.h This header was originally added for #defines and was later extended with the hrtimer base structures. All the #defines have been removed in the meantime, so the naming is off now. Rename the header to fit its contents more. This will also make the upcoming addition of some functions nicer. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260702-hrtimer-header-dependencies-v1-1-c50b= 19bda473@linutronix.de --- include/linux/hrtimer.h | 2 +- include/linux/hrtimer_bases.h | 113 +++++++++++++++++++++++++++++++++- include/linux/hrtimer_defs.h | 113 +--------------------------------- 3 files changed, 114 insertions(+), 114 deletions(-) create mode 100644 include/linux/hrtimer_bases.h delete mode 100644 include/linux/hrtimer_defs.h diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 6862dea..8aa5852 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -12,7 +12,7 @@ #ifndef _LINUX_HRTIMER_H #define _LINUX_HRTIMER_H =20 -#include +#include #include #include #include diff --git a/include/linux/hrtimer_bases.h b/include/linux/hrtimer_bases.h new file mode 100644 index 0000000..8c10f45 --- /dev/null +++ b/include/linux/hrtimer_bases.h @@ -0,0 +1,113 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_HRTIMER_BASES_H +#define _LINUX_HRTIMER_BASES_H + +#include +#include +#include + +#ifdef CONFIG_64BIT +# define __hrtimer_clock_base_align ____cacheline_aligned +#else +# define __hrtimer_clock_base_align +#endif + +/** + * struct hrtimer_clock_base - the timer base for a specific clock + * @cpu_base: per cpu clock base + * @index: clock type index for per_cpu support when moving a + * timer to a base on another cpu. + * @clockid: clock id for per_cpu support + * @seq: seqcount around __run_hrtimer + * @expires_next: Absolute time of the next event in this clock base + * @running: pointer to the currently running hrtimer + * @active: red black tree root node for the active timers + * @offset: offset of this clock to the monotonic base + */ +struct hrtimer_clock_base { + struct hrtimer_cpu_base *cpu_base; + const unsigned int index; + const clockid_t clockid; + seqcount_raw_spinlock_t seq; + ktime_t expires_next; + struct hrtimer *running; + struct timerqueue_linked_head active; + ktime_t offset; +} __hrtimer_clock_base_align; + +enum hrtimer_base_type { + HRTIMER_BASE_MONOTONIC, + HRTIMER_BASE_REALTIME, + HRTIMER_BASE_BOOTTIME, + HRTIMER_BASE_TAI, + HRTIMER_BASE_MONOTONIC_SOFT, + HRTIMER_BASE_REALTIME_SOFT, + HRTIMER_BASE_BOOTTIME_SOFT, + HRTIMER_BASE_TAI_SOFT, + HRTIMER_MAX_CLOCK_BASES +}; + +/** + * struct hrtimer_cpu_base - the per cpu clock bases + * @lock: lock protecting the base and associated clock bases and timers + * @cpu: cpu number + * @active_bases: Bitfield to mark bases with active timers + * @clock_was_set_seq: Sequence counter of clock was set events + * @hres_active: State of high resolution mode + * @deferred_rearm: A deferred rearm is pending + * @deferred_needs_update: The deferred rearm must re-evaluate the first tim= er + * @hang_detected: The last hrtimer interrupt detected a hang + * @softirq_activated: displays, if the softirq is raised - update of softi= rq + * related settings is not required then. + * @nr_events: Total number of hrtimer interrupt events + * @nr_retries: Total number of hrtimer interrupt retries + * @nr_hangs: Total number of hrtimer interrupt hangs + * @max_hang_time: Maximum time spent in hrtimer_interrupt + * @softirq_expiry_lock: Lock which is taken while softirq based hrtimer are= expired + * @online: CPU is online from an hrtimers point of view + * @timer_waiters: A hrtimer_cancel() waiters for the timer callback to fin= ish. + * @expires_next: Absolute time of the next event, is required for remote + * hrtimer enqueue; it is the total first expiry time (hard + * and soft hrtimer are taken into account) + * @next_timer: Pointer to the first expiring timer + * @softirq_expires_next: Time to check, if soft queues needs also to be exp= ired + * @softirq_next_timer: Pointer to the first expiring softirq based timer + * @deferred_expires_next: Cached expires next value for deferred rearm + * @clock_base: Array of clock bases for this cpu + * + * Note: next_timer is just an optimization for __remove_hrtimer(). + * Do not dereference the pointer because it is not reliable on + * cross cpu removals. + */ +struct hrtimer_cpu_base { + raw_spinlock_t lock; + unsigned int cpu; + unsigned int active_bases; + unsigned int clock_was_set_seq; + bool hres_active; + bool deferred_rearm; + bool deferred_needs_update; + bool hang_detected; + bool softirq_activated; + bool online; +#ifdef CONFIG_HIGH_RES_TIMERS + unsigned int nr_events; + unsigned short nr_retries; + unsigned short nr_hangs; + unsigned int max_hang_time; +#endif +#ifdef CONFIG_PREEMPT_RT + spinlock_t softirq_expiry_lock; + atomic_t timer_waiters; +#endif + ktime_t expires_next; + struct hrtimer *next_timer; + ktime_t softirq_expires_next; + struct hrtimer *softirq_next_timer; + ktime_t deferred_expires_next; + struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; + call_single_data_t csd; +} ____cacheline_aligned; + + +#endif diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h deleted file mode 100644 index 52ed9e4..0000000 --- a/include/linux/hrtimer_defs.h +++ /dev/null @@ -1,113 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _LINUX_HRTIMER_DEFS_H -#define _LINUX_HRTIMER_DEFS_H - -#include -#include -#include - -#ifdef CONFIG_64BIT -# define __hrtimer_clock_base_align ____cacheline_aligned -#else -# define __hrtimer_clock_base_align -#endif - -/** - * struct hrtimer_clock_base - the timer base for a specific clock - * @cpu_base: per cpu clock base - * @index: clock type index for per_cpu support when moving a - * timer to a base on another cpu. - * @clockid: clock id for per_cpu support - * @seq: seqcount around __run_hrtimer - * @expires_next: Absolute time of the next event in this clock base - * @running: pointer to the currently running hrtimer - * @active: red black tree root node for the active timers - * @offset: offset of this clock to the monotonic base - */ -struct hrtimer_clock_base { - struct hrtimer_cpu_base *cpu_base; - const unsigned int index; - const clockid_t clockid; - seqcount_raw_spinlock_t seq; - ktime_t expires_next; - struct hrtimer *running; - struct timerqueue_linked_head active; - ktime_t offset; -} __hrtimer_clock_base_align; - -enum hrtimer_base_type { - HRTIMER_BASE_MONOTONIC, - HRTIMER_BASE_REALTIME, - HRTIMER_BASE_BOOTTIME, - HRTIMER_BASE_TAI, - HRTIMER_BASE_MONOTONIC_SOFT, - HRTIMER_BASE_REALTIME_SOFT, - HRTIMER_BASE_BOOTTIME_SOFT, - HRTIMER_BASE_TAI_SOFT, - HRTIMER_MAX_CLOCK_BASES -}; - -/** - * struct hrtimer_cpu_base - the per cpu clock bases - * @lock: lock protecting the base and associated clock bases and timers - * @cpu: cpu number - * @active_bases: Bitfield to mark bases with active timers - * @clock_was_set_seq: Sequence counter of clock was set events - * @hres_active: State of high resolution mode - * @deferred_rearm: A deferred rearm is pending - * @deferred_needs_update: The deferred rearm must re-evaluate the first tim= er - * @hang_detected: The last hrtimer interrupt detected a hang - * @softirq_activated: displays, if the softirq is raised - update of softi= rq - * related settings is not required then. - * @nr_events: Total number of hrtimer interrupt events - * @nr_retries: Total number of hrtimer interrupt retries - * @nr_hangs: Total number of hrtimer interrupt hangs - * @max_hang_time: Maximum time spent in hrtimer_interrupt - * @softirq_expiry_lock: Lock which is taken while softirq based hrtimer are= expired - * @online: CPU is online from an hrtimers point of view - * @timer_waiters: A hrtimer_cancel() waiters for the timer callback to fin= ish. - * @expires_next: Absolute time of the next event, is required for remote - * hrtimer enqueue; it is the total first expiry time (hard - * and soft hrtimer are taken into account) - * @next_timer: Pointer to the first expiring timer - * @softirq_expires_next: Time to check, if soft queues needs also to be exp= ired - * @softirq_next_timer: Pointer to the first expiring softirq based timer - * @deferred_expires_next: Cached expires next value for deferred rearm - * @clock_base: Array of clock bases for this cpu - * - * Note: next_timer is just an optimization for __remove_hrtimer(). - * Do not dereference the pointer because it is not reliable on - * cross cpu removals. - */ -struct hrtimer_cpu_base { - raw_spinlock_t lock; - unsigned int cpu; - unsigned int active_bases; - unsigned int clock_was_set_seq; - bool hres_active; - bool deferred_rearm; - bool deferred_needs_update; - bool hang_detected; - bool softirq_activated; - bool online; -#ifdef CONFIG_HIGH_RES_TIMERS - unsigned int nr_events; - unsigned short nr_retries; - unsigned short nr_hangs; - unsigned int max_hang_time; -#endif -#ifdef CONFIG_PREEMPT_RT - spinlock_t softirq_expiry_lock; - atomic_t timer_waiters; -#endif - ktime_t expires_next; - struct hrtimer *next_timer; - ktime_t softirq_expires_next; - struct hrtimer *softirq_next_timer; - ktime_t deferred_expires_next; - struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; - call_single_data_t csd; -} ____cacheline_aligned; - - -#endif