Commit d1ca0007 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc fixes from Ben Herrenschmidt:
 "This series fix a nasty issue with radeon adapters on powerpc servers,
  it's all CC'ed stable and has the relevant maintainers ack's/reviews.

  Basically, some (radeon) adapters have issues with MSI addresses above
  1T (only support 40-bits).  We had powerpc specific quirk but it only
  listed a specific revision of an adapter that we shipped with our
  machines and didn't properly handle the audio function which some
  distros enable nowadays.

  So we made the quirk generic and fixed both the graphic and audio
  drivers properly to use it.

  Without that, ppc64 server machines will crash at boot with a radeon
  adapter.

  Note: This has been brewing for a while, it just needed a last respin
  which got delayed due to us moving ozlabs to a new location in town
  and other such things taking priority"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/pci: Remove unused force_32bit_msi quirk
  powerpc/pseries: Honor the generic "no_64bit_msi" flag
  powerpc/powernv: Honor the generic "no_64bit_msi" flag
  sound/radeon: Move 64-bit MSI quirk from arch to driver
  gpu/radeon: Set flag to indicate broken 64-bit MSI
  PCI/MSI: Add device flag indicating that 64-bit MSIs don't work
  ALSA: hda - Limit 40bit DMA for AMD HDMI controllers
parents a6e4a05a 31345e1a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -159,8 +159,6 @@ struct pci_dn {

	int	pci_ext_config_space;	/* for pci devices */

	bool	force_32bit_msi;

	struct	pci_dev *pcidev;	/* back-pointer to the pci device */
#ifdef CONFIG_EEH
	struct eeh_dev *edev;		/* eeh device */
+0 −10
Original line number Diff line number Diff line
@@ -266,13 +266,3 @@ int pcibus_to_node(struct pci_bus *bus)
}
EXPORT_SYMBOL(pcibus_to_node);
#endif

static void quirk_radeon_32bit_msi(struct pci_dev *dev)
{
	struct pci_dn *pdn = pci_get_pdn(dev);

	if (pdn)
		pdn->force_32bit_msi = true;
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
+1 −2
Original line number Diff line number Diff line
@@ -1509,7 +1509,6 @@ static int pnv_pci_ioda_msi_setup(struct pnv_phb *phb, struct pci_dev *dev,
				  unsigned int is_64, struct msi_msg *msg)
{
	struct pnv_ioda_pe *pe = pnv_ioda_get_pe(dev);
	struct pci_dn *pdn = pci_get_pdn(dev);
	unsigned int xive_num = hwirq - phb->msi_base;
	__be32 data;
	int rc;
@@ -1523,7 +1522,7 @@ static int pnv_pci_ioda_msi_setup(struct pnv_phb *phb, struct pci_dev *dev,
		return -ENXIO;

	/* Force 32-bit MSI on some broken devices */
	if (pdn && pdn->force_32bit_msi)
	if (dev->no_64bit_msi)
		is_64 = 0;

	/* Assign XIVE to PE */
+1 −2
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
{
	struct pci_controller *hose = pci_bus_to_host(pdev->bus);
	struct pnv_phb *phb = hose->private_data;
	struct pci_dn *pdn = pci_get_pdn(pdev);
	struct msi_desc *entry;
	struct msi_msg msg;
	int hwirq;
@@ -60,7 +59,7 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
	if (WARN_ON(!phb) || !phb->msi_bmp.bitmap)
		return -ENODEV;

	if (pdn && pdn->force_32bit_msi && !phb->msi32_support)
	if (pdev->no_64bit_msi && !phb->msi32_support)
		return -ENODEV;

	list_for_each_entry(entry, &pdev->msi_list, list) {
+1 −1
Original line number Diff line number Diff line
@@ -420,7 +420,7 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec_in, int type)
	 */
again:
	if (type == PCI_CAP_ID_MSI) {
		if (pdn->force_32bit_msi) {
		if (pdev->no_64bit_msi) {
			rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, nvec);
			if (rc < 0) {
				/*
Loading