Пример #1
0
static enum hrtimer_restart hrtimer_func(struct hrtimer *hrtimer)
{
	unsigned int pid;
	unsigned int tid;
	unsigned int cpu;
	unsigned long long ts;
	struct pt_regs *regs;
	unsigned long flags;

	unsigned long long delay_in_ns;

	delay_in_ns = g_tbs_settings.interval * NSEC_PER_USEC;

	regs = get_irq_regs();
	
	local_irq_save(flags);

	if (regs != NULL)
	{
		pid = current->tgid;
		tid = current->pid;
		cpu = smp_processor_id();
		ts  = get_timestamp();

		px_timer_isr(pid, tid, regs, cpu, ts);
	}
	
	local_irq_restore(flags);

	hrtimer_forward_now(hrtimer, ns_to_ktime(delay_in_ns));

	return HRTIMER_RESTART;
}
Пример #2
0
irqreturn_t px_hotspot_isr(int irq, void * dev)
{
	struct pt_regs *regs;

	unsigned int pid;
	unsigned int tid;
	unsigned int pc;
	unsigned int ts;
	unsigned long flags;
	irqreturn_t ret;

	local_irq_save(flags);

	ret = IRQ_NONE;

	regs = get_irq_regs();

	pid = current->tgid;
	tid = current->pid;
	pc  = regs->ARM_pc;
	ts  = get_timestamp();

	if (irq == get_timer_irq())
	{
		ret = px_timer_isr(pid, tid, pc, ts);
	}
	else if (irq == g_pmu_irq_num)
	{
		ret = px_pmu_isr(pid, tid, pc, ts);
	}

	local_irq_restore(flags);

	return ret;
}
Пример #3
0
static enum hrtimer_restart hrtimer_func(struct hrtimer *hrtimer)
{
	unsigned int pid;
	unsigned int tid;
	unsigned int pc;
	unsigned long flags;
	unsigned long long ts;
	ktime_t ktime;
	struct pt_regs *regs;

	local_irq_save(flags);

	regs = get_irq_regs();

	if (regs != NULL)
	{
		pid = current->tgid;
		tid = current->pid;
		pc  = regs->ARM_pc;
		ts  = get_timestamp();

		px_timer_isr(pid, tid, pc, ts);
	}

	ktime = ktime_set(0, g_tbs_settings.interval * NSEC_PER_USEC);
	hrtimer_forward_now(hrtimer, ktime);

	local_irq_restore(flags);

	return HRTIMER_RESTART;
}
Пример #4
0
irqreturn_t px_css_isr(int irq, void * dev)
{
	struct pt_regs *regs;

	unsigned int pid;
	unsigned int tid;
	unsigned int cpu;
	unsigned long flags;
	unsigned long long ts;
	irqreturn_t ret;

	local_irq_save(flags);

	ret = IRQ_NONE;

	regs = get_irq_regs();

	pid = current->tgid;
	tid = current->pid;

	cpu = smp_processor_id();
	
	ts = get_timestamp();

#ifdef HW_TBS
	if (irq == get_timer_irq())
	{
		ret = px_timer_isr(regs, pid, tid, cpu, ts);
	}
	else
#endif
	{
		ret = px_pmu_isr(regs, pid, tid, cpu, ts);
	}

	local_irq_restore(flags);

	return ret;
}