diff options
Diffstat (limited to 'drivers/dma/ioat/dca.c')
| -rw-r--r-- | drivers/dma/ioat/dca.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c index 289c59ed74b9..5d3c0ae6b342 100644 --- a/drivers/dma/ioat/dca.c +++ b/drivers/dma/ioat/dca.c @@ -10,6 +10,8 @@ #include <linux/interrupt.h> #include <linux/dca.h> +#include <asm/cpuid/api.h> + /* either a kernel change is needed, or we need something like this in kernel */ #ifndef CONFIG_SMP #include <asm/smp.h> @@ -51,18 +53,18 @@ /* pack PCI B/D/F into a u16 */ static inline u16 dcaid_from_pcidev(struct pci_dev *pci) { - return (pci->bus->number << 8) | pci->devfn; + return pci_dev_id(pci); } static int dca_enabled_in_bios(struct pci_dev *pdev) { /* CPUID level 9 returns DCA configuration */ /* Bit 0 indicates DCA enabled by the BIOS */ - unsigned long cpuid_level_9; + u32 eax; int res; - cpuid_level_9 = cpuid_eax(9); - res = test_bit(0, &cpuid_level_9); + eax = cpuid_eax(CPUID_LEAF_DCA); + res = eax & BIT(0); if (!res) dev_dbg(&pdev->dev, "DCA is disabled in BIOS\n"); |
