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