]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
PCI: probing debug message uniformization
authorVincent Legoll <vincent.legoll@gmail.com>
Sun, 12 Oct 2008 10:26:12 +0000 (12:26 +0200)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 20 Oct 2008 18:01:45 +0000 (11:01 -0700)
This patch uniformizes PCI probing debug boot messages with dev_printk()
intead of manual printk()

It changes adress range output from [%llx, %llx] to [%#llx-%#llx], like
in pci_request_region().

For example, it goes from the mixed-style:

PCI: 0000:00:1b.0 reg 10 64bit mmio: [f4280000f4283fff]
pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold

to uniform:

pci 0000:00:1b.0: reg 10 64bit mmio: [0xf4280000-0xf4283fff]
pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold

This patch has been runtime tested, boot log messages diffed, everything
looks OK.

Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pcie/aspm.c
drivers/pci/probe.c

index 851f5b83cdbc3f62f352627d0ee91848fc9923c0..8f63f4c6b85f64e3f4d91d76ca7da90ac142c51e 100644 (file)
@@ -528,9 +528,9 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
                pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP,
                        &reg32);
                if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) {
-                       printk("Pre-1.1 PCIe device detected, "
-                               "disable ASPM for %s. It can be enabled forcedly"
-                               " with 'pcie_aspm=force'\n", pci_name(pdev));
+                       dev_printk(KERN_INFO, &child_dev->dev, "disabling ASPM"
+                               " on pre-1.1 PCIe device.  You can enable it"
+                               " with 'pcie_aspm=force'\n");
                        return -EINVAL;
                }
        }
index 3141e8deeac427b1417d13091a7b65a8f140a7e8..afb9f1c0bc2867df2489be390156612f4cf430da 100644 (file)
@@ -302,8 +302,8 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
                } else {
                        res->start = l64;
                        res->end = l64 + sz64;
-                       printk(KERN_DEBUG "PCI: %s reg %x 64bit mmio: %pR\n",
-                               pci_name(dev), pos, res);
+                       dev_printk(KERN_DEBUG, &dev->dev,
+                               "reg %x 64bit mmio: %pR\n", pos, res);
                }
        } else {
                sz = pci_size(l, sz, mask);
@@ -313,10 +313,10 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
 
                res->start = l;
                res->end = l + sz;
-               printk(KERN_DEBUG "PCI: %s reg %x %s: %pR\n",
-                      pci_name(dev), pos,
-                      (res->flags & IORESOURCE_IO) ? "io port":"32bit mmio",
-                      res);
+
+               dev_printk(KERN_DEBUG, &dev->dev, "reg %x %s: %pR\n", pos,
+                       (res->flags & IORESOURCE_IO) ? "io port" : "32bit mmio",
+                       res);
        }
 
  out:
@@ -387,8 +387,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                        res->start = base;
                if (!res->end)
                        res->end = limit + 0xfff;
-               printk(KERN_DEBUG "PCI: bridge %s io port: %pR\n",
-                      pci_name(dev), res);
+               dev_printk(KERN_DEBUG, &dev->dev, "bridge io port: %pR\n", res);
        }
 
        res = child->resource[1];
@@ -400,8 +399,8 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
                res->start = base;
                res->end = limit + 0xfffff;
-               printk(KERN_DEBUG "PCI: bridge %s 32bit mmio: %pR\n",
-                      pci_name(dev), res);
+               dev_printk(KERN_DEBUG, &dev->dev, "bridge 32bit mmio: %pR\n",
+                       res);
        }
 
        res = child->resource[2];
@@ -437,9 +436,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
                res->start = base;
                res->end = limit + 0xfffff;
-               printk(KERN_DEBUG "PCI: bridge %s %sbit mmio pref: %pR\n",
-                      pci_name(dev),
-                      (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64":"32", res);
+               dev_printk(KERN_DEBUG, &dev->dev, "bridge %sbit mmio pref: %pR\n",
+                       (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32",
+                       res);
        }
 }