Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iommu/vt-d: Use lo_hi_readq() / lo_hi_writeq()

There is already helper functions to do 64-bit I/O on 32-bit machines or
buses, thus we don't need to reinvent the wheel.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>

authored by

Andy Shevchenko and committed by
Joerg Roedel
61012985 f9808079

+2 -16
+2 -16
include/linux/intel-iommu.h
··· 30 30 #include <linux/mmu_notifier.h> 31 31 #include <linux/list.h> 32 32 #include <linux/iommu.h> 33 + #include <linux/io-64-nonatomic-lo-hi.h> 34 + 33 35 #include <asm/cacheflush.h> 34 36 #include <asm/iommu.h> 35 37 ··· 74 72 75 73 #define OFFSET_STRIDE (9) 76 74 77 - #ifdef CONFIG_64BIT 78 75 #define dmar_readq(a) readq(a) 79 76 #define dmar_writeq(a,v) writeq(v,a) 80 - #else 81 - static inline u64 dmar_readq(void __iomem *addr) 82 - { 83 - u32 lo, hi; 84 - lo = readl(addr); 85 - hi = readl(addr + 4); 86 - return (((u64) hi) << 32) + lo; 87 - } 88 - 89 - static inline void dmar_writeq(void __iomem *addr, u64 val) 90 - { 91 - writel((u32)val, addr); 92 - writel((u32)(val >> 32), addr + 4); 93 - } 94 - #endif 95 77 96 78 #define DMAR_VER_MAJOR(v) (((v) & 0xf0) >> 4) 97 79 #define DMAR_VER_MINOR(v) ((v) & 0x0f)