static void loongson2_cpu_start(void *args)
{
	/* Start all counters on current CPU */
	if (reg.cnt1_enabled || reg.cnt2_enabled)
		write_c0_perfctrl(reg.ctrl);
}
static void loongson2_exit(void)
{
	write_c0_perfctrl(0);
	free_irq(LOONGSON2_PERFCNT_IRQ, oprofid);
}
static void loongson2_cpu_stop(void *args)
{
	/* Stop all counters on current CPU */
	write_c0_perfctrl(0);
	memset(&reg, 0, sizeof(reg));
}
static void reset_counters(void *arg)
{
	write_c0_perfctrl(0);
	write_c0_perfcnt(0);
}
static void loongson2_cpu_stop(void *args)
{

    write_c0_perfctrl(0);
    memset(&reg, 0, sizeof(reg));
}
static void loongson2_cpu_start(void *args)
{

    if (reg.cnt1_enabled || reg.cnt2_enabled)
        write_c0_perfctrl(reg.ctrl);
}