mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 10:26:40 +07:00
6f43092441
Increase the precision of the idle time calculation that is exported to user space via /sys/devices/system/cpu/cpu<x>/idle_time_us Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
33 lines
633 B
C
33 lines
633 B
C
/*
|
|
* include/asm-s390/cpu.h
|
|
*
|
|
* Copyright IBM Corp. 2007
|
|
* Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
|
|
*/
|
|
|
|
#ifndef _ASM_S390_CPU_H_
|
|
#define _ASM_S390_CPU_H_
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/percpu.h>
|
|
#include <linux/spinlock.h>
|
|
|
|
struct s390_idle_data {
|
|
spinlock_t lock;
|
|
unsigned long long idle_count;
|
|
unsigned long long idle_enter;
|
|
unsigned long long idle_time;
|
|
};
|
|
|
|
DECLARE_PER_CPU(struct s390_idle_data, s390_idle);
|
|
|
|
void s390_idle_leave(void);
|
|
|
|
static inline void s390_idle_check(void)
|
|
{
|
|
if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL)
|
|
s390_idle_leave();
|
|
}
|
|
|
|
#endif /* _ASM_S390_CPU_H_ */
|