aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lguest/boot.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-08-02 16:38:27 -0400
committerThomas Gleixner <tglx@linutronix.de>2015-08-05 18:14:59 -0400
commita782a7e46bb50822fabfeb7271605762a59c86df (patch)
treea1b4d1798fc5b87f255716f07a170795cf5d5600 /arch/x86/lguest/boot.c
parentf61ae4fb66a4f7ae49e3456003fc4328d6db09c9 (diff)
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>
Diffstat (limited to 'arch/x86/lguest/boot.c')
-rw-r--r--arch/x86/lguest/boot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 2165f45befff..47071a08bfa6 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -843,6 +843,7 @@ static struct irq_chip lguest_irq_controller = {
843 */ 843 */
844static int lguest_setup_irq(unsigned int irq) 844static int lguest_setup_irq(unsigned int irq)
845{ 845{
846 struct irq_desc *desc;
846 int err; 847 int err;
847 848
848 /* Returns -ve error or vector number. */ 849 /* Returns -ve error or vector number. */
@@ -858,7 +859,8 @@ static int lguest_setup_irq(unsigned int irq)
858 handle_level_irq, "level"); 859 handle_level_irq, "level");
859 860
860 /* Some systems map "vectors" to interrupts weirdly. Not us! */ 861 /* Some systems map "vectors" to interrupts weirdly. Not us! */
861 __this_cpu_write(vector_irq[FIRST_EXTERNAL_VECTOR + irq], irq); 862 desc = irq_to_desc(irq);
863 __this_cpu_write(vector_irq[FIRST_EXTERNAL_VECTOR + irq], desc);
862 return 0; 864 return 0;
863} 865}
864 866