Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294719
b: refs/heads/master
c: 3209874
h: refs/heads/master
i:
  294717: 4096a8c
  294715: 2d4ce49
  294711: b2e0a52
  294703: dbd097e
  294687: ba17b23
  294655: ea89e9e
v: v3
  • Loading branch information
Arjan van de Ven authored and Jesse Barnes committed Feb 14, 2012
1 parent 80ec64e commit 9a29af6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 309c665110ee6a8d9a28f802c41eaab50ceebbf7
refs/heads/master: 3209874a1da2c51c7325e601d9634189ee178ad6
23 changes: 22 additions & 1 deletion trunk/drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <linux/dmi.h>
#include <linux/pci-aspm.h>
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/ktime.h>
#include <asm/dma.h> /* isa_dma_bridge_buggy */
#include "pci.h"

Expand Down Expand Up @@ -2906,14 +2908,33 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f8, quirk_intel_mc_errata);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);


static void do_one_fixup_debug(void (*fn)(struct pci_dev *dev), struct pci_dev *dev)
{
ktime_t calltime, delta, rettime;
unsigned long long duration;

printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current));
calltime = ktime_get();
fn(dev);
rettime = ktime_get();
delta = ktime_sub(rettime, calltime);
duration = (unsigned long long) ktime_to_ns(delta) >> 10;
printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs\n", fn,
duration);
}

static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
struct pci_fixup *end)
{
while (f < end) {
if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) &&
(f->device == dev->device || f->device == (u16) PCI_ANY_ID)) {
dev_dbg(&dev->dev, "calling %pF\n", f->hook);
f->hook(dev);
if (initcall_debug)
do_one_fixup_debug(f->hook, dev);
else
f->hook(dev);
}
f++;
}
Expand Down

0 comments on commit 9a29af6

Please sign in to comment.