>Yes. That's one part. And the other part is simulate interrupts (
> infact simulating the entire hardware behaviour of a PCI based
Simulating an actual interrupt is a little different. When the CPU takes
an interrupt, (depending on arch) it invokes some code set up previously
by the initialization code (intel has Interrupt Descriptors, PPC has
vectors, and so on) All these eventually call a function do_IRQ that's
usually in arch/<arch>/kernel/irq.c. This function calls a get_irq
(at least in PPC it does) which is dependent on what board you're
running on. It returns the IRQ that went off. Then the appropiate
handler is called. That's the function that gets registered with
Quote:> Did you mean there's no difference between the code runs in the ISR
> and the code runs in tasklets or bottom halves?
The code in the ISR (I prefer to call top-half) needs to get in and out
as soon as possible since nothing else is serviced while in a top half.
That's not necessarily true, since a request_irq without the
SA_INTERRUPT flag, will turn interrupts back on.
Quote:> Did you mean they both are having same previleges and restrictions?
All of the kernel code has the same privileges. But as for the
restrictions, yes, the bottom-halves have the same restrictions as
top-halves, except interrupts are on when they start. Those restrictions
are, can't schedule, can't access user space, and anything else that
might call the previous two.