Commit 3cf8b643 authored by Yinghai Lu's avatar Yinghai Lu Committed by Jesse Barnes

PCI: print out PCI device info along with duration

Makes it a little easier to figure out which device may have caused a
slow quirk.
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 2069ecfb
...@@ -2854,14 +2854,15 @@ static void do_one_fixup_debug(void (*fn)(struct pci_dev *dev), struct pci_dev * ...@@ -2854,14 +2854,15 @@ static void do_one_fixup_debug(void (*fn)(struct pci_dev *dev), struct pci_dev *
ktime_t calltime, delta, rettime; ktime_t calltime, delta, rettime;
unsigned long long duration; unsigned long long duration;
printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); printk(KERN_DEBUG "calling %pF @ %i for %s\n",
fn, task_pid_nr(current), dev_name(&dev->dev));
calltime = ktime_get(); calltime = ktime_get();
fn(dev); fn(dev);
rettime = ktime_get(); rettime = ktime_get();
delta = ktime_sub(rettime, calltime); delta = ktime_sub(rettime, calltime);
duration = (unsigned long long) ktime_to_ns(delta) >> 10; duration = (unsigned long long) ktime_to_ns(delta) >> 10;
printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs\n", fn, printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs for %s\n",
duration); fn, duration, dev_name(&dev->dev));
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment