|
8 | 8 | #include <linux/dma-direct.h> |
9 | 9 | #include <linux/dma-map-ops.h> |
10 | 10 | #include <linux/mm.h> |
11 | | -#include <linux/of.h> |
12 | | -#include <linux/of_device.h> |
13 | 11 | #include <asm/cacheflush.h> |
14 | 12 |
|
15 | | -unsigned int riscv_cbom_block_size; |
16 | | -EXPORT_SYMBOL_GPL(riscv_cbom_block_size); |
17 | | - |
18 | 13 | static bool noncoherent_supported; |
19 | 14 |
|
20 | 15 | void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, |
@@ -77,42 +72,6 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, |
77 | 72 | dev->dma_coherent = coherent; |
78 | 73 | } |
79 | 74 |
|
80 | | -#ifdef CONFIG_RISCV_ISA_ZICBOM |
81 | | -void riscv_init_cbom_blocksize(void) |
82 | | -{ |
83 | | - struct device_node *node; |
84 | | - unsigned long cbom_hartid; |
85 | | - u32 val, probed_block_size; |
86 | | - int ret; |
87 | | - |
88 | | - probed_block_size = 0; |
89 | | - for_each_of_cpu_node(node) { |
90 | | - unsigned long hartid; |
91 | | - |
92 | | - ret = riscv_of_processor_hartid(node, &hartid); |
93 | | - if (ret) |
94 | | - continue; |
95 | | - |
96 | | - /* set block-size for cbom extension if available */ |
97 | | - ret = of_property_read_u32(node, "riscv,cbom-block-size", &val); |
98 | | - if (ret) |
99 | | - continue; |
100 | | - |
101 | | - if (!probed_block_size) { |
102 | | - probed_block_size = val; |
103 | | - cbom_hartid = hartid; |
104 | | - } else { |
105 | | - if (probed_block_size != val) |
106 | | - pr_warn("cbom-block-size mismatched between harts %lu and %lu\n", |
107 | | - cbom_hartid, hartid); |
108 | | - } |
109 | | - } |
110 | | - |
111 | | - if (probed_block_size) |
112 | | - riscv_cbom_block_size = probed_block_size; |
113 | | -} |
114 | | -#endif |
115 | | - |
116 | 75 | void riscv_noncoherent_supported(void) |
117 | 76 | { |
118 | 77 | WARN(!riscv_cbom_block_size, |
|
0 commit comments