set up dma_ops appropriately
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Mon, 5 Jan 2009 14:36:12 +0000 (23:36 +0900)
committerIngo Molnar <mingo@elte.hu>
Tue, 6 Jan 2009 13:06:50 +0000 (14:06 +0100)
commit4d9b977ca674dd40cfc1409a75cb73fca2cee423
tree417f80889ab49c61c2258b157cfe993bdf8d8357
parentc82e4417ace9a3a4dddf3332379c771c41040040
set up dma_ops appropriately

This patch introduces a global pointer, dma_ops, which points to an
appropriate dma_mapping_ops that the kernel should use. This is a
common way to handle multiple dma_mapping_ops (X86, POWER, and SPARC).

dma_ops is set in platform_dma_init. We also set it by hand where
machvec_init is callev via subsys_initcall.

- IA64_DIG_VTD uses vtd_dma_ops.
- IA64_HP_ZX1 uses sba_dma_ops.
- IA64_HP_ZX1_SWIOTLB uses hwsw_dma_ops.
- IA64_SGI_SN2 uses sn_dma_ops.
- The rest use swiotlb_dma_ops.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/ia64/hp/common/hwsw_iommu.c
arch/ia64/hp/common/sba_iommu.c
arch/ia64/include/asm/machvec.h
arch/ia64/include/asm/machvec_hpzx1.h
arch/ia64/include/asm/machvec_sn2.h
arch/ia64/kernel/Makefile
arch/ia64/kernel/dma-mapping.c [new file with mode: 0644]
arch/ia64/kernel/pci-dma.c
arch/ia64/kernel/pci-swiotlb.c
arch/ia64/sn/pci/pci_dma.c