]> git.baikalelectronics.ru Git - kernel.git/commit
x86 calgary: fix handling of devices that aren't behind the Calgary
authorAlexis Bruemmer <alexisb@us.ibm.com>
Sat, 26 Jul 2008 02:44:51 +0000 (19:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 26 Jul 2008 19:00:03 +0000 (12:00 -0700)
commit8f823f5c4e70bdb36a01edaf88f49a947eaa64ab
treefd361f464386607e3d753e062ae7956e94c022e3
parente67923562bb913b1b919204a498b8eeaebcf704b
x86 calgary: fix handling of devices that aren't behind the Calgary

The calgary code can give drivers addresses above 4GB which is very bad
for hardware that is only 32bit DMA addressable.

With this patch, the calgary code sets the global dma_ops to swiotlb or
nommu properly, and the dma_ops of devices behind the Calgary/CalIOC2
to calgary_dma_ops.  So the calgary code can handle devices safely that
aren't behind the Calgary/CalIOC2.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Alexis Bruemmer <alexisb@us.ibm.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/pci-calgary_64.c
include/asm-x86/iommu.h