aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/quirks.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 64765474676f..f5d09f4066f3 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -26,6 +26,8 @@
26#include <linux/dmi.h> 26#include <linux/dmi.h>
27#include <linux/pci-aspm.h> 27#include <linux/pci-aspm.h>
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/sched.h>
30#include <linux/ktime.h>
29#include <asm/dma.h> /* isa_dma_bridge_buggy */ 31#include <asm/dma.h> /* isa_dma_bridge_buggy */
30#include "pci.h" 32#include "pci.h"
31 33
@@ -2906,6 +2908,22 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f8, quirk_intel_mc_errata);
2906DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); 2908DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
2907DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); 2909DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
2908 2910
2911
2912static void do_one_fixup_debug(void (*fn)(struct pci_dev *dev), struct pci_dev *dev)
2913{
2914 ktime_t calltime, delta, rettime;
2915 unsigned long long duration;
2916
2917 printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current));
2918 calltime = ktime_get();
2919 fn(dev);
2920 rettime = ktime_get();
2921 delta = ktime_sub(rettime, calltime);
2922 duration = (unsigned long long) ktime_to_ns(delta) >> 10;
2923 printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs\n", fn,
2924 duration);
2925}
2926
2909static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, 2927static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
2910 struct pci_fixup *end) 2928 struct pci_fixup *end)
2911{ 2929{
@@ -2913,7 +2931,10 @@ static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
2913 if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) && 2931 if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) &&
2914 (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { 2932 (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) {
2915 dev_dbg(&dev->dev, "calling %pF\n", f->hook); 2933 dev_dbg(&dev->dev, "calling %pF\n", f->hook);
2916 f->hook(dev); 2934 if (initcall_debug)
2935 do_one_fixup_debug(f->hook, dev);
2936 else
2937 f->hook(dev);
2917 } 2938 }
2918 f++; 2939 f++;
2919 } 2940 }