Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2018-02-09 14:07:29 -0500
committerJeff Mahoney <jeffm@suse.com>2018-02-09 14:07:29 -0500
commitc71b2434f87c2650f5499ed9a2f5ab7c5429edf1 (patch)
treeed0fca0ad4372eaf3d009b906de4647f7add5646
parentb070e799ef4d87d4998b0ac4c5f3264409fb49a9 (diff)
parentd3814df005fe1251b2be89e30b43f24ce27ee936 (diff)
Merge remote-tracking branch 'origin/users/jdelvare/SLE15/for-next' into SLE15
-rw-r--r--patches.arch/x86-acpi-handle-sci-interrupts-above-legacy-space-gracefully.patch86
-rw-r--r--patches.arch/x86-acpi-reduce-code-duplication-in-mp_override_legacy_irq.patch79
-rw-r--r--series.conf4
3 files changed, 169 insertions, 0 deletions
diff --git a/patches.arch/x86-acpi-handle-sci-interrupts-above-legacy-space-gracefully.patch b/patches.arch/x86-acpi-handle-sci-interrupts-above-legacy-space-gracefully.patch
new file mode 100644
index 0000000000..1682f68c75
--- /dev/null
+++ b/patches.arch/x86-acpi-handle-sci-interrupts-above-legacy-space-gracefully.patch
@@ -0,0 +1,86 @@
+From: Vikas C Sajjan <vikas.cha.sajjan@hpe.com>
+Date: Thu, 16 Nov 2017 21:43:44 +0530
+Subject: x86/acpi: Handle SCI interrupts above legacy space gracefully
+Patch-mainline: v4.15
+Git-commit: 252714155f04c5d16989cb3aadb85fd1b5772f99
+References: bsc#1061680 bsc#1068984 bsc#1074099
+
+Platforms which support only IOAPIC mode, pass the SCI information above
+the legacy space (0-15) via the FADT mechanism and not via MADT.
+
+In such cases mp_override_legacy_irq() which is invoked from
+acpi_sci_ioapic_setup() to register SCI interrupts fails for interrupts
+greater equal 16, since it is meant to handle only the legacy space and
+emits error "Invalid bus_irq %u for legacy override".
+
+Add a new function to handle SCI interrupts >= 16 and invoke it
+conditionally in acpi_sci_ioapic_setup().
+
+The code duplication due to this new function will be cleaned up in a
+separate patch.
+
+Co-developed-by: Sunil V L <sunil.vl@hpe.com>
+Signed-off-by: Vikas C Sajjan <vikas.cha.sajjan@hpe.com>
+Signed-off-by: Sunil V L <sunil.vl@hpe.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Tested-by: Abdul Lateef Attar <abdul-lateef.attar@hpe.com>
+Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Cc: linux-pm@vger.kernel.org
+Cc: kkamagui@gmail.com
+Cc: linux-acpi@vger.kernel.org
+Link: https://lkml.kernel.org/r/1510848825-21965-2-git-send-email-vikas.cha.sajjan@hpe.com
+Acked-by: Jean Delvare <jdelvare@suse.de>
+---
+ arch/x86/kernel/acpi/boot.c | 34 +++++++++++++++++++++++++++++++++-
+ 1 file changed, 33 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/acpi/boot.c
++++ b/arch/x86/kernel/acpi/boot.c
+@@ -426,6 +426,34 @@ static int mp_config_acpi_gsi(struct dev
+ return 0;
+ }
+
++static int __init mp_register_ioapic_irq(u8 bus_irq, u8 polarity,
++ u8 trigger, u32 gsi)
++{
++ struct mpc_intsrc mp_irq;
++ int ioapic, pin;
++
++ /* Convert 'gsi' to 'ioapic.pin'(INTIN#) */
++ ioapic = mp_find_ioapic(gsi);
++ if (ioapic < 0) {
++ pr_warn("Failed to find ioapic for gsi : %u\n", gsi);
++ return ioapic;
++ }
++
++ pin = mp_find_ioapic_pin(ioapic, gsi);
++
++ mp_irq.type = MP_INTSRC;
++ mp_irq.irqtype = mp_INT;
++ mp_irq.irqflag = (trigger << 2) | polarity;
++ mp_irq.srcbus = MP_ISA_BUS;
++ mp_irq.srcbusirq = bus_irq;
++ mp_irq.dstapic = mpc_ioapic_id(ioapic);
++ mp_irq.dstirq = pin;
++
++ mp_save_irq(&mp_irq);
++
++ return 0;
++}
++
+ static int __init
+ acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end)
+ {
+@@ -470,7 +498,11 @@ static void __init acpi_sci_ioapic_setup
+ if (acpi_sci_flags & ACPI_MADT_POLARITY_MASK)
+ polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK;
+
+- mp_override_legacy_irq(bus_irq, polarity, trigger, gsi);
++ if (bus_irq < NR_IRQS_LEGACY)
++ mp_override_legacy_irq(bus_irq, polarity, trigger, gsi);
++ else
++ mp_register_ioapic_irq(bus_irq, polarity, trigger, gsi);
++
+ acpi_penalize_sci_irq(bus_irq, trigger, polarity);
+
+ /*
diff --git a/patches.arch/x86-acpi-reduce-code-duplication-in-mp_override_legacy_irq.patch b/patches.arch/x86-acpi-reduce-code-duplication-in-mp_override_legacy_irq.patch
new file mode 100644
index 0000000000..dadeacf32a
--- /dev/null
+++ b/patches.arch/x86-acpi-reduce-code-duplication-in-mp_override_legacy_irq.patch
@@ -0,0 +1,79 @@
+From: Vikas C Sajjan <vikas.cha.sajjan@hpe.com>
+Date: Thu, 16 Nov 2017 21:43:45 +0530
+Subject: x86/acpi: Reduce code duplication in mp_override_legacy_irq()
+Patch-mainline: v4.15
+Git-commit: 4ee2ec1b122599f7b10c849fa7915cebb37b7edb
+References: bsc#1061680 bsc#1068984 bsc#1074099
+
+The new function mp_register_ioapic_irq() is a subset of the code in
+mp_override_legacy_irq().
+
+Replace the code duplication by invoking mp_register_ioapic_irq() from
+mp_override_legacy_irq().
+
+Signed-off-by: Vikas C Sajjan <vikas.cha.sajjan@hpe.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
+Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Cc: linux-pm@vger.kernel.org
+Cc: kkamagui@gmail.com
+Cc: linux-acpi@vger.kernel.org
+Link: https://lkml.kernel.org/r/1510848825-21965-3-git-send-email-vikas.cha.sajjan@hpe.com
+Acked-by: Jean Delvare <jdelvare@suse.de>
+---
+ arch/x86/kernel/acpi/boot.c | 27 +++++----------------------
+ 1 file changed, 5 insertions(+), 22 deletions(-)
+
+--- a/arch/x86/kernel/acpi/boot.c
++++ b/arch/x86/kernel/acpi/boot.c
+@@ -339,13 +339,12 @@ acpi_parse_lapic_nmi(struct acpi_subtabl
+ #ifdef CONFIG_X86_IO_APIC
+ #define MP_ISA_BUS 0
+
++static int __init mp_register_ioapic_irq(u8 bus_irq, u8 polarity,
++ u8 trigger, u32 gsi);
++
+ static void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
+ u32 gsi)
+ {
+- int ioapic;
+- int pin;
+- struct mpc_intsrc mp_irq;
+-
+ /*
+ * Check bus_irq boundary.
+ */
+@@ -355,14 +354,6 @@ static void __init mp_override_legacy_ir
+ }
+
+ /*
+- * Convert 'gsi' to 'ioapic.pin'.
+- */
+- ioapic = mp_find_ioapic(gsi);
+- if (ioapic < 0)
+- return;
+- pin = mp_find_ioapic_pin(ioapic, gsi);
+-
+- /*
+ * TBD: This check is for faulty timer entries, where the override
+ * erroneously sets the trigger to level, resulting in a HUGE
+ * increase of timer interrupts!
+@@ -370,16 +361,8 @@ static void __init mp_override_legacy_ir
+ if ((bus_irq == 0) && (trigger == 3))
+ trigger = 1;
+
+- mp_irq.type = MP_INTSRC;
+- mp_irq.irqtype = mp_INT;
+- mp_irq.irqflag = (trigger << 2) | polarity;
+- mp_irq.srcbus = MP_ISA_BUS;
+- mp_irq.srcbusirq = bus_irq; /* IRQ */
+- mp_irq.dstapic = mpc_ioapic_id(ioapic); /* APIC ID */
+- mp_irq.dstirq = pin; /* INTIN# */
+-
+- mp_save_irq(&mp_irq);
+-
++ if (mp_register_ioapic_irq(bus_irq, polarity, trigger, gsi) < 0)
++ return;
+ /*
+ * Reset default identity mapping if gsi is also an legacy IRQ,
+ * otherwise there will be more than one entry with the same GSI
diff --git a/series.conf b/series.conf
index 59d59e84cf..d1cd4916e4 100644
--- a/series.conf
+++ b/series.conf
@@ -1298,6 +1298,10 @@
patches.suse/x86-cpufeatures-Enable-new-SSE-AVX-AVX512-CPU-featur.patch
patches.suse/x86-cpuid-Replace-set-clear_bit32.patch
+ # bsc#1068984
+ patches.arch/x86-acpi-handle-sci-interrupts-above-legacy-space-gracefully.patch
+ patches.arch/x86-acpi-reduce-code-duplication-in-mp_override_legacy_irq.patch
+
########################################################
# x86 MCE/MCA (Machine Check Error/Architecture) extensions
########################################################