I'm writing a kernel module on embedded Linux (Yocto distribution), and I wanted to handle some high-frequency interrupts from one of the hardware timers. However, I see that 1us resolution is too high for Linux(?) - I think so because the values are incorrect. The code is simple:
static irqreturn_t pmodule_ref2_irq(int irq, void *lp)
{
unsigned long int temp;
ns++;
temp = ioread32(temp_base_addr + TTC1_INTERRUPT_REGISTER);
return IRQ_HANDLED;
}
Changing Interval value to 100x higher fixes the problem but my resolution is not satisfactory.
My question is: can anyone tell me how fast the kernel module Interrupt can be handled, or how can I check it?