diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-02-16 00:40:32 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-02-24 17:38:55 -0500 |
commit | 3cf8b64380af6fd515740b010606ada4637818c5 (patch) | |
tree | 9023072ad9612a2fddd0e93c0bc069d5db6713ad /drivers/pci | |
parent | 2069ecfbe14ebd71a6f98e8a00724e9adf4fe4ee (diff) |
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: Yinghai Lu <yinghai@kernel.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/quirks.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index f8f81d4f29ff..7ef41832b833 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -2854,14 +2854,15 @@ static void do_one_fixup_debug(void (*fn)(struct pci_dev *dev), struct pci_dev * | |||
2854 | ktime_t calltime, delta, rettime; | 2854 | ktime_t calltime, delta, rettime; |
2855 | unsigned long long duration; | 2855 | unsigned long long duration; |
2856 | 2856 | ||
2857 | printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); | 2857 | printk(KERN_DEBUG "calling %pF @ %i for %s\n", |
2858 | fn, task_pid_nr(current), dev_name(&dev->dev)); | ||
2858 | calltime = ktime_get(); | 2859 | calltime = ktime_get(); |
2859 | fn(dev); | 2860 | fn(dev); |
2860 | rettime = ktime_get(); | 2861 | rettime = ktime_get(); |
2861 | delta = ktime_sub(rettime, calltime); | 2862 | delta = ktime_sub(rettime, calltime); |
2862 | duration = (unsigned long long) ktime_to_ns(delta) >> 10; | 2863 | duration = (unsigned long long) ktime_to_ns(delta) >> 10; |
2863 | printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs\n", fn, | 2864 | printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs for %s\n", |
2864 | duration); | 2865 | fn, duration, dev_name(&dev->dev)); |
2865 | } | 2866 | } |
2866 | 2867 | ||
2867 | /* | 2868 | /* |