Skip to content

Commit 7e05c19

Browse files
author
Christoph Hellwig
committed
microblaze: rename dma_direct to dma_nommu
This frees the dma_direct_* namespace for a generic implementation. Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 2d9d6f6 commit 7e05c19

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

arch/microblaze/include/asm/dma-mapping.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
/*
1919
* Available generic sets of operations
2020
*/
21-
extern const struct dma_map_ops dma_direct_ops;
21+
extern const struct dma_map_ops dma_nommu_ops;
2222

2323
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
2424
{
25-
return &dma_direct_ops;
25+
return &dma_nommu_ops;
2626
}
2727

2828
#endif /* _ASM_MICROBLAZE_DMA_MAPPING_H */

arch/microblaze/kernel/dma.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#define NOT_COHERENT_CACHE
1919

20-
static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
20+
static void *dma_nommu_alloc_coherent(struct device *dev, size_t size,
2121
dma_addr_t *dma_handle, gfp_t flag,
2222
unsigned long attrs)
2323
{
@@ -42,7 +42,7 @@ static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
4242
#endif
4343
}
4444

45-
static void dma_direct_free_coherent(struct device *dev, size_t size,
45+
static void dma_nommu_free_coherent(struct device *dev, size_t size,
4646
void *vaddr, dma_addr_t dma_handle,
4747
unsigned long attrs)
4848
{
@@ -69,7 +69,7 @@ static inline void __dma_sync(unsigned long paddr,
6969
}
7070
}
7171

72-
static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
72+
static int dma_nommu_map_sg(struct device *dev, struct scatterlist *sgl,
7373
int nents, enum dma_data_direction direction,
7474
unsigned long attrs)
7575
{
@@ -89,12 +89,12 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
8989
return nents;
9090
}
9191

92-
static int dma_direct_dma_supported(struct device *dev, u64 mask)
92+
static int dma_nommu_dma_supported(struct device *dev, u64 mask)
9393
{
9494
return 1;
9595
}
9696

97-
static inline dma_addr_t dma_direct_map_page(struct device *dev,
97+
static inline dma_addr_t dma_nommu_map_page(struct device *dev,
9898
struct page *page,
9999
unsigned long offset,
100100
size_t size,
@@ -106,7 +106,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev,
106106
return page_to_phys(page) + offset;
107107
}
108108

109-
static inline void dma_direct_unmap_page(struct device *dev,
109+
static inline void dma_nommu_unmap_page(struct device *dev,
110110
dma_addr_t dma_address,
111111
size_t size,
112112
enum dma_data_direction direction,
@@ -122,7 +122,7 @@ static inline void dma_direct_unmap_page(struct device *dev,
122122
}
123123

124124
static inline void
125-
dma_direct_sync_single_for_cpu(struct device *dev,
125+
dma_nommu_sync_single_for_cpu(struct device *dev,
126126
dma_addr_t dma_handle, size_t size,
127127
enum dma_data_direction direction)
128128
{
@@ -136,7 +136,7 @@ dma_direct_sync_single_for_cpu(struct device *dev,
136136
}
137137

138138
static inline void
139-
dma_direct_sync_single_for_device(struct device *dev,
139+
dma_nommu_sync_single_for_device(struct device *dev,
140140
dma_addr_t dma_handle, size_t size,
141141
enum dma_data_direction direction)
142142
{
@@ -150,7 +150,7 @@ dma_direct_sync_single_for_device(struct device *dev,
150150
}
151151

152152
static inline void
153-
dma_direct_sync_sg_for_cpu(struct device *dev,
153+
dma_nommu_sync_sg_for_cpu(struct device *dev,
154154
struct scatterlist *sgl, int nents,
155155
enum dma_data_direction direction)
156156
{
@@ -164,7 +164,7 @@ dma_direct_sync_sg_for_cpu(struct device *dev,
164164
}
165165

166166
static inline void
167-
dma_direct_sync_sg_for_device(struct device *dev,
167+
dma_nommu_sync_sg_for_device(struct device *dev,
168168
struct scatterlist *sgl, int nents,
169169
enum dma_data_direction direction)
170170
{
@@ -178,7 +178,7 @@ dma_direct_sync_sg_for_device(struct device *dev,
178178
}
179179

180180
static
181-
int dma_direct_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
181+
int dma_nommu_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
182182
void *cpu_addr, dma_addr_t handle, size_t size,
183183
unsigned long attrs)
184184
{
@@ -204,20 +204,20 @@ int dma_direct_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
204204
#endif
205205
}
206206

207-
const struct dma_map_ops dma_direct_ops = {
208-
.alloc = dma_direct_alloc_coherent,
209-
.free = dma_direct_free_coherent,
210-
.mmap = dma_direct_mmap_coherent,
211-
.map_sg = dma_direct_map_sg,
212-
.dma_supported = dma_direct_dma_supported,
213-
.map_page = dma_direct_map_page,
214-
.unmap_page = dma_direct_unmap_page,
215-
.sync_single_for_cpu = dma_direct_sync_single_for_cpu,
216-
.sync_single_for_device = dma_direct_sync_single_for_device,
217-
.sync_sg_for_cpu = dma_direct_sync_sg_for_cpu,
218-
.sync_sg_for_device = dma_direct_sync_sg_for_device,
207+
const struct dma_map_ops dma_nommu_ops = {
208+
.alloc = dma_nommu_alloc_coherent,
209+
.free = dma_nommu_free_coherent,
210+
.mmap = dma_nommu_mmap_coherent,
211+
.map_sg = dma_nommu_map_sg,
212+
.dma_supported = dma_nommu_dma_supported,
213+
.map_page = dma_nommu_map_page,
214+
.unmap_page = dma_nommu_unmap_page,
215+
.sync_single_for_cpu = dma_nommu_sync_single_for_cpu,
216+
.sync_single_for_device = dma_nommu_sync_single_for_device,
217+
.sync_sg_for_cpu = dma_nommu_sync_sg_for_cpu,
218+
.sync_sg_for_device = dma_nommu_sync_sg_for_device,
219219
};
220-
EXPORT_SYMBOL(dma_direct_ops);
220+
EXPORT_SYMBOL(dma_nommu_ops);
221221

222222
/* Number of entries preallocated for DMA-API debugging */
223223
#define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16)

0 commit comments

Comments
 (0)