2011-03-30 22:30:11 +08:00
|
|
|
#ifndef __CPUPOWER_HELPERS_SYSFS_H__
|
|
|
|
#define __CPUPOWER_HELPERS_SYSFS_H__
|
|
|
|
|
|
|
|
#define PATH_TO_CPU "/sys/devices/system/cpu/"
|
|
|
|
#define MAX_LINE_LEN 255
|
|
|
|
#define SYSFS_PATH_MAX 255
|
|
|
|
|
|
|
|
extern unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen);
|
|
|
|
|
2011-08-12 07:11:37 +08:00
|
|
|
extern int sysfs_is_cpu_online(unsigned int cpu);
|
|
|
|
|
2011-04-20 02:16:05 +08:00
|
|
|
extern unsigned long sysfs_get_idlestate_latency(unsigned int cpu,
|
|
|
|
unsigned int idlestate);
|
|
|
|
extern unsigned long sysfs_get_idlestate_usage(unsigned int cpu,
|
|
|
|
unsigned int idlestate);
|
|
|
|
extern unsigned long long sysfs_get_idlestate_time(unsigned int cpu,
|
|
|
|
unsigned int idlestate);
|
|
|
|
extern char *sysfs_get_idlestate_name(unsigned int cpu,
|
|
|
|
unsigned int idlestate);
|
|
|
|
extern char *sysfs_get_idlestate_desc(unsigned int cpu,
|
|
|
|
unsigned int idlestate);
|
2011-03-30 22:30:11 +08:00
|
|
|
extern int sysfs_get_idlestate_count(unsigned int cpu);
|
|
|
|
|
2011-04-20 02:16:05 +08:00
|
|
|
extern char *sysfs_get_cpuidle_governor(void);
|
|
|
|
extern char *sysfs_get_cpuidle_driver(void);
|
2011-03-30 22:30:11 +08:00
|
|
|
|
2011-04-20 02:16:05 +08:00
|
|
|
extern int sysfs_get_sched(const char *smt_mc);
|
|
|
|
extern int sysfs_set_sched(const char *smt_mc, int val);
|
2011-03-30 22:30:11 +08:00
|
|
|
|
|
|
|
#endif /* __CPUPOWER_HELPERS_SYSFS_H__ */
|