]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Thermal: Intel SoC DTS: Translate IO-APIC GSI number to linux irq number
authorHans de Goede <hdegoede@redhat.com>
Sat, 2 Jun 2018 20:16:38 +0000 (22:16 +0200)
committerZhang Rui <rui.zhang@intel.com>
Thu, 26 Jul 2018 08:02:48 +0000 (16:02 +0800)
commit54c5848c214922e2c3bf07df6c5789767ff93893
treea9ad2df6bc9335fd23ff33fa1538fca0a4e4806c
parentd72e90f33aa4709ebecc5005562f52335e106a60
Thermal: Intel SoC DTS: Translate IO-APIC GSI number to linux irq number

The Intel SoC DTS uses a hardcoded GSI number, before this commit
it was passing it to request_irq as if it were a linux irq number,
but there is no 1:1 mapping so in essence it was requesting a
random interrupt.

Besides this causing the DTS driver to not actually get an interrupt
if the thermal thresholds are exceeded this also is causing an
interrupt conflict on some devices since the linux irq 86 which is
being requested is already in use, leading to oopses like this:

genirq: Flags mismatch irq 86. 00002001 (soc_dts) vs. 00000083 (volume_down)
CPU: 0 PID: 601 Comm: systemd-udevd Tainted: G         C OE     4.17.0-rc6+ #45
Hardware name: Insyde i86/Type2 - Board Product Name, BIOS CHUWI.D86JLBNR03 01/14/2015
Call Trace:
  dump_stack+0x5c/0x80
  __setup_irq.cold.50+0x4e/0xac
  ? request_threaded_irq+0xad/0x160
  request_threaded_irq+0xf5/0x160
  ? 0xffffffffc0a93000
  intel_soc_thermal_init+0x74/0x1000 [intel_soc_dts_thermal]

This commit makes the intel_soc_dts_thermal.c code call
acpi_register_gsi() to translate the hardcoded IO-APIC GSI number (86)
to a linux irq, so that the dts code uses the right interrupt and we
no longer get an oops about an irq conflict.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/Kconfig
drivers/thermal/intel_soc_dts_thermal.c