summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2022-12-27 10:29:04 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-10 17:10:33 +0100
commitf33b27f5c3de579dc8e3af27569507c868cb0812 (patch)
tree269ba6029075182f5c7a633a5788b94f647bfad9 /include
parent617ba3735d3b49c9b2db1e631b8bc008fdc83a5d (diff)
downloadlinux-f33b27f5c3de579dc8e3af27569507c868cb0812.tar.gz
linux-f33b27f5c3de579dc8e3af27569507c868cb0812.tar.bz2
linux-f33b27f5c3de579dc8e3af27569507c868cb0812.zip
genirq/affinity: Move group_cpus_evenly() into lib/
[ Upstream commit f7b3ea8cf72f3d6060fe08e461805181e7450a13 ] group_cpus_evenly() has become a generic function which can be used for other subsystems than the interrupt subsystem, so move it into lib/. Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jens Axboe <axboe@kernel.dk> Link: https://lore.kernel.org/r/20221227022905.352674-6-ming.lei@redhat.com Stable-dep-of: 0263f92fadbb ("lib/group_cpus.c: avoid acquiring cpu hotplug lock in group_cpus_evenly") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/group_cpus.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/group_cpus.h b/include/linux/group_cpus.h
new file mode 100644
index 000000000000..e42807ec61f6
--- /dev/null
+++ b/include/linux/group_cpus.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2016 Thomas Gleixner.
+ * Copyright (C) 2016-2017 Christoph Hellwig.
+ */
+
+#ifndef __LINUX_GROUP_CPUS_H
+#define __LINUX_GROUP_CPUS_H
+#include <linux/kernel.h>
+#include <linux/cpu.h>
+
+struct cpumask *group_cpus_evenly(unsigned int numgrps);
+
+#endif