Changes in 4.9.147 signal: Introduce COMPAT_SIGMINSTKSZ for use in compat_sys_sigaltstack lib/interval_tree_test.c: make test options module parameters lib/interval_tree_test.c: allow full tree search lib/rbtree_test.c: make input module parameters lib/rbtree-test: lower default params lib/interval_tree_test.c: allow users to limit scope of endpoint timer/debug: Change /proc/timer_list from 0444 to 0400 pinctrl: sunxi: a83t: Fix IRQ offset typo for PH11 aio: fix spectre gadget in lookup_ioctx MMC: OMAP: fix broken MMC on OMAP15XX/OMAP5910/OMAP310 ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt tracing: Fix memory leak in set_trigger_filter() tracing: Fix memory leak of instance function hash filters powerpc/msi: Fix NULL pointer access in teardown code Revert "drm/rockchip: Allow driver to be shutdown on reboot/kexec" drm/i915/execlists: Apply a full mb before execution for Braswell mac80211: don't WARN on bad WMM parameters from buggy APs mac80211: Fix condition validating WMM IE IB/hfi1: Remove race conditions in user_sdma send path locking: Remove smp_read_barrier_depends() from queued_spin_lock_slowpath() locking/qspinlock: Ensure node is initialised before updating prev->next locking/qspinlock: Bound spinning on pending->locked transition in slowpath locking/qspinlock: Merge 'struct __qspinlock' into 'struct qspinlock' locking/qspinlock: Remove unbounded cmpxchg() loop from locking slowpath locking/qspinlock: Remove duplicate clear_pending() function from PV code locking/qspinlock: Kill cmpxchg() loop when claiming lock from head of queue locking/qspinlock: Re-order code locking/qspinlock/x86: Increase _Q_PENDING_LOOPS upper bound locking/qspinlock, x86: Provide liveness guarantee locking/qspinlock: Fix build for anonymous union in older GCC compilers mac80211_hwsim: fix module init error paths for netlink scsi: libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload x86/earlyprintk/efi: Fix infinite loop on some screen widths drm/msm: Grab a vblank reference when waiting for commit_done ARC: io.h: Implement reads{x}()/writes{x}() bonding: fix 802.3ad state sent to partner when unbinding slave nfs: don't dirty kernel pages read by direct-io SUNRPC: Fix a potential race in xprt_connect() sbus: char: add of_node_put() drivers/sbus/char: add of_node_put() drivers/tty: add missing of_node_put() ide: pmac: add of_node_put() clk: mvebu: Off by one bugs in cp110_of_clk_get() clk: mmp: Off by one in mmp_clk_add() Input: omap-keypad - fix keyboard debounce configuration libata: whitelist all SAMSUNG MZ7KM* solid-state disks mv88e6060: disable hardware level MAC learning net/mlx4_en: Fix build break when CONFIG_INET is off bpf: check pending signals while verifying programs ARM: 8814/1: mm: improve/fix ARM v7_dma_inv_range() unaligned address handling ARM: 8815/1: V7M: align v7m_dma_inv_range() with v7 counterpart ethernet: fman: fix wrong of_node_put() in probe function drm/ast: Fix connector leak during driver unload cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy (insecure cifs) vhost/vsock: fix reset orphans race with close timeout i2c: axxia: properly handle master timeout i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node nvmet-rdma: fix response use after free rtc: snvs: add a missing write sync rtc: snvs: Add timeouts to avoid kernel lockups Linux 4.9.147 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
44 lines
1.2 KiB
C
44 lines
1.2 KiB
C
/*
|
|
* Copyright 2006-2007, Michael Ellerman, IBM Corporation.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/msi.h>
|
|
#include <linux/pci.h>
|
|
|
|
#include <asm/machdep.h>
|
|
|
|
int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
|
|
{
|
|
struct pci_controller *phb = pci_bus_to_host(dev->bus);
|
|
|
|
if (!phb->controller_ops.setup_msi_irqs ||
|
|
!phb->controller_ops.teardown_msi_irqs) {
|
|
pr_debug("msi: Platform doesn't provide MSI callbacks.\n");
|
|
return -ENOSYS;
|
|
}
|
|
|
|
/* PowerPC doesn't support multiple MSI yet */
|
|
if (type == PCI_CAP_ID_MSI && nvec > 1)
|
|
return 1;
|
|
|
|
return phb->controller_ops.setup_msi_irqs(dev, nvec, type);
|
|
}
|
|
|
|
void arch_teardown_msi_irqs(struct pci_dev *dev)
|
|
{
|
|
struct pci_controller *phb = pci_bus_to_host(dev->bus);
|
|
|
|
/*
|
|
* We can be called even when arch_setup_msi_irqs() returns -ENOSYS,
|
|
* so check the pointer again.
|
|
*/
|
|
if (phb->controller_ops.teardown_msi_irqs)
|
|
phb->controller_ops.teardown_msi_irqs(dev);
|
|
}
|