[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB52769DCDF70B551FCFF22DC58C042@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Fri, 12 Apr 2024 09:21:45 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>, LKML
<linux-kernel@...r.kernel.org>, X86 Kernel <x86@...nel.org>, Peter Zijlstra
<peterz@...radead.org>, "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
Thomas Gleixner <tglx@...utronix.de>, Lu Baolu <baolu.lu@...ux.intel.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "Hansen, Dave"
<dave.hansen@...el.com>, Joerg Roedel <joro@...tes.org>, "H. Peter Anvin"
<hpa@...or.com>, Borislav Petkov <bp@...en8.de>, Ingo Molnar
<mingo@...hat.com>
CC: "Luse, Paul E" <paul.e.luse@...el.com>, "Williams, Dan J"
<dan.j.williams@...el.com>, Jens Axboe <axboe@...nel.dk>, "Raj, Ashok"
<ashok.raj@...el.com>, "maz@...nel.org" <maz@...nel.org>, "seanjc@...gle.com"
<seanjc@...gle.com>, Robin Murphy <robin.murphy@....com>,
"jim.harris@...sung.com" <jim.harris@...sung.com>, "a.manzanares@...sung.com"
<a.manzanares@...sung.com>, Bjorn Helgaas <helgaas@...nel.org>, "Zeng, Guang"
<guang.zeng@...el.com>, "robert.hoo.linux@...il.com"
<robert.hoo.linux@...il.com>
Subject: RE: [PATCH v2 07/13] x86/irq: Factor out calling ISR from
common_interrupt
> From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> Sent: Saturday, April 6, 2024 6:31 AM
>
> Prepare for calling external IRQ handlers directly from the posted MSI
> demultiplexing loop. Extract the common code with common interrupt to
> avoid code duplication.
>
> Signed-off-by: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> ---
> arch/x86/kernel/irq.c | 23 ++++++++++++++---------
> 1 file changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
> index f39f6147104c..c54de9378943 100644
> --- a/arch/x86/kernel/irq.c
> +++ b/arch/x86/kernel/irq.c
> @@ -242,18 +242,10 @@ static __always_inline void handle_irq(struct
> irq_desc *desc,
> __handle_irq(desc, regs);
> }
>
> -/*
> - * common_interrupt() handles all normal device IRQ's (the special SMP
> - * cross-CPU interrupts have their own entry points).
> - */
> -DEFINE_IDTENTRY_IRQ(common_interrupt)
> +static __always_inline void call_irq_handler(int vector, struct pt_regs *regs)
> {
> - struct pt_regs *old_regs = set_irq_regs(regs);
> struct irq_desc *desc;
>
> - /* entry code tells RCU that we're not quiescent. Check it. */
> - RCU_LOCKDEP_WARN(!rcu_is_watching(), "IRQ failed to wake up
> RCU");
> -
> desc = __this_cpu_read(vector_irq[vector]);
> if (likely(!IS_ERR_OR_NULL(desc))) {
> handle_irq(desc, regs);
the hidden lines has one problem:
} else {
apic_eoi();
if (desc == VECTOR_UNUSED) {
...
there will be two EOI's for unused vectors, adding the one
in sysvec_posted_msi_notification().
Powered by blists - more mailing lists