diff options
| author | Rob Clark <robdclark@chromium.org> | 2023-03-20 10:31:25 -0700 |
|---|---|---|
| committer | Rob Clark <robdclark@chromium.org> | 2023-03-20 10:31:25 -0700 |
| commit | e752ab11dcb48353727ea26eefd740155e028865 (patch) | |
| tree | bbd47198be4e42bbf990096ca36e96f3da40cfb6 /include/linux/kernel_stat.h | |
| parent | 1844e680d56bb0c4e0489138f2b7ba2dc1c988e3 (diff) | |
| parent | 8bf6e20253b2d2b614f2c0b491f840e956fa6b05 (diff) | |
| download | linux-next-e752ab11dcb48353727ea26eefd740155e028865.tar.gz linux-next-e752ab11dcb48353727ea26eefd740155e028865.zip | |
Merge remote-tracking branch 'drm/drm-next' into msm-next
Merge drm-next into msm-next to pick up external clk and PM dependencies
for improved a6xx GPU reset sequence.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'include/linux/kernel_stat.h')
| -rw-r--r-- | include/linux/kernel_stat.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index ddb5a358fd82..9935f7ecbfb9 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -52,6 +52,7 @@ DECLARE_PER_CPU(struct kernel_cpustat, kernel_cpustat); #define kstat_cpu(cpu) per_cpu(kstat, cpu) #define kcpustat_cpu(cpu) per_cpu(kernel_cpustat, cpu) +extern unsigned long long nr_context_switches_cpu(int cpu); extern unsigned long long nr_context_switches(void); extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); @@ -67,6 +68,17 @@ static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) return kstat_cpu(cpu).softirqs[irq]; } +static inline unsigned int kstat_cpu_softirqs_sum(int cpu) +{ + int i; + unsigned int sum = 0; + + for (i = 0; i < NR_SOFTIRQS; i++) + sum += kstat_softirqs_cpu(i, cpu); + + return sum; +} + /* * Number of interrupts per specific IRQ source, since bootup */ @@ -75,7 +87,7 @@ extern unsigned int kstat_irqs_usr(unsigned int irq); /* * Number of interrupts per cpu, since bootup */ -static inline unsigned int kstat_cpu_irqs_sum(unsigned int cpu) +static inline unsigned long kstat_cpu_irqs_sum(unsigned int cpu) { return kstat_cpu(cpu).irqs_sum; } |
