Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9199c4ca authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull PCI updates from Bjorn Helgaas:
 "PCI device hotplug
    - Move device_del() from pci_stop_dev() to pci_destroy_dev() (Rafael
      Wysocki)

  Host bridge drivers
    - Update maintainers for DesignWare, i.MX6, Armada, R-Car (Bjorn
      Helgaas)
    - mvebu: Return 'unsupported' for Interrupt Line and Interrupt Pin
      (Jason Gunthorpe)

  Miscellaneous
    - Avoid unnecessary CPU switch when calling .probe() (Alexander
      Duyck)
    - Revert "workqueue: allow work_on_cpu() to be called recursively"
      (Bjorn Helgaas)
    - Disable Bus Master only on kexec reboot (Khalid Aziz)
    - Omit PCI ID macro strings to shorten quirk names for LTO (Michal
      Marek)"

* tag 'pci-v3.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  MAINTAINERS: Add DesignWare, i.MX6, Armada, R-Car PCI host maintainers
  PCI: Disable Bus Master only on kexec reboot
  PCI: mvebu: Return 'unsupported' for Interrupt Line and Interrupt Pin
  PCI: Omit PCI ID macro strings to shorten quirk names
  PCI: Move device_del() from pci_stop_dev() to pci_destroy_dev()
  Revert "workqueue: allow work_on_cpu() to be called recursively"
  PCI: Avoid unnecessary CPU switch when calling driver .probe() method
parents b5745c59 f0b75693
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
@@ -6465,19 +6465,52 @@ F: drivers/pci/
F:	include/linux/pci*
F:	arch/x86/pci/

PCI DRIVER FOR IMX6
M:	Richard Zhu <r65037@freescale.com>
M:	Shawn Guo <shawn.guo@linaro.org>
L:	linux-pci@vger.kernel.org
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Maintained
F:	drivers/pci/host/*imx6*

PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support)
M:	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
M:	Jason Cooper <jason@lakedaemon.net>
L:	linux-pci@vger.kernel.org
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Maintained
F:	drivers/pci/host/*mvebu*

PCI DRIVER FOR NVIDIA TEGRA
M:	Thierry Reding <thierry.reding@gmail.com>
L:	linux-tegra@vger.kernel.org
L:	linux-pci@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
F:	drivers/pci/host/pci-tegra.c

PCI DRIVER FOR RENESAS R-CAR
M:	Simon Horman <horms@verge.net.au>
L:	linux-pci@vger.kernel.org
L:	linux-sh@vger.kernel.org
S:	Maintained
F:	drivers/pci/host/*rcar*

PCI DRIVER FOR SAMSUNG EXYNOS
M:	Jingoo Han <jg1.han@samsung.com>
L:	linux-pci@vger.kernel.org
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L:	linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
S:	Maintained
F:	drivers/pci/host/pci-exynos.c

PCI DRIVER FOR SYNOPSIS DESIGNWARE
M:	Mohit Kumar <mohit.kumar@st.com>
M:	Jingoo Han <jg1.han@samsung.com>
L:	linux-pci@vger.kernel.org
S:	Maintained
F:	drivers/pci/host/*designware*

PCMCIA SUBSYSTEM
P:	Linux PCMCIA Team
L:	linux-pcmcia@lists.infradead.org
+5 −0
Original line number Diff line number Diff line
@@ -447,6 +447,11 @@ static int mvebu_sw_pci_bridge_read(struct mvebu_pcie_port *port,
		*value = 0;
		break;

	case PCI_INTERRUPT_LINE:
		/* LINE PIN MIN_GNT MAX_LAT */
		*value = 0;
		break;

	default:
		*value = 0xffffffff;
		return PCIBIOS_BAD_REGISTER_NUMBER;
+30 −8
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <linux/cpu.h>
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
#include <linux/kexec.h>
#include "pci.h"

struct pci_dynid {
@@ -288,12 +289,27 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
	int error, node;
	struct drv_dev_and_id ddi = { drv, dev, id };

	/* Execute driver initialization on node where the device's
	   bus is attached to.  This way the driver likely allocates
	   its local memory on the right node without any need to
	   change it. */
	/*
	 * Execute driver initialization on node where the device is
	 * attached.  This way the driver likely allocates its local memory
	 * on the right node.
	 */
	node = dev_to_node(&dev->dev);
	if (node >= 0) {

	/*
	 * On NUMA systems, we are likely to call a PF probe function using
	 * work_on_cpu().  If that probe calls pci_enable_sriov() (which
	 * adds the VF devices via pci_bus_add_device()), we may re-enter
	 * this function to call the VF probe function.  Calling
	 * work_on_cpu() again will cause a lockdep warning.  Since VFs are
	 * always on the same node as the PF, we can work around this by
	 * avoiding work_on_cpu() when we're already on the correct node.
	 *
	 * Preemption is enabled, so it's theoretically unsafe to use
	 * numa_node_id(), but even if we run the probe function on the
	 * wrong node, it should be functionally correct.
	 */
	if (node >= 0 && node != numa_node_id()) {
		int cpu;

		get_online_cpus();
@@ -305,6 +321,7 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
		put_online_cpus();
	} else
		error = local_pci_probe(&ddi);

	return error;
}

@@ -399,12 +416,17 @@ static void pci_device_shutdown(struct device *dev)
	pci_msi_shutdown(pci_dev);
	pci_msix_shutdown(pci_dev);

#ifdef CONFIG_KEXEC
	/*
	 * Turn off Bus Master bit on the device to tell it to not
	 * continue to do DMA. Don't touch devices in D3cold or unknown states.
	 * If this is a kexec reboot, turn off Bus Master bit on the
	 * device to tell it to not continue to do DMA. Don't touch
	 * devices in D3cold or unknown states.
	 * If it is not a kexec reboot, firmware will hit the PCI
	 * devices with big hammer and stop their DMA any way.
	 */
	if (pci_dev->current_state <= PCI_D3hot)
	if (kexec_in_progress && (pci_dev->current_state <= PCI_D3hot))
		pci_clear_master(pci_dev);
#endif
}

#ifdef CONFIG_PM
+3 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ static void pci_stop_dev(struct pci_dev *dev)
	if (dev->is_added) {
		pci_proc_detach_device(dev);
		pci_remove_sysfs_dev_files(dev);
		device_del(&dev->dev);
		device_release_driver(&dev->dev);
		dev->is_added = 0;
	}

@@ -34,6 +34,8 @@ static void pci_stop_dev(struct pci_dev *dev)

static void pci_destroy_dev(struct pci_dev *dev)
{
	device_del(&dev->dev);

	down_write(&pci_bus_sem);
	list_del(&dev->bus_list);
	up_write(&pci_bus_sem);
+3 −0
Original line number Diff line number Diff line
@@ -198,6 +198,9 @@ extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4];
extern size_t vmcoreinfo_size;
extern size_t vmcoreinfo_max_size;

/* flag to track if kexec reboot is in progress */
extern bool kexec_in_progress;

int __init parse_crashkernel(char *cmdline, unsigned long long system_ram,
		unsigned long long *crash_size, unsigned long long *crash_base);
int parse_crashkernel_high(char *cmdline, unsigned long long system_ram,
Loading