xref: /openbmc/linux/arch/powerpc/include/asm/accounting.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*2874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2c223c903SChristophe Leroy /*
3c223c903SChristophe Leroy  * Common time accounting prototypes and such for all ppc machines.
4c223c903SChristophe Leroy  */
5c223c903SChristophe Leroy 
6c223c903SChristophe Leroy #ifndef __POWERPC_ACCOUNTING_H
7c223c903SChristophe Leroy #define __POWERPC_ACCOUNTING_H
8c223c903SChristophe Leroy 
9c223c903SChristophe Leroy /* Stuff for accurate time accounting */
10c223c903SChristophe Leroy struct cpu_accounting_data {
118c8b73c4SFrederic Weisbecker 	/* Accumulated cputime values to flush on ticks*/
128c8b73c4SFrederic Weisbecker 	unsigned long utime;
138c8b73c4SFrederic Weisbecker 	unsigned long stime;
14abcff86dSChristophe Leroy #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
158c8b73c4SFrederic Weisbecker 	unsigned long utime_scaled;
168c8b73c4SFrederic Weisbecker 	unsigned long stime_scaled;
17abcff86dSChristophe Leroy #endif
188c8b73c4SFrederic Weisbecker 	unsigned long gtime;
198c8b73c4SFrederic Weisbecker 	unsigned long hardirq_time;
208c8b73c4SFrederic Weisbecker 	unsigned long softirq_time;
218c8b73c4SFrederic Weisbecker 	unsigned long steal_time;
228c8b73c4SFrederic Weisbecker 	unsigned long idle_time;
238c8b73c4SFrederic Weisbecker 	/* Internal counters */
24c223c903SChristophe Leroy 	unsigned long starttime;	/* TB value snapshot */
25c223c903SChristophe Leroy 	unsigned long starttime_user;	/* TB value on exit to usermode */
26abcff86dSChristophe Leroy #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
27c223c903SChristophe Leroy 	unsigned long startspurr;	/* SPURR value snapshot */
28c223c903SChristophe Leroy 	unsigned long utime_sspurr;	/* ->user_time when ->startspurr set */
29abcff86dSChristophe Leroy #endif
30c223c903SChristophe Leroy };
31c223c903SChristophe Leroy 
32c223c903SChristophe Leroy #endif
33