diff options
Diffstat (limited to 'arch/sparc/include/asm')
| -rw-r--r-- | arch/sparc/include/asm/dma-mapping.h | 18 | ||||
| -rw-r--r-- | arch/sparc/include/asm/pgtable_64.h | 4 |
2 files changed, 14 insertions, 8 deletions
diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h index 8c0e4f7bb204..48a7c65731d2 100644 --- a/arch/sparc/include/asm/dma-mapping.h +++ b/arch/sparc/include/asm/dma-mapping.h | |||
| @@ -26,24 +26,30 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev) | |||
| 26 | 26 | ||
| 27 | #include <asm-generic/dma-mapping-common.h> | 27 | #include <asm-generic/dma-mapping-common.h> |
| 28 | 28 | ||
| 29 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 29 | #define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) |
| 30 | dma_addr_t *dma_handle, gfp_t flag) | 30 | |
| 31 | static inline void *dma_alloc_attrs(struct device *dev, size_t size, | ||
| 32 | dma_addr_t *dma_handle, gfp_t flag, | ||
| 33 | struct dma_attrs *attrs) | ||
| 31 | { | 34 | { |
| 32 | struct dma_map_ops *ops = get_dma_ops(dev); | 35 | struct dma_map_ops *ops = get_dma_ops(dev); |
| 33 | void *cpu_addr; | 36 | void *cpu_addr; |
| 34 | 37 | ||
| 35 | cpu_addr = ops->alloc_coherent(dev, size, dma_handle, flag); | 38 | cpu_addr = ops->alloc(dev, size, dma_handle, flag, attrs); |
| 36 | debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); | 39 | debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); |
| 37 | return cpu_addr; | 40 | return cpu_addr; |
| 38 | } | 41 | } |
| 39 | 42 | ||
| 40 | static inline void dma_free_coherent(struct device *dev, size_t size, | 43 | #define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) |
| 41 | void *cpu_addr, dma_addr_t dma_handle) | 44 | |
| 45 | static inline void dma_free_attrs(struct device *dev, size_t size, | ||
| 46 | void *cpu_addr, dma_addr_t dma_handle, | ||
| 47 | struct dma_attrs *attrs) | ||
| 42 | { | 48 | { |
| 43 | struct dma_map_ops *ops = get_dma_ops(dev); | 49 | struct dma_map_ops *ops = get_dma_ops(dev); |
| 44 | 50 | ||
| 45 | debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); | 51 | debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); |
| 46 | ops->free_coherent(dev, size, cpu_addr, dma_handle); | 52 | ops->free(dev, size, cpu_addr, dma_handle, attrs); |
| 47 | } | 53 | } |
| 48 | 54 | ||
| 49 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | 55 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 6fa2f7980e6b..76e4a52aa85e 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
| @@ -12,8 +12,6 @@ | |||
| 12 | * the SpitFire page tables. | 12 | * the SpitFire page tables. |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #include <asm-generic/pgtable-nopud.h> | ||
| 16 | |||
| 17 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
| 18 | #include <linux/const.h> | 16 | #include <linux/const.h> |
| 19 | #include <asm/types.h> | 17 | #include <asm/types.h> |
| @@ -22,6 +20,8 @@ | |||
| 22 | #include <asm/page.h> | 20 | #include <asm/page.h> |
| 23 | #include <asm/processor.h> | 21 | #include <asm/processor.h> |
| 24 | 22 | ||
| 23 | #include <asm-generic/pgtable-nopud.h> | ||
| 24 | |||
| 25 | /* The kernel image occupies 0x4000000 to 0x6000000 (4MB --> 96MB). | 25 | /* The kernel image occupies 0x4000000 to 0x6000000 (4MB --> 96MB). |
| 26 | * The page copy blockops can use 0x6000000 to 0x8000000. | 26 | * The page copy blockops can use 0x6000000 to 0x8000000. |
| 27 | * The TSB is mapped in the 0x8000000 to 0xa000000 range. | 27 | * The TSB is mapped in the 0x8000000 to 0xa000000 range. |
