type
stringclasses
5 values
content
stringlengths
9
163k
defines
#define NDBGLNS 256
defines
#define dbgpr(...) do {} while (0)
structs
struct cpufreq_lulzactive_cpuinfo { struct timer_list cpu_timer; int timer_idlecancel; u64 time_in_idle; u64 idle_exit_time; u64 timer_run_time; int idling; u64 freq_change_time; u64 freq_change_time_in_idle; struct cpufreq_policy *policy; struct cpufreq_frequency_table *freq_table; unsigned int freq_table_s...
structs
struct dbgln { int cpu; unsigned long jiffy; unsigned long run; char buf[BUFSZ]; };
functions
void dbgpr(char *fmt, ...) { va_list args; int n; unsigned long flags; spin_lock_irqsave(&dbgpr_lock, flags); n = dbgbufe; va_start(args, fmt); vsnprintf(dbgbuf[n].buf, BUFSZ, fmt, args); va_end(args); dbgbuf[n].cpu = smp_processor_id(); dbgbuf[n].run = nr_running(); dbgbuf[n].jiffy = jiffies; ...
functions
void dbgdump(void) { int i, j; unsigned long flags; static struct dbgln prbuf[NDBGLNS]; spin_lock_irqsave(&dbgpr_lock, flags); i = dbgbufs; j = dbgbufe; memcpy(prbuf, dbgbuf, sizeof(dbgbuf)); dbgbufs = 0; dbgbufe = 0; spin_unlock_irqrestore(&dbgpr_lock, flags); while (i != j) { printk("%lu %d %l...
functions
int dbg_proc_read(char *buffer, char **start, off_t offset, int count, int *peof, void *dat) { printk("max up_task latency=%uus\n", up_max_latency); dbgdump(); *peof = 1; return 0; }
functions
int get_freq_table_size(struct cpufreq_frequency_table *freq_table) { unsigned int size = 0; while (freq_table[++size].frequency != CPUFREQ_TABLE_END); return size; }
functions
void fix_screen_off_min_step(struct cpufreq_lulzactive_cpuinfo *pcpu) { if (pcpu->freq_table_size <= 0) { screen_off_min_step = 0; return; }
functions
int adjust_screen_off_freq( struct cpufreq_lulzactive_cpuinfo *pcpu, unsigned int freq) { if (early_suspended && freq > pcpu->freq_table[screen_off_min_step].frequency) { freq = pcpu->freq_table[screen_off_min_step].frequency; pcpu->target_freq = pcpu->polic...
functions
void cpufreq_lulzactive_timer(unsigned long data) { unsigned int delta_idle; unsigned int delta_time; int cpu_load; int load_since_change; u64 time_in_idle; u64 idle_exit_time; struct cpufreq_lulzactive_cpuinfo *pcpu = &per_cpu(cpuinfo, data); u64 now_idle; unsigned int new_freq; int index; int ret; /*...
functions
else if (cpu_load > dec_cpu_load && pcpu->policy->cur !=pcpu->policy->max){ new_freq = pcpu->policy->cur; ret = cpufreq_frequency_table_target( pcpu->policy, pcpu->freq_table, new_freq, CPUFREQ_RELATION_H, ...
functions
void cpufreq_lulzactive_idle(void) { struct cpufreq_lulzactive_cpuinfo *pcpu = &per_cpu(cpuinfo, smp_processor_id()); int pending; if (!pcpu->governor_enabled) { pm_idle_old(); return; }
functions
int cpufreq_lulzactive_up_task(void *data) { unsigned int cpu; cpumask_t tmp_mask; struct cpufreq_lulzactive_cpuinfo *pcpu; #if DEBUG u64 now; u64 then; unsigned int lat; #endif while (1) { set_current_state(TASK_INTERRUPTIBLE); spin_lock(&up_cpumask_lock); if (cpumask_empty(&up_cpumask)...
functions
void cpufreq_lulzactive_freq_down(struct work_struct *work) { unsigned int cpu; cpumask_t tmp_mask; struct cpufreq_lulzactive_cpuinfo *pcpu; spin_lock(&down_cpumask_lock); tmp_mask = down_cpumask; cpumask_clear(&down_cpumask); spin_unlock(&down_cpumask_lock); for_each_cpu(cpu, &tmp_mask) { pcpu = &p...
functions
ssize_t show_inc_cpu_load(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%lu\n", inc_cpu_load); }
functions
ssize_t store_inc_cpu_load(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { ssize_t ret; if(strict_strtoul(buf, 0, &inc_cpu_load)==-EINVAL) return -EINVAL; if (inc_cpu_load > 100) { inc_cpu_load = 100; }
functions
else if (inc_cpu_load < 10) { inc_cpu_load = 10; }
functions
ssize_t show_dec_cpu_load(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%lu\n", dec_cpu_load); }
functions
ssize_t store_dec_cpu_load(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { ssize_t ret; if(strict_strtoul(buf, 0, &dec_cpu_load)==-EINVAL) return -EINVAL; if (dec_cpu_load >= 100) { dec_cpu_load = 100; }
functions
else if (dec_cpu_load > inc_cpu_load) { dec_cpu_load = inc_cpu_load; }
functions
else if (dec_cpu_load < 0) { dec_cpu_load = 0; }
functions
ssize_t show_down_sample_time(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%lu\n", down_sample_time); }
functions
ssize_t store_down_sample_time(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { if(strict_strtoul(buf, 0, &down_sample_time)==-EINVAL) return -EINVAL; return count; }
functions
ssize_t show_up_sample_time(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%lu\n", up_sample_time); }
functions
ssize_t store_up_sample_time(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { if(strict_strtoul(buf, 0, &up_sample_time)==-EINVAL) return -EINVAL; return count; }
functions
ssize_t show_debug_mode(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%lu\n", debug_mode); }
functions
ssize_t store_debug_mode(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { if(strict_strtoul(buf, 0, &debug_mode)==-EINVAL) return -EINVAL; return count; }
functions
ssize_t show_pump_up_step(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%lu\n", pump_up_step); }
functions
ssize_t store_pump_up_step(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { if(strict_strtoul(buf, 0, &pump_up_step)==-EINVAL) return -EINVAL; return count; }
functions
ssize_t show_pump_down_step(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%lu\n", pump_down_step); }
functions
ssize_t store_pump_down_step(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { ssize_t ret; struct cpufreq_lulzactive_cpuinfo *pcpu; if(strict_strtoul(buf, 0, &pump_down_step)==-EINVAL) return -EINVAL; pcpu = &per_cpu(cpuinfo, 0); // fix ou...
functions
ssize_t show_screen_off_min_step(struct kobject *kobj, struct attribute *attr, char *buf) { struct cpufreq_lulzactive_cpuinfo *pcpu; pcpu = &per_cpu(cpuinfo, 0); fix_screen_off_min_step(pcpu); return sprintf(buf, "%lu\n", screen_off_min_step); }
functions
ssize_t store_screen_off_min_step(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { struct cpufreq_lulzactive_cpuinfo *pcpu; ssize_t ret; if(strict_strtoul(buf, 0, &screen_off_min_step)==-EINVAL) return -EINVAL; pcpu = &per_cpu(cpuinfo,...
functions
ssize_t show_author(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%s\n", LULZACTIVE_AUTHOR); }
functions
ssize_t show_tuner(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%s\n", LULZACTIVE_TUNER); }
functions
ssize_t show_version(struct kobject *kobj, struct attribute *attr, char *buf) { return sprintf(buf, "%d\n", LULZACTIVE_VERSION); }
functions
ssize_t show_freq_table(struct kobject *kobj, struct attribute *attr, char *buf) { struct cpufreq_lulzactive_cpuinfo *pcpu; char temp[64]; int i; pcpu = &per_cpu(cpuinfo, 0); for (i = 0; i < pcpu->freq_table_size; i++) { sprintf(temp, "%u\n", pcpu->freq_table[i].frequency...
functions
int cpufreq_governor_lulzactive(struct cpufreq_policy *new_policy, unsigned int event) { int rc; struct cpufreq_lulzactive_cpuinfo *pcpu = &per_cpu(cpuinfo, new_policy->cpu); switch (event) { case CPUFREQ_GOV_START: if (debug_mode & LULZACTIVE_DEBUG...
functions
void lulzactive_early_suspend(struct early_suspend *handler) { struct cpufreq_lulzactive_cpuinfo *pcpu; unsigned int min_freq, max_freq; early_suspended = 1; up_sample_time_awake = up_sample_time; up_sample_time = DEFAULT_UP_SAMPLE_TIME_SLEEP; down_sample_time_awake = down_sample_time; down_sample_time = DE...
functions
void lulzactive_late_resume(struct early_suspend *handler) { early_suspended = 0; up_sample_time = up_sample_time_awake; down_sample_time = down_sample_time_awake; inc_cpu_load = inc_cpu_load_awake; dec_cpu_load = dec_cpu_load_awake; if (debug_mode & LULZACTIVE_DEBUG_EARLY_SUSPEND) { LOGI("%s\n", __func__); ...
functions
int lulzactive_pm_notifier_event(struct notifier_block *this, unsigned long event, void *ptr) { struct cpufreq_policy* policy; switch (event) { case PM_SUSPEND_PREPARE: suspending = 1; if (debug_mode & LULZACTIVE_DEBUG_SUSPEND) { ...
functions
__init cpufreq_lulzactive_init(void) { unsigned int i; struct cpufreq_lulzactive_cpuinfo *pcpu; struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }
functions
__exit cpufreq_lulzactive_exit(void) { cpufreq_unregister_governor(&cpufreq_gov_lulzactive); unregister_early_suspend(&lulzactive_power_suspend); unregister_pm_notifier(&lulzactive_pm_notifier); kthread_stop(up_task); put_task_struct(up_task); destroy_workqueue(down_wq); }
defines
#define PROTOBUF_C__NO_DEPRECATED
functions
void gg110_login_ok__init (GG110LoginOK *message) { static GG110LoginOK init_value = GG110_LOGIN_OK__INIT; *message = init_value; }
functions
size_t gg110_login_ok__get_packed_size (const GG110LoginOK *message) { assert(message->base.descriptor == &gg110_login_ok__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_login_ok__pack (const GG110LoginOK *message, uint8_t *out) { assert(message->base.descriptor == &gg110_login_ok__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_login_ok__pack_to_buffer (const GG110LoginOK *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_login_ok__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_login_ok__free_unpacked (GG110LoginOK *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_login_ok__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_pong__init (GG110Pong *message) { static GG110Pong init_value = GG110_PONG__INIT; *message = init_value; }
functions
size_t gg110_pong__get_packed_size (const GG110Pong *message) { assert(message->base.descriptor == &gg110_pong__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_pong__pack (const GG110Pong *message, uint8_t *out) { assert(message->base.descriptor == &gg110_pong__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_pong__pack_to_buffer (const GG110Pong *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_pong__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_pong__free_unpacked (GG110Pong *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_pong__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_ack__init (GG110Ack *message) { static GG110Ack init_value = GG110_ACK__INIT; *message = init_value; }
functions
size_t gg110_ack__get_packed_size (const GG110Ack *message) { assert(message->base.descriptor == &gg110_ack__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_ack__pack (const GG110Ack *message, uint8_t *out) { assert(message->base.descriptor == &gg110_ack__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_ack__pack_to_buffer (const GG110Ack *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_ack__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_ack__free_unpacked (GG110Ack *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_ack__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg105_login__init (GG105Login *message) { static GG105Login init_value = GG105_LOGIN__INIT; *message = init_value; }
functions
size_t gg105_login__get_packed_size (const GG105Login *message) { assert(message->base.descriptor == &gg105_login__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg105_login__pack (const GG105Login *message, uint8_t *out) { assert(message->base.descriptor == &gg105_login__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg105_login__pack_to_buffer (const GG105Login *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg105_login__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg105_login__free_unpacked (GG105Login *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg105_login__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_message_ack_link__init (GG110MessageAckLink *message) { static GG110MessageAckLink init_value = GG110_MESSAGE_ACK_LINK__INIT; *message = init_value; }
functions
size_t gg110_message_ack_link__get_packed_size (const GG110MessageAckLink *message) { assert(message->base.descriptor == &gg110_message_ack_link__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_message_ack_link__pack (const GG110MessageAckLink *message, uint8_t *out) { assert(message->base.descriptor == &gg110_message_ack_link__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_message_ack_link__pack_to_buffer (const GG110MessageAckLink *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_message_ack_link__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_message_ack_link__free_unpacked (GG110MessageAckLink *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_message_ack_link__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_message_ack__init (GG110MessageAck *message) { static GG110MessageAck init_value = GG110_MESSAGE_ACK__INIT; *message = init_value; }
functions
size_t gg110_message_ack__get_packed_size (const GG110MessageAck *message) { assert(message->base.descriptor == &gg110_message_ack__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_message_ack__pack (const GG110MessageAck *message, uint8_t *out) { assert(message->base.descriptor == &gg110_message_ack__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_message_ack__pack_to_buffer (const GG110MessageAck *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_message_ack__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_message_ack__free_unpacked (GG110MessageAck *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_message_ack__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_event__init (GG110Event *message) { static GG110Event init_value = GG110_EVENT__INIT; *message = init_value; }
functions
size_t gg110_event__get_packed_size (const GG110Event *message) { assert(message->base.descriptor == &gg110_event__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_event__pack (const GG110Event *message, uint8_t *out) { assert(message->base.descriptor == &gg110_event__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_event__pack_to_buffer (const GG110Event *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_event__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_event__free_unpacked (GG110Event *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_event__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_recv_message__init (GG110RecvMessage *message) { static GG110RecvMessage init_value = GG110_RECV_MESSAGE__INIT; *message = init_value; }
functions
size_t gg110_recv_message__get_packed_size (const GG110RecvMessage *message) { assert(message->base.descriptor == &gg110_recv_message__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_recv_message__pack (const GG110RecvMessage *message, uint8_t *out) { assert(message->base.descriptor == &gg110_recv_message__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_recv_message__pack_to_buffer (const GG110RecvMessage *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_recv_message__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_recv_message__free_unpacked (GG110RecvMessage *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_recv_message__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_send_message__init (GG110SendMessage *message) { static GG110SendMessage init_value = GG110_SEND_MESSAGE__INIT; *message = init_value; }
functions
size_t gg110_send_message__get_packed_size (const GG110SendMessage *message) { assert(message->base.descriptor == &gg110_send_message__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_send_message__pack (const GG110SendMessage *message, uint8_t *out) { assert(message->base.descriptor == &gg110_send_message__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_send_message__pack_to_buffer (const GG110SendMessage *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_send_message__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_send_message__free_unpacked (GG110SendMessage *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_send_message__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_imtoken__init (GG110Imtoken *message) { static GG110Imtoken init_value = GG110_IMTOKEN__INIT; *message = init_value; }
functions
size_t gg110_imtoken__get_packed_size (const GG110Imtoken *message) { assert(message->base.descriptor == &gg110_imtoken__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_imtoken__pack (const GG110Imtoken *message, uint8_t *out) { assert(message->base.descriptor == &gg110_imtoken__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_imtoken__pack_to_buffer (const GG110Imtoken *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_imtoken__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_imtoken__free_unpacked (GG110Imtoken *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_imtoken__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }
functions
void gg110_chat_info_update__init (GG110ChatInfoUpdate *message) { static GG110ChatInfoUpdate init_value = GG110_CHAT_INFO_UPDATE__INIT; *message = init_value; }
functions
size_t gg110_chat_info_update__get_packed_size (const GG110ChatInfoUpdate *message) { assert(message->base.descriptor == &gg110_chat_info_update__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); }
functions
size_t gg110_chat_info_update__pack (const GG110ChatInfoUpdate *message, uint8_t *out) { assert(message->base.descriptor == &gg110_chat_info_update__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); }
functions
size_t gg110_chat_info_update__pack_to_buffer (const GG110ChatInfoUpdate *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &gg110_chat_info_update__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); }
functions
void gg110_chat_info_update__free_unpacked (GG110ChatInfoUpdate *message, ProtobufCAllocator *allocator) { assert(message->base.descriptor == &gg110_chat_info_update__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); }