lkml.org 
[lkml]   [1996]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fast_IRQ##_interrupt() Question(s)
In article <Pine.LNX.3.93.960513210745.13345A-100000@pc5829.hil.siemens.co.at>
Ingo Molnar <mingo@pc5829.hil.siemens.co.at> 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).

Michael
--
Email: hohmuth@inf.tu-dresden.de
WWW: http://www.inf.tu-dresden.de/~mh1/


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