linux_dsm_epyc7002/arch/x86/kernel/acpi
Sinan Kaya f1caa61df2 ACPI/PCI: pci_link: penalize SCI correctly
Ondrej reported that IRQs stopped working in v4.7 on several
platforms.  A typical scenario, from Ondrej's VT82C694X/694X, is:

ACPI: Using PIC for interrupt routing
ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)
ACPI: No IRQ available for PCI Interrupt Link [LNKA]
8139too 0000:00:0f.0: PCI INT A: no GSI

We're using PIC routing, so acpi_irq_balance == 0, and LNKA is already
active at IRQ 11. In that case, acpi_pci_link_allocate() only tries
to use the active IRQ (IRQ 11) which also happens to be the SCI.

We should penalize the SCI by PIRQ_PENALTY_PCI_USING, but
irq_get_trigger_type(11) returns something other than
IRQ_TYPE_LEVEL_LOW, so we penalize it by PIRQ_PENALTY_ISA_ALWAYS
instead, which makes acpi_pci_link_allocate() assume the IRQ isn't
available and give up.

Add acpi_penalize_sci_irq() so platforms can tell us the SCI IRQ,
trigger, and polarity directly and we don't have to depend on
irq_get_trigger_type().

Fixes: 103544d869 (ACPI,PCI,IRQ: reduce resource requirements)
Link: http://lkml.kernel.org/r/201609251512.05657.linux@rainbow-software.org
Reported-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Tested-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-10-24 14:18:14 +02:00
..
apei.c acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI context. 2014-07-22 15:05:06 -07:00
boot.c ACPI/PCI: pci_link: penalize SCI correctly 2016-10-24 14:18:14 +02:00
cppc_msr.c ACPI / CPPC: Add support for functional fixed hardware address 2016-09-08 23:02:14 +02:00
cstate.c nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
Makefile ACPI / CPPC: Add support for functional fixed hardware address 2016-09-08 23:02:14 +02:00
sleep.c x86/asm/head: Rename 'stack_start' -> 'initial_stack' 2016-08-18 18:41:29 +02:00
sleep.h ACPICA: Cleanup asmlinkage for ACPICA APIs. 2013-10-31 14:37:35 +01:00
wakeup_32.S x86: Load __USER_DS into DS/ES after resume 2015-06-22 14:40:03 +02:00
wakeup_64.S x86/asm/acpi: Create a stack frame in do_suspend_lowlevel() 2016-02-24 08:35:43 +01:00