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

Commit 18e88bec authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branches 'pci/enumeration', 'pci/hotplug', 'pci/misc', 'pci/numa' and...

Merge branches 'pci/enumeration', 'pci/hotplug', 'pci/misc', 'pci/numa' and 'pci/virtualization' into next

* pci/enumeration:
  PCI: Remove fixed parameter in pci_iov_resource_bar()
  PCI: Add informational printk for invalid BARs
  PCI: Shrink decoding-disabled window while sizing BARs
  PCI: Restore detection of read-only BARs

* pci/hotplug:
  PCI: Remove unused and broken to_hotplug_slot()

* pci/misc:
  PCI: Make FLR and AF FLR reset warning messages different
  PCI: Simplify if-return sequences
  PCI: Delete unnecessary NULL pointer checks

* pci/numa:
  PCI: Allow numa_node override via sysfs

* pci/virtualization:
  xen/pcifront: Process failure for pcifront_(re)scan_root()
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -281,3 +281,16 @@ Description:
		opt-out of driver binding using a driver_override name such as
		"none".  Only a single driver may be specified in the override,
		there is no support for parsing delimiters.

What:		/sys/bus/pci/devices/.../numa_node
Date:		Oct 2014
Contact:	Prarit Bhargava <prarit@redhat.com>
Description:
		This file contains the NUMA node to which the PCI device is
		attached, or -1 if the node is unknown.  The initial value
		comes from an ACPI _PXM method or a similar firmware
		source.  If that is missing or incorrect, this file can be
		written to override the node.  In that case, please report
		a firmware bug to the system vendor.  Writing to this file
		taints the kernel with TAINT_FIRMWARE_WORKAROUND, which
		reduces the supportability of your system.
+1 −4
Original line number Diff line number Diff line
@@ -376,10 +376,7 @@ int __init ibmphp_rsrc_init (void)
		if (rc)
			return rc;
	}
	rc = once_over ();  /* This is to align ranges (so no -1) */
	if (rc)
		return rc;
	return 0;
	return once_over ();	/* This is to align ranges (so no -1) */
}

/********************************************************************************
+3 −8
Original line number Diff line number Diff line
@@ -479,20 +479,16 @@ void pci_iov_release(struct pci_dev *dev)
 * pci_iov_resource_bar - get position of the SR-IOV BAR
 * @dev: the PCI device
 * @resno: the resource number
 * @type: the BAR type to be filled in
 *
 * Returns position of the BAR encapsulated in the SR-IOV capability.
 */
int pci_iov_resource_bar(struct pci_dev *dev, int resno,
			 enum pci_bar_type *type)
int pci_iov_resource_bar(struct pci_dev *dev, int resno)
{
	if (resno < PCI_IOV_RESOURCES || resno > PCI_IOV_RESOURCE_END)
		return 0;

	BUG_ON(!dev->is_physfn);

	*type = pci_bar_unknown;

	return dev->sriov->pos + PCI_SRIOV_BAR +
		4 * (resno - PCI_IOV_RESOURCES);
}
@@ -510,13 +506,12 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno,
resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
{
	struct resource tmp;
	enum pci_bar_type type;
	int reg = pci_iov_resource_bar(dev, resno, &type);
	int reg = pci_iov_resource_bar(dev, resno);

	if (!reg)
		return 0;

	 __pci_read_base(dev, type, &tmp, reg);
	 __pci_read_base(dev, pci_bar_unknown, &tmp, reg);
	return resource_alignment(&tmp);
}

+1 −2
Original line number Diff line number Diff line
@@ -322,7 +322,6 @@ static void pci_acpi_wake_dev(struct work_struct *work)
	pci_wakeup_event(pci_dev);
	pm_runtime_resume(&pci_dev->dev);

	if (pci_dev->subordinate)
	pci_pme_wakeup_bus(pci_dev->subordinate);
}

+26 −1
Original line number Diff line number Diff line
@@ -221,12 +221,37 @@ static ssize_t enabled_show(struct device *dev, struct device_attribute *attr,
static DEVICE_ATTR_RW(enabled);

#ifdef CONFIG_NUMA
static ssize_t numa_node_store(struct device *dev,
			       struct device_attribute *attr, const char *buf,
			       size_t count)
{
	struct pci_dev *pdev = to_pci_dev(dev);
	int node, ret;

	if (!capable(CAP_SYS_ADMIN))
		return -EPERM;

	ret = kstrtoint(buf, 0, &node);
	if (ret)
		return ret;

	if (!node_online(node))
		return -EINVAL;

	add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
	dev_alert(&pdev->dev, FW_BUG "Overriding NUMA node to %d.  Contact your vendor for updates.",
		  node);

	dev->numa_node = node;
	return count;
}

static ssize_t numa_node_show(struct device *dev, struct device_attribute *attr,
			      char *buf)
{
	return sprintf(buf, "%d\n", dev->numa_node);
}
static DEVICE_ATTR_RO(numa_node);
static DEVICE_ATTR_RW(numa_node);
#endif

static ssize_t dma_mask_bits_show(struct device *dev,
Loading