diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2008-12-16 12:17:30 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-17 18:58:09 +0100 |
commit | e08e1f7adba522378e8d2ae941bf25443866136d (patch) | |
tree | 4410e414d856dc03d77a0c654d6b9672f6e69f36 /include/linux/swiotlb.h | |
parent | a5ddde4a558b3bd1e3dc50e274a0db2ea7a8fd06 (diff) | |
download | linux-stable-e08e1f7adba522378e8d2ae941bf25443866136d.tar.gz linux-stable-e08e1f7adba522378e8d2ae941bf25443866136d.tar.bz2 linux-stable-e08e1f7adba522378e8d2ae941bf25443866136d.zip |
swiotlb: allow architectures to override phys<->bus<->phys conversions
Impact: generalize phys<->bus<->phys conversions in the swiotlb code
Architectures may need to override these conversions. Implement a
__weak hook point containing the default implementation.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/swiotlb.h')
-rw-r--r-- | include/linux/swiotlb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 58b996a642f9..694f1839cbc0 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -27,6 +27,9 @@ swiotlb_init(void); extern void *swiotlb_alloc_boot(size_t bytes, unsigned long nslabs); extern void *swiotlb_alloc(unsigned order, unsigned long nslabs); +extern dma_addr_t swiotlb_phys_to_bus(phys_addr_t address); +extern phys_addr_t swiotlb_bus_to_phys(dma_addr_t address); + extern void *swiotlb_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flags); |