xref: /openbmc/linux/arch/powerpc/include/asm/accounting.h (revision abcff86df2d2ec0a0ca9470fa5d2a184af18928a)
1c223c903SChristophe Leroy /*
2c223c903SChristophe Leroy  * Common time accounting prototypes and such for all ppc machines.
3c223c903SChristophe Leroy  *
4c223c903SChristophe Leroy  * This program is free software; you can redistribute it and/or
5c223c903SChristophe Leroy  * modify it under the terms of the GNU General Public License
6c223c903SChristophe Leroy  * as published by the Free Software Foundation; either version
7c223c903SChristophe Leroy  * 2 of the License, or (at your option) any later version.
8c223c903SChristophe Leroy  */
9c223c903SChristophe Leroy 
10c223c903SChristophe Leroy #ifndef __POWERPC_ACCOUNTING_H
11c223c903SChristophe Leroy #define __POWERPC_ACCOUNTING_H
12c223c903SChristophe Leroy 
13c223c903SChristophe Leroy /* Stuff for accurate time accounting */
14c223c903SChristophe Leroy struct cpu_accounting_data {
158c8b73c4SFrederic Weisbecker 	/* Accumulated cputime values to flush on ticks*/
168c8b73c4SFrederic Weisbecker 	unsigned long utime;
178c8b73c4SFrederic Weisbecker 	unsigned long stime;
18*abcff86dSChristophe Leroy #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
198c8b73c4SFrederic Weisbecker 	unsigned long utime_scaled;
208c8b73c4SFrederic Weisbecker 	unsigned long stime_scaled;
21*abcff86dSChristophe Leroy #endif
228c8b73c4SFrederic Weisbecker 	unsigned long gtime;
238c8b73c4SFrederic Weisbecker 	unsigned long hardirq_time;
248c8b73c4SFrederic Weisbecker 	unsigned long softirq_time;
258c8b73c4SFrederic Weisbecker 	unsigned long steal_time;
268c8b73c4SFrederic Weisbecker 	unsigned long idle_time;
278c8b73c4SFrederic Weisbecker 	/* Internal counters */
28c223c903SChristophe Leroy 	unsigned long starttime;	/* TB value snapshot */
29c223c903SChristophe Leroy 	unsigned long starttime_user;	/* TB value on exit to usermode */
30*abcff86dSChristophe Leroy #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
31c223c903SChristophe Leroy 	unsigned long startspurr;	/* SPURR value snapshot */
32c223c903SChristophe Leroy 	unsigned long utime_sspurr;	/* ->user_time when ->startspurr set */
33*abcff86dSChristophe Leroy #endif
34c223c903SChristophe Leroy };
35c223c903SChristophe Leroy 
36c223c903SChristophe Leroy #endif
37