int gator_events_block_init(void)
{
    block_rq_wr_enabled = 0;
    block_rq_rd_enabled = 0;

    block_rq_wr_key = gator_events_get_key();
    block_rq_rd_key = gator_events_get_key();

    return gator_events_install(&gator_events_block_interface);
}
int gator_events_irq_init(void)
{
	hardirq_key = gator_events_get_key();
	softirq_key = gator_events_get_key();

	hardirq_enabled = 0;
	softirq_enabled = 0;

	return gator_events_install(&gator_events_irq_interface);
}
int gator_events_sched_init(void)
{
	sched_switch_enabled = 0;

	sched_switch_key = gator_events_get_key();

	return gator_events_install(&gator_events_sched_interface);
}
int gator_events_meminfo_init(void)
{
	int i;

	meminfo_global_enabled = 0;
	for (i = 0; i < MEMINFO_TOTAL; i++) {
		meminfo_enabled[i] = 0;
		meminfo_keys[i] = gator_events_get_key();
	}

	proc_global_enabled = 0;
	for (i = 0; i < PROC_COUNT; ++i) {
		proc_enabled[i] = 0;
		proc_keys[i] = gator_events_get_key();
	}

	return gator_events_install(&gator_events_meminfo_interface);
}
/* Must not be static! */
int gator_events_mmapped_init(void)
{
    int i;

    for (i = 0; i < MMAPPED_COUNTERS_NUM; i++) {
        mmapped_counters[i].enabled = 0;
        mmapped_counters[i].key = gator_events_get_key();
    }

    return gator_events_install(&gator_events_mmapped_interface);
}
/* Must not be static! */
int __init gator_events_clock_init(void)
{
	int i;

	for (i = 0; i < CLOCK_COUNTERS_NUM; i++) {
		clock_counters[i].enabled = 0;
		clock_counters[i].key = gator_events_get_key();
	}

	return gator_events_install(&gator_events_clock_interface);
}
extern void gator_mali_initialise_counters(mali_counter counters[], unsigned int n_counters)
{
	unsigned int cnt;

	for (cnt = 0; cnt < n_counters; cnt++) {
		mali_counter *counter = &counters[cnt];

		counter->key = gator_events_get_key();
		counter->enabled = 0;
	}
}
int gator_events_l2c310_init(void)
{
	int i;

	if (gator_cpuid() != CORTEX_A5 && gator_cpuid() != CORTEX_A9)
		return -1;

	if (l2c310_addr == L2C310_ADDR_PROBE)
		l2c310_base = gator_events_l2c310_probe();
	else if (l2c310_addr)
		l2c310_base = ioremap(l2c310_addr, SZ_4K);

	if (!l2c310_base)
		return -1;

	for (i = 0; i < L2C310_COUNTERS_NUM; i++) {
		l2c310_counters[i].enabled = 0;
		l2c310_counters[i].key = gator_events_get_key();
	}

	return gator_events_install(&gator_events_l2c310_interface);
}
int gator_events_mali_init(void)
{
    unsigned int cnt;
    u32 id = gator_mali_get_id();

    switch (id) {
    case MALI_T6xx:
        mali_name = "Mali-T6xx";
        break;
    case MALI_400:
        mali_name = "Mali-400";
        break;
    case MALI_300:
        mali_name = "Mali-300";
        break;
    case MALI_200:
        mali_name = "Mali-200";
        break;
    default:
        printk("Unknown Mali ID (%d)\n", id);
        return -1;
    }

    pr_debug("gator: mali init\n");

    for (cnt = FIRST_ACTIVITY_EVENT; cnt < NUMBER_OF_EVENTS; cnt++) {
        counter_enabled[cnt] = 0;
        counter_event[cnt] = 0;
        counter_key[cnt] = gator_events_get_key();
        counter_address[cnt] = NULL;
		counter_data[cnt] = 0;
    }

    trace_registered = 0;

    return gator_events_install(&gator_events_mali_interface);
}