linux_dsm_epyc7002/drivers
Jiang Liu cffe0a2b5a x86, irq: Keep balance of IOAPIC pin reference count
To keep balance of IOAPIC pin reference count, we need to protect
pirq_enable_irq(), acpi_pci_irq_enable() and intel_mid_pci_irq_enable()
from reentrance. There are two cases which will cause reentrance.

The first case is caused by suspend/hibernation. If pcibios_disable_irq
is called during suspending/hibernating, we don't release the assigned
IRQ number, otherwise it may break the suspend/hibernation. So late when
pcibios_enable_irq is called during resume, we shouldn't allocate IRQ
number again.

The second case is that function acpi_pci_irq_enable() may be called
twice for PCI devices present at boot time as below:
1) pci_acpi_init()
	--> acpi_pci_irq_enable() if pci_routeirq is true
2) pci_enable_device()
	--> pcibios_enable_device()
		--> acpi_pci_irq_enable()
We can't kill kernel parameter pci_routeirq yet because it's still
needed for debugging purpose.

So flag irq_managed is introduced to track whether IRQ number is
assigned by OS and to protect pirq_enable_irq(), acpi_pci_irq_enable()
and intel_mid_pci_irq_enable() from reentrance.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Len Brown <lenb@kernel.org>
Link: http://lkml.kernel.org/r/1414387308-27148-13-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-12-16 14:08:15 +01:00
..
accessibility
acpi x86, irq: Keep balance of IOAPIC pin reference count 2014-12-16 14:08:15 +01:00
amba ARM: tegra: Move AHB Kconfig to drivers/amba 2014-11-26 09:43:25 +01:00
ata SCSI for-linus on 20141208 2014-12-08 21:19:19 -08:00
atm solos-pci: fix error return code 2014-11-23 14:29:44 -05:00
auxdisplay
base Merge remote-tracking branches 'regmap/topic/ac97' and 'regmap/topic/headers' into regmap-next 2014-11-21 11:32:36 +00:00
bcma bcma: add another PCI ID of device with BCM43228 2014-10-23 14:02:06 -04:00
block Merge remote-tracking branch 'scsi-queue/core-for-3.19' into for-linus 2014-12-08 07:40:20 -08:00
bluetooth
bus ARM: SoC driver updates for 3.19 2014-12-09 14:48:22 -08:00
cdrom
char asm-generic: asm/io.h rewrite 2014-12-09 17:25:00 -08:00
clk ARM: SoC driver updates for 3.19 2014-12-09 14:48:22 -08:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 08:18:32 -08:00
connector
cpufreq cpufreq: Avoid crash in resume on SMP without OPP 2014-11-08 02:10:04 +01:00
cpuidle Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-10-24 12:48:47 -07:00
crypto crypto: caam - fix missing dma unmap on error path 2014-11-06 23:10:20 +08:00
dca
devfreq
dio
dma Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2014-11-21 16:24:27 -08:00
dma-buf
edac Merge branch 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 14:20:10 -08:00
eisa
extcon
firewire firewire: cdev: prevent kernel stack leaking into ioctl arguments 2014-11-14 12:10:13 +01:00
firmware Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 12:42:16 -08:00
fmc
gpio mfd: tc3589x: get rid of static base 2014-11-25 16:18:56 +00:00
gpu Merge tag 'drm-intel-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel into drm-fixes 2014-12-05 11:12:29 +10:00
hid Hi Linus, 2014-12-08 20:02:54 -08:00
hsi
hv
hwmon hwmon: (tmp401) Detect TMP435 on all addresses it supports 2014-12-08 06:48:37 -08:00
hwspinlock
i2c Hi Linus, 2014-12-08 20:02:54 -08:00
ide
idle
iio Hi Linus, 2014-12-08 20:02:54 -08:00
infiniband Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus 2014-12-08 07:42:25 -08:00
input drivers/input/evdev.c: don't kfree() a vmalloc address 2014-12-03 09:35:38 -08:00
iommu Merge branch 'x86/vt-d' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu into x86/apic-picks 2014-12-16 12:25:38 +01:00
ipack
irqchip Merge branch 'irq-irqdomain-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 09:01:01 -08:00
isdn
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2014-10-21 08:18:38 -07:00
lguest
macintosh
mailbox Merge branch 'mailbox-for-linus' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2014-10-21 11:21:19 -07:00
mcb
md - Significant DM thin-provisioning performance improvements to meet 2014-12-08 21:10:03 -08:00
media [media] rc-core: fix toggle handling in the rc6 decoder 2014-11-21 15:57:47 -02:00
memory ARM: SoC/OMAP GPMC driver cleanup and move for 3.19 2014-12-09 16:57:56 -08:00
memstick
message scsi: drop reason argument from ->change_queue_depth 2014-11-24 14:45:27 +01:00
mfd Hi Linus, 2014-12-08 20:02:54 -08:00
misc ARM: SoC cleanups for 3.19 2014-12-09 14:18:35 -08:00
mmc mmc: sdhci-msm: Convert to mmc_send_tuning() 2014-12-08 09:21:06 +01:00
mtd Three main MTD fixes for 3.18: 2014-11-02 14:45:52 -08:00
net ARM: SoC cleanup on mach-at91 for 3.19 2014-12-09 14:17:12 -08:00
nfc
ntb
nubus nubus: Remove superfluous interrupt disable/restore 2014-10-27 11:03:19 +01:00
of Merge branch 'irq-irqdomain-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 09:01:01 -08:00
oprofile
parisc
parport
pci PCI: Remove PCI ioapic driver 2014-12-16 14:08:14 +01:00
pcmcia
phy phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly 2014-11-05 14:34:06 -08:00
pinctrl pinctrl: baytrail: show output gpio state correctly on Intel Baytrail 2014-10-28 11:16:26 +01:00
platform platform: hp_accel: Add SERIO_I8042 as a dependency since it now includes i8042.h/serio.h 2014-11-10 21:16:15 -08:00
pnp
power ARM: SoC platform changes for 3.19 2014-12-09 14:38:28 -08:00
powercap
pps
ps3
ptp
pwm pwm: Changes for v3.18-rc1 2014-10-21 08:17:43 -07:00
rapidio
ras
regulator regulator: Updates for v3.19 2014-12-08 20:42:41 -08:00
remoteproc
reset Reset controller changes for v3.19 2014-12-04 16:57:36 +01:00
rpmsg
rtc Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 08:18:32 -08:00
s390 Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus 2014-12-08 07:42:25 -08:00
sbus
scsi Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus 2014-12-08 07:42:25 -08:00
sfi
sh
sn
soc ARM: SoC driver updates for 3.19 2014-12-09 14:48:22 -08:00
spi Merge remote-tracking branches 'spi/fix/dw' and 'spi/fix/sirf' into spi-linus 2014-11-26 19:05:25 +00:00
spmi
ssb
staging ARM: SoC DT updates for 3.19 2014-12-09 14:57:37 -08:00
target Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus 2014-12-08 07:42:25 -08:00
tc
thermal thermal: Exynos: Deletion of unnecessary checks before two function calls 2014-11-21 15:20:17 -04:00
thunderbolt
tty Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-09 21:21:34 -08:00
uio
usb Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus 2014-12-08 07:42:25 -08:00
uwb
vfio PCI/MSI: Rename write_msi_msg() to pci_write_msi_msg() 2014-11-23 13:01:45 +01:00
vhost vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT 2014-10-28 13:54:16 -07:00
video Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 13:59:34 -08:00
virt
virtio
vlynq
vme
w1 w1: omap-hdq: support device probing with device-tree 2014-11-10 15:58:47 -08:00
watchdog Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 08:18:32 -08:00
xen arm64 updates for 3.19 2014-12-09 13:12:47 -08:00
zorro
Kconfig ARM: tegra: Move AHB Kconfig to drivers/amba 2014-11-26 09:43:25 +01:00
Makefile