linux/arch
Shrikanth Hegde a8d0854a76 sched/cputime: Add kcpustat_field_total helper
Provide a new helper function which sums up a given type of cpustat
over a specified cpumask.

This allows the caller's code to be simpler and avoids duplication.
For example, subsequent patch in the steal governor use this exact
same pattern when calculating steal time.

Number of cpus can be derived from cpumask_weight() where necessary.

Suggested-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Yury Norov <ynorov@nvidia.com>
Reviewed-by: Mete Durlu <meted@linux.ibm.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://patch.msgid.link/20260928053728.797539-2-sshegde@linux.ibm.com
2026-09-28 08:44:40 +02:00
..
alpha pci-v7.3-changes 2026-08-23 12:44:10 -07:00
arc Treewide timer related cleanups: 2026-08-18 15:58:29 -07:00
arm ARM updates for 7.3-rc1 2026-08-30 09:43:01 -07:00
arm64 sched: Convert paravirt_steal to new static key APIs 2026-09-02 10:28:24 +02:00
csky mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
hexagon Treewide timer related cleanups: 2026-08-18 15:58:29 -07:00
loongarch sched: Convert paravirt_steal to new static key APIs 2026-09-02 10:28:24 +02:00
m68k m68knommu: updates and fixes for v7.3 2026-08-28 08:44:36 -07:00
microblaze Treewide timer related cleanups: 2026-08-18 15:58:29 -07:00
mips - switch gpio code to use swnodes 2026-08-21 12:39:49 -07:00
nios2 mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
openrisc OpenRISC 7.3 updates 2026-08-30 09:26:54 -07:00
parisc parisc architecture fixes and updates for kernel v7.3-rc1: 2026-08-23 10:30:02 -07:00
powerpc sched: Convert paravirt_steal to new static key APIs 2026-09-02 10:28:24 +02:00
riscv sched: Convert paravirt_steal to new static key APIs 2026-09-02 10:28:24 +02:00
s390 sched/cputime: Add kcpustat_field_total helper 2026-09-28 08:44:40 +02:00
sh gpio updates for v7.3-rc1 2026-08-19 09:10:07 -07:00
sparc mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
um um: Use asm-generic/timex.h over the host architecture one 2026-08-24 17:10:35 -07:00
x86 sched: Convert paravirt_steal to new static key APIs 2026-09-02 10:28:24 +02:00
xtensa Xtensa updates for v7.3 2026-08-28 08:55:47 -07:00
.gitignore
Kconfig sched: dynamic: Remove HAVE_PREEMPT_DYNAMIC_{CALL,KEY} 2026-09-02 09:37:23 +02:00