[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAEPKs0fXY9WB+7kKPzOCt3HcGkLek3t_28GseZmX34Bu_14+NQ@mail.gmail.com>
Date: Sun, 3 Feb 2013 21:33:18 +0200
From: Ilya Lesokhin <ilya.lesokhin@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Reason for playing games with vector number on x86-64 interrupt handling
Hi,
I have a question related to interrupt handling on x86-64.
entry_64.s cains the following code:
pushq_cfi $(~vector+0x80) /* Note: always in signed byte range */
and later
addq $-0x80,(%rsp) /* Adjust vector to [-256,-1] range *
and then finally in irq.c
unsigned vector = ~regs->orig_ax;
if I'm not mistaken regs->orig_ax contains ((~vector+0x80) -0x80) =
~vector and applying ~ again gives vector.
I was wondering, what is the reason for all those games with vector?
why not just push vector in the begging and save later instructions?
Please CC me in your answers.
Thanks,
Ilya
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists