summaryrefslogtreecommitdiff
path: root/kernel/time/timer_migration.h
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2026-05-22 16:16:18 -0700
committerThomas Gleixner <tglx@kernel.org>2026-06-02 21:34:03 +0200
commit45b49d7e3ab6490a9b957a4075344093c43d1f7e (patch)
tree753b7784ddd8f9a4ecb005fa6646b5e30f83c979 /kernel/time/timer_migration.h
parentd4f198c13611257f7f29d3c614721d0ac5d362f5 (diff)
downloadlinux-next-45b49d7e3ab6490a9b957a4075344093c43d1f7e.tar.gz
linux-next-45b49d7e3ab6490a9b957a4075344093c43d1f7e.zip
timers/migration: Turn tmigr_hierarchy level_list into a flexible array
The level_list array is allocated separately right after the parent struct. The size of the array is already known. Move level_list to the struct tail as a flexible array member and fold the two allocations into a single kzalloc_flex(). Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Assisted-by: Claude:Opus-4.7 Link: https://patch.msgid.link/20260522231618.41622-1-rosenp@gmail.com
Diffstat (limited to 'kernel/time/timer_migration.h')
-rw-r--r--kernel/time/timer_migration.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/time/timer_migration.h b/kernel/time/timer_migration.h
index ea8db95fc63e..31735dd52327 100644
--- a/kernel/time/timer_migration.h
+++ b/kernel/time/timer_migration.h
@@ -9,19 +9,18 @@
* struct tmigr_hierarchy - a hierarchy associated to a given CPU capacity.
* Homogeneous systems have only one hierarchy.
* Heterogenous have one hierarchy per CPU capacity.
- * @level_list: Per level lists of tmigr groups
* @cpumask: CPUs belonging to this hierarchy
* @root: The current root of the hierarchy
* @capacity: CPU capacity associated to this hierarchy
* @node: Node in the global hierarchy list
+ * @level_list: Per level lists of tmigr groups
*/
struct tmigr_hierarchy {
- struct list_head *level_list;
struct cpumask *cpumask;
struct tmigr_group *root;
unsigned long capacity;
struct list_head node;
-
+ struct list_head level_list[];
};
/**