// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2004 Hewlett-Packard Development Company, L.P. * Contributed by David Mosberger-Tang <davidm@hpl.hp.com> * * This is a pseudo I/O MMU which dispatches to the hardware I/O MMU * whenever possible. We assume that the hardware I/O MMU requires * full 32-bit addressability, as is the case, e.g., for HP zx1-based * systems (there, the I/O MMU window is mapped at 3-4GB). If a * device doesn't provide full 32-bit addressability, we fall back on * the sw I/O TLB. This is good enough to let us support broken * hardware such as soundcards which have a DMA engine that can * address only 28 bits. */ #include <linux/device.h> #include <linux/dma-mapping.h> #include <linux/swiotlb.h> #include <linux/export.h> #include <asm/machvec.h> extern const struct dma_map_ops sba_dma_ops; /* swiotlb declarations & definitions: */ extern int swiotlb_late_init_with_default_size (size_t size); /* * Note: we need to make the determination of whether or not to use * the sw I/O TLB based purely on the device structure. Anything else * would be unreliable or would be too intrusive. */
static inline int use_swiotlb(struct device *dev) { return dev && dev->dma_mask && !sba_dma_ops.dma_supported(dev, *dev->dma_mask); }Contributors
Person | Tokens | Prop | Commits | CommitProp |
David Mosberger-Tang | 29 | 90.62% | 1 | 33.33% |
FUJITA Tomonori | 3 | 9.38% | 2 | 66.67% |
Total | 32 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
FUJITA Tomonori | 26 | 92.86% | 3 | 60.00% |
Bart Van Assche | 1 | 3.57% | 1 | 20.00% |
Christoph Hellwig | 1 | 3.57% | 1 | 20.00% |
Total | 28 | 100.00% | 5 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Alex Williamson | 33 | 62.26% | 1 | 25.00% |
David Mosberger-Tang | 18 | 33.96% | 1 | 25.00% |
Tony Luck | 1 | 1.89% | 1 | 25.00% |
Harvey Harrison | 1 | 1.89% | 1 | 25.00% |
Total | 53 | 100.00% | 4 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
David Mosberger-Tang | 62 | 41.06% | 1 | 7.69% |
FUJITA Tomonori | 42 | 27.81% | 4 | 30.77% |
Alex Williamson | 35 | 23.18% | 1 | 7.69% |
Paul Gortmaker | 3 | 1.99% | 1 | 7.69% |
Joerg Roedel | 3 | 1.99% | 1 | 7.69% |
Bart Van Assche | 2 | 1.32% | 1 | 7.69% |
Christoph Hellwig | 1 | 0.66% | 1 | 7.69% |
Tony Luck | 1 | 0.66% | 1 | 7.69% |
Greg Kroah-Hartman | 1 | 0.66% | 1 | 7.69% |
Harvey Harrison | 1 | 0.66% | 1 | 7.69% |
Total | 151 | 100.00% | 13 | 100.00% |