x86/irq: Store irq descriptor in vector array

We can spare the irq_desc lookup in the interrupt entry code if we
store the descriptor pointer in the vector array instead the interrupt
number.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Link: http://lkml.kernel.org/r/20150802203609.717724106@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Thomas Gleixner
2015-08-02 20:38:27 +00:00
parent f61ae4fb66
commit a782a7e46b
8 changed files with 58 additions and 66 deletions

View File

@@ -843,6 +843,7 @@ static struct irq_chip lguest_irq_controller = {
*/
static int lguest_setup_irq(unsigned int irq)
{
struct irq_desc *desc;
int err;
/* Returns -ve error or vector number. */
@@ -858,7 +859,8 @@ static int lguest_setup_irq(unsigned int irq)
handle_level_irq, "level");
/* Some systems map "vectors" to interrupts weirdly. Not us! */
__this_cpu_write(vector_irq[FIRST_EXTERNAL_VECTOR + irq], irq);
desc = irq_to_desc(irq);
__this_cpu_write(vector_irq[FIRST_EXTERNAL_VECTOR + irq], desc);
return 0;
}