[lkml]   [1996]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: fast_IRQ##_interrupt() Question(s)
In article <>
Ingo Molnar <> writes:

> in arch/asm-i386/irq.h,

> B) and a related question. The slow interrupt handlers start with this code:
> SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
> "pushl $-"#nr"-2\n\t" \
> why is "-nr-2" pushed to the stack? A few lines later we do:
> "pushl $" #nr "\n\t" \
> which is "nr" to the stack. my best guess is that this is some kind
> identification. But why twice?

Slow interrupt handlers must create a stack layout as specified in
<asm-i386/ptrace.h> (struct pt_regs) so that they can leave the kernel
via ret_from_sys_call (in arch/i386/kernel/entry.S). The first push
ist for the structure's orig_eax element.

I believe the value stored in orig_eax is never evaluated by any
interrupt handler. -nr-2 is probably used to be more in line with
what other kernel entrys leave in this field (system call number (>=
0) or -1 for faults).


 \ /
  Last update: 2005-03-22 13:37    [W:0.026 / U:5.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site