2007-10-22 06:52:39 -04:00
|
|
|
/*
|
|
|
|
* 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);
|
|
|
|
|
2008-12-31 09:11:41 -05:00
|
|
|
void vtime_start_cpu(void);
|
2008-04-17 01:46:23 -04:00
|
|
|
|
|
|
|
static inline void s390_idle_check(void)
|
|
|
|
{
|
2008-12-31 09:11:40 -05:00
|
|
|
if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL)
|
2008-12-31 09:11:41 -05:00
|
|
|
vtime_start_cpu();
|
2008-04-17 01:46:23 -04:00
|
|
|
}
|
|
|
|
|
2007-10-22 06:52:39 -04:00
|
|
|
#endif /* _ASM_S390_CPU_H_ */
|