xref: /linux/arch/powerpc/include/asm/accounting.h (revision 4b132aacb0768ac1e652cf517097ea6f237214b9)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Common time accounting prototypes and such for all ppc machines.
4  */
5 
6 #ifndef __POWERPC_ACCOUNTING_H
7 #define __POWERPC_ACCOUNTING_H
8 
9 /* Stuff for accurate time accounting */
10 struct cpu_accounting_data {
11 	/* Accumulated cputime values to flush on ticks*/
12 	unsigned long utime;
13 	unsigned long stime;
14 #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
15 	unsigned long utime_scaled;
16 	unsigned long stime_scaled;
17 #endif
18 	unsigned long gtime;
19 	unsigned long hardirq_time;
20 	unsigned long softirq_time;
21 	unsigned long steal_time;
22 	unsigned long idle_time;
23 	/* Internal counters */
24 	unsigned long starttime;	/* TB value snapshot */
25 	unsigned long starttime_user;	/* TB value on exit to usermode */
26 #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
27 	unsigned long startspurr;	/* SPURR value snapshot */
28 	unsigned long utime_sspurr;	/* ->user_time when ->startspurr set */
29 #endif
30 };
31 
32 #endif
33