Commit Graph
4 Commits
Author SHA1 Message Date
Joe Perches 82bf0baad9 pci-dma-compat: add pci_zalloc_consistent helper
Add this helper for consistency with pci_zalloc_coherent
and the ability to remove unnecessary memset(,0,) uses.

Signed-off-by: Joe Perches <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "John W. Linville" <[email protected]>
Cc: "Stephen M. Cameron" <[email protected]>
Cc: Adam Radford <[email protected]>
Cc: Chaoming Li <[email protected]>
Cc: Chas Williams <[email protected]>
Cc: Christian Benvenuti <[email protected]>
Cc: Christopher Harrer <[email protected]>
Cc: Dario Ballabio <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Don Fry <[email protected]>
Cc: Faisal Latif <[email protected]>
Cc: Forest Bond <[email protected]>
Cc: Govindarajulu Varadarajan <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Hal Rosenstock <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Jayamohan Kallickal <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: Jitendra Kalsaria <[email protected]>
Cc: Larry Finger <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Cc: Lior Dotan <[email protected]>
Cc: Manish Chopra <[email protected]>
Cc: Manohar Vanga <[email protected]>
Cc: Martyn Welch <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Michael Neuffer <[email protected]>
Cc: Mirko Lindner <[email protected]>
Cc: Neel Patel <[email protected]>
Cc: Neela Syam Kolli <[email protected]>
Cc: Rajesh Borundia <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: Ron Mercer <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Sean Hefty <[email protected]>
Cc: Shahed Shaikh <[email protected]>
Cc: Sony Chacko <[email protected]>
Cc: Stanislav Yakovlev <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Steve Wise <[email protected]>
Cc: Sujith Sankar <[email protected]>
Cc: Tom Tucker <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2014-08-08 15:57:28 -07:00
FUJITA Tomonori 5f3cd1e0bb dma-mapping: pci: move pci_set_dma_mask and pci_set_consistent_dma_mask to pci-dma-compat.h
We can use pci-dma-compat.h to implement pci_set_dma_mask and
pci_set_consistent_dma_mask as we do with the other PCI DMA API.

We can remove HAVE_ARCH_PCI_SET_DMA_MASK too.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Jesse Barnes <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Kay Sievers <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2010-03-12 15:52:42 -08:00
FUJITA Tomonori 8d8bb39b9e dma-mapping: add the device argument to dma_mapping_error()
Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
architecture does:

This enables us to cleanly fix the Calgary IOMMU issue that some devices
are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

I think that per-device dma_mapping_ops support would be also helpful for
KVM people to support PCI passthrough but Andi thinks that this makes it
difficult to support the PCI passthrough (see the above thread).  So I
CC'ed this to KVM camp.  Comments are appreciated.

A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
NULL, the system-wide dma_ops pointer is used as before.

If it's useful for KVM people, I plan to implement a mechanism to register
a hook called when a new pci (or dma capable) device is created (it works
with hot plugging).  It enables IOMMUs to set up an appropriate
dma_mapping_ops per device.

The major obstacle is that dma_mapping_error doesn't take a pointer to the
device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
device.  Note all the POWER IOMMUs use the same dma_mapping_error function
so this is not a problem for POWER but x86 IOMMUs use different
dma_mapping_error functions.

The first patch adds the device argument to dma_mapping_error.  The patch
is trivial but large since it touches lots of drivers and dma-mapping.h in
all the architecture.

This patch:

dma_mapping_error() doesn't take a pointer to the device unlike other DMA
operations.  So we can't have dma_mapping_ops per device.

Note that POWER already has dma_mapping_ops per device but all the POWER
IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
argument.

[[email protected]: fix sge]
[[email protected]: fix svc_rdma]
[[email protected]: build fix]
[[email protected]: fix bnx2x]
[[email protected]: fix s2io]
[[email protected]: fix pasemi_mac]
[[email protected]: fix sdhci]
[[email protected]: build fix]
[[email protected]: fix sparc]
[[email protected]: fix ibmvscsi]
Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Muli Ben-Yehuda <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Avi Kivity <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2008-07-26 12:00:03 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00