public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/13] IA64: unifying ways to handle multiple sets of dma mapping ops
@ 2009-01-05 14:36 FUJITA Tomonori
  2009-01-05 14:36 ` [PATCH 01/13] add map/unmap_single_attr and map/unmap_sg_attr to struct dma_mapping_ops FUJITA Tomonori
  2009-01-07 19:56 ` [PATCH 0/13] IA64: unifying ways to handle multiple sets of dma mapping ops Sam Ravnborg
  0 siblings, 2 replies; 16+ messages in thread
From: FUJITA Tomonori @ 2009-01-05 14:36 UTC (permalink / raw)
  To: tony.luck; +Cc: linux-ia64, linux-kernel, fujita.tomonori

This patchset is the first part of the unification of ways to handle
multiple sets of dma mapping API. The whole work consists of three
patchset. This is for IA64 and can be applied independently.

dma_mapping_ops (or dma_ops) struct is used to handle multiple sets of
dma mapping API by X86, SPARC, and POWER. IA64 also handle multiple
sets of dma mapping API but in a very different way (some define
magic).

X86 and IA64 share VT-d and SWIOTLB code. We need several workarounds
for it because of the deference of ways to handle multiple sets of dma
mapping API (e.g., X86 people can't freely change struct
dma_mapping_ops in x86's dma-mapping.h now because it could break
IA64).  Seems POWER will use SWIOTLB code soon. I think that it's time
to unify ways to handle multiple sets of dma mapping API. After
applying the whole work, we have struct dma_map_ops
include/linux/dma-mapping.h (I also dream of changing all the archs to
use SWIOTLB in order to remove the bounce code in the block and
network stacks...).

This patchset changes IA64 to handle multiple sets of dma mapping API
in the common way (as X86, SPARC, and POWER do):

- removing dma operation hooks in struct ia64_machine_vector.

- adding a global pointer to struct dma_mapping_ops, which point to an
appropriate set of dma mapping API (VT-d, SBA, SN2, SWIOTLB, or HWSW).


I can access to a HP IA64 box and tested this patch with CONFIG
IA64_GENERIC, IA64_HP_ZX1, and IA64_HP_ZX1_SWIOTLB.

 arch/ia64/dig/dig_vtd_iommu.c                 |   18 +++
 arch/ia64/hp/common/hwsw_iommu.c              |  165 ++----------------------
 arch/ia64/hp/common/sba_iommu.c               |   57 ++++++---
 arch/ia64/include/asm/dma-mapping.h           |  144 +++++++++++++++------
 arch/ia64/include/asm/machvec.h               |   99 ++-------------
 arch/ia64/include/asm/machvec_dig_vtd.h       |   20 ---
 arch/ia64/include/asm/machvec_hpzx1.h         |   23 +---
 arch/ia64/include/asm/machvec_hpzx1_swiotlb.h |   27 +----
 arch/ia64/include/asm/machvec_sn2.h           |   27 +----
 arch/ia64/kernel/Makefile                     |    4 +-
 arch/ia64/kernel/dma-mapping.c                |   10 ++
 arch/ia64/kernel/pci-dma.c                    |   11 +-
 arch/ia64/kernel/pci-swiotlb.c                |   15 ++-
 arch/ia64/sn/pci/pci_dma.c                    |   83 +++++++------
 14 files changed, 262 insertions(+), 441 deletions(-)



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-01-08  1:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-05 14:36 [PATCH 0/13] IA64: unifying ways to handle multiple sets of dma mapping ops FUJITA Tomonori
2009-01-05 14:36 ` [PATCH 01/13] add map/unmap_single_attr and map/unmap_sg_attr to struct dma_mapping_ops FUJITA Tomonori
2009-01-05 14:36   ` [PATCH 02/13] add dma_mapping_ops for SBA IOMMU FUJITA Tomonori
2009-01-05 14:36     ` [PATCH 03/13] add dma_mapping_ops for SWIOTLB and " FUJITA Tomonori
2009-01-05 14:36       ` [PATCH 04/13] add dma_mapping_ops for intel-iommu FUJITA Tomonori
2009-01-05 14:36         ` [PATCH 05/13] add dma_mapping_ops for SGI Altix FUJITA Tomonori
2009-01-05 14:36           ` [PATCH 06/13] add dma_mapping_ops for SWIOTLB FUJITA Tomonori
2009-01-05 14:36             ` [PATCH 07/13] set up dma_ops appropriately FUJITA Tomonori
2009-01-05 14:36               ` [PATCH 08/13] convert the DMA API to use dma_ops FUJITA Tomonori
2009-01-05 14:36                 ` [PATCH 09/13] remove dma operations in struct ia64_machine_vector FUJITA Tomonori
2009-01-05 14:36                   ` [PATCH 10/13] make sn DMA mapping functions static FUJITA Tomonori
2009-01-05 14:36                     ` [PATCH 11/13] add dma_get_ops to struct ia64_machine_vector FUJITA Tomonori
2009-01-05 14:36                       ` [PATCH 12/13] remove hwsw_dma_ops FUJITA Tomonori
2009-01-05 14:36                         ` [PATCH 13/13] make sba DMA mapping functions static FUJITA Tomonori
2009-01-07 19:56 ` [PATCH 0/13] IA64: unifying ways to handle multiple sets of dma mapping ops Sam Ravnborg
2009-01-08  1:55   ` [PATCH 0/13] IA64: unifying ways to handle multiple sets of FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox