8 #include <linux/module.h>
10 #include <linux/slab.h>
12 #include <asm/sysinfo.h>
14 #include <asm/debug.h>
17 #define LGR_TIMER_INTERVAL_SECS (30 * 60)
18 #define VM_LEVEL_MAX 2
69 if (
stsi(si, 1, 1, 1))
86 if (
stsi(si, 2, 2, 2))
96 static void lgr_stsi_3_2_2(
struct lgr_info *lgr_info)
101 if (
stsi(si, 3, 2, 2))
104 cpascii(lgr_info->
vm[i].name, si->
vm[i].name,
105 sizeof(si->
vm[i].name));
106 cpascii(lgr_info->
vm[i].cpi, si->
vm[i].cpi,
107 sizeof(si->
vm[i].cpi));
115 static void lgr_info_get(
struct lgr_info *lgr_info)
119 memset(lgr_info, 0,
sizeof(*lgr_info));
124 lgr_stsi_1_1_1(lgr_info);
126 lgr_stsi_2_2_2(lgr_info);
128 lgr_stsi_3_2_2(lgr_info);
141 lgr_info_get(&lgr_info_cur);
142 if (
memcmp(&lgr_info_last, &lgr_info_cur,
sizeof(lgr_info_cur)) != 0) {
143 debug_event(lgr_dbf, 1, &lgr_info_cur,
sizeof(lgr_info_cur));
144 lgr_info_last = lgr_info_cur;
146 spin_unlock_irqrestore(&lgr_info_lock, flags);
150 static void lgr_timer_set(
void);
155 static void lgr_timer_fn(
unsigned long ignored)
167 static void lgr_timer_set(
void)
175 static int __init lgr_init(
void)
181 lgr_info_get(&lgr_info_last);
182 debug_event(lgr_dbf, 1, &lgr_info_last,
sizeof(lgr_info_last));