File tree Expand file tree Collapse file tree 3 files changed +18
-15
lines changed Expand file tree Collapse file tree 3 files changed +18
-15
lines changed Original file line number Diff line number Diff line change 36
36
37
37
obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
38
38
obj-$(CONFIG_RISCV_DMA_NONCOHERENT) += dma-noncoherent.o
39
+ obj-$(CONFIG_RISCV_NONSTANDARD_CACHE_OPS) += cache-ops.o
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-2.0-only
2
+ /*
3
+ * Copyright (c) 2021 Western Digital Corporation or its affiliates.
4
+ */
5
+
6
+ #include <asm/dma-noncoherent.h>
7
+
8
+ struct riscv_nonstd_cache_ops noncoherent_cache_ops __ro_after_init ;
9
+
10
+ void
11
+ riscv_noncoherent_register_cache_ops (const struct riscv_nonstd_cache_ops * ops )
12
+ {
13
+ if (!ops )
14
+ return ;
15
+ noncoherent_cache_ops = * ops ;
16
+ }
17
+ EXPORT_SYMBOL_GPL (riscv_noncoherent_register_cache_ops );
Original file line number Diff line number Diff line change @@ -15,12 +15,6 @@ static bool noncoherent_supported __ro_after_init;
15
15
int dma_cache_alignment __ro_after_init = ARCH_DMA_MINALIGN ;
16
16
EXPORT_SYMBOL_GPL (dma_cache_alignment );
17
17
18
- struct riscv_nonstd_cache_ops noncoherent_cache_ops __ro_after_init = {
19
- .wback = NULL ,
20
- .inv = NULL ,
21
- .wback_inv = NULL ,
22
- };
23
-
24
18
static inline void arch_dma_cache_wback (phys_addr_t paddr , size_t size )
25
19
{
26
20
void * vaddr = phys_to_virt (paddr );
@@ -162,12 +156,3 @@ void __init riscv_set_dma_cache_alignment(void)
162
156
if (!noncoherent_supported )
163
157
dma_cache_alignment = 1 ;
164
158
}
165
-
166
- void riscv_noncoherent_register_cache_ops (const struct riscv_nonstd_cache_ops * ops )
167
- {
168
- if (!ops )
169
- return ;
170
-
171
- noncoherent_cache_ops = * ops ;
172
- }
173
- EXPORT_SYMBOL_GPL (riscv_noncoherent_register_cache_ops );
You can’t perform that action at this time.
0 commit comments