18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Common time accounting prototypes and such for all ppc machines.
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#ifndef __POWERPC_ACCOUNTING_H
78c2ecf20Sopenharmony_ci#define __POWERPC_ACCOUNTING_H
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/* Stuff for accurate time accounting */
108c2ecf20Sopenharmony_cistruct cpu_accounting_data {
118c2ecf20Sopenharmony_ci	/* Accumulated cputime values to flush on ticks*/
128c2ecf20Sopenharmony_ci	unsigned long utime;
138c2ecf20Sopenharmony_ci	unsigned long stime;
148c2ecf20Sopenharmony_ci#ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
158c2ecf20Sopenharmony_ci	unsigned long utime_scaled;
168c2ecf20Sopenharmony_ci	unsigned long stime_scaled;
178c2ecf20Sopenharmony_ci#endif
188c2ecf20Sopenharmony_ci	unsigned long gtime;
198c2ecf20Sopenharmony_ci	unsigned long hardirq_time;
208c2ecf20Sopenharmony_ci	unsigned long softirq_time;
218c2ecf20Sopenharmony_ci	unsigned long steal_time;
228c2ecf20Sopenharmony_ci	unsigned long idle_time;
238c2ecf20Sopenharmony_ci	/* Internal counters */
248c2ecf20Sopenharmony_ci	unsigned long starttime;	/* TB value snapshot */
258c2ecf20Sopenharmony_ci	unsigned long starttime_user;	/* TB value on exit to usermode */
268c2ecf20Sopenharmony_ci#ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
278c2ecf20Sopenharmony_ci	unsigned long startspurr;	/* SPURR value snapshot */
288c2ecf20Sopenharmony_ci	unsigned long utime_sspurr;	/* ->user_time when ->startspurr set */
298c2ecf20Sopenharmony_ci#endif
308c2ecf20Sopenharmony_ci};
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci#endif
33