diff mbox series

[3/3] x86/vector/msi: Select CONFIG_GENERIC_IRQ_RESERVATION_MODE

Message ID 20171017075600.527569354@linutronix.de
State Not Applicable
Headers show
Series x86/PCI/MSI: Make sure that irq reservation mode works everywhere | expand

Commit Message

Thomas Gleixner Oct. 17, 2017, 7:54 a.m. UTC
Select CONFIG_GENERIC_IRQ_RESERVATION_MODE so PCI/MSI domains get the
MSI_FLAG_MUST_REACTIVATE flag set in pci_msi_create_irq_domain().

Remove the explicit setters of this flag in the apic/msi code as they are
not longer required.

Fixes: 4900be83602b ("x86/vector/msi: Switch to global reservation mode")
Reported-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/Kconfig           |    2 +-
 arch/x86/kernel/apic/msi.c |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

Comments

Dexuan Cui Oct. 17, 2017, 6:59 p.m. UTC | #1
> From: Thomas Gleixner [mailto:tglx@linutronix.de]
> Sent: Tuesday, October 17, 2017 12:55 AM
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -95,7 +95,7 @@ config X86
>  	select GENERIC_IRQ_MATRIX_ALLOCATOR	if X86_LOCAL_APIC
>  	select GENERIC_IRQ_MIGRATION		if SMP
>  	select GENERIC_IRQ_PROBE
> -	select GENERIC_IRQ_SHOW
> +	select GENERIC_IRQ_RESERVATION_MODE
>  	select GENERIC_PENDING_IRQ		if SMP
>  	select GENERIC_SMP_IDLE_THREAD
>  	select GENERIC_STRNCPY_FROM_USER

Hi Thomas,
It looks you removed GENERIC_IRQ_SHOW by accident?

I got this build error:
...
  LD      vmlinux.o
  MODPOST vmlinux.o
fs/proc/interrupts.o:(.rodata+0x118): undefined reference to `show_interrupts'
Makefile:1000: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

Adding GENERIC_IRQ_SHOW back can fix the build failure, and with the
pachset Hyper-V PCI pass-through can work fine.

Thanks,
-- Dexuan
Thomas Gleixner Oct. 17, 2017, 9:49 p.m. UTC | #2
On Tue, 17 Oct 2017, Dexuan Cui wrote:

> > From: Thomas Gleixner [mailto:tglx@linutronix.de]
> > Sent: Tuesday, October 17, 2017 12:55 AM
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -95,7 +95,7 @@ config X86
> >  	select GENERIC_IRQ_MATRIX_ALLOCATOR	if X86_LOCAL_APIC
> >  	select GENERIC_IRQ_MIGRATION		if SMP
> >  	select GENERIC_IRQ_PROBE
> > -	select GENERIC_IRQ_SHOW
> > +	select GENERIC_IRQ_RESERVATION_MODE
> >  	select GENERIC_PENDING_IRQ		if SMP
> >  	select GENERIC_SMP_IDLE_THREAD
> >  	select GENERIC_STRNCPY_FROM_USER
> 
> Hi Thomas,
> It looks you removed GENERIC_IRQ_SHOW by accident?

Indeed. My patch foo today is more than bad....

> I got this build error:
> ...
>   LD      vmlinux.o
>   MODPOST vmlinux.o
> fs/proc/interrupts.o:(.rodata+0x118): undefined reference to `show_interrupts'
> Makefile:1000: recipe for target 'vmlinux' failed
> make: *** [vmlinux] Error 1
> 
> Adding GENERIC_IRQ_SHOW back can fix the build failure, and with the
> pachset Hyper-V PCI pass-through can work fine.

Thanks for testing.

       tglx
diff mbox series

Patch

--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -95,7 +95,7 @@  config X86
 	select GENERIC_IRQ_MATRIX_ALLOCATOR	if X86_LOCAL_APIC
 	select GENERIC_IRQ_MIGRATION		if SMP
 	select GENERIC_IRQ_PROBE
-	select GENERIC_IRQ_SHOW
+	select GENERIC_IRQ_RESERVATION_MODE
 	select GENERIC_PENDING_IRQ		if SMP
 	select GENERIC_SMP_IDLE_THREAD
 	select GENERIC_STRNCPY_FROM_USER
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
@@ -129,7 +129,7 @@  static struct msi_domain_ops pci_msi_dom
 
 static struct msi_domain_info pci_msi_domain_info = {
 	.flags		= MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
-			  MSI_FLAG_PCI_MSIX | MSI_FLAG_MUST_REACTIVATE,
+			  MSI_FLAG_PCI_MSIX,
 	.ops		= &pci_msi_domain_ops,
 	.chip		= &pci_msi_controller,
 	.handler	= handle_edge_irq,
@@ -167,8 +167,7 @@  static struct irq_chip pci_msi_ir_contro
 
 static struct msi_domain_info pci_msi_ir_domain_info = {
 	.flags		= MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
-			  MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX |
-			  MSI_FLAG_MUST_REACTIVATE,
+			  MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX,
 	.ops		= &pci_msi_domain_ops,
 	.chip		= &pci_msi_ir_controller,
 	.handler	= handle_edge_irq,