|
14 | 14 | #include <rtos/spinlock.h> |
15 | 15 | #include <rtos/symbol.h> |
16 | 16 | #include <ipc/topology.h> |
| 17 | +#include <zephyr/kernel.h> |
17 | 18 |
|
18 | 19 | struct sof_fast_get_entry { |
19 | 20 | const void *dram_ptr; |
@@ -171,27 +172,26 @@ void z_impl_fast_put(struct k_heap *heap, const void *sram_ptr) |
171 | 172 | EXPORT_SYMBOL(z_impl_fast_put); |
172 | 173 |
|
173 | 174 | #ifdef CONFIG_USERSPACE |
| 175 | +#include <zephyr/internal/syscall_handler.h> |
174 | 176 | void z_vrfy_fast_put(struct k_heap *heap, const void *sram_ptr) |
175 | 177 | { |
176 | 178 | K_OOPS(K_SYSCALL_MEMORY_WRITE(heap, sizeof(*heap))); |
177 | | - K_OOPS(K_SYSCALL_MEMORY_WRITE(heap->heap.heap, sizeof(*heap->heap.heap))); |
178 | 179 | /* |
179 | 180 | * FIXME: we don't know how much SRAM has been allocated, so cannot |
180 | 181 | * check. Should fast_put() be changed to pass a size argument? |
181 | 182 | */ |
182 | 183 |
|
183 | 184 | z_impl_fast_put(heap, sram_ptr); |
184 | 185 | } |
185 | | -#include <zephyr/syscalls/mod_fast_put_mrsh.c> |
| 186 | +#include <zephyr/syscalls/fast_put_mrsh.c> |
186 | 187 |
|
187 | 188 | const void *z_vrfy_fast_get(struct k_heap *heap, const void *dram_ptr, size_t size) |
188 | 189 | { |
189 | 190 | K_OOPS(K_SYSCALL_MEMORY_WRITE(heap, sizeof(*heap))); |
190 | | - K_OOPS(K_SYSCALL_MEMORY_WRITE(heap->heap.heap, sizeof(*heap->heap.heap))); |
191 | 191 | /* We cannot (easily) verify the actual heapp memory */ |
192 | 192 | K_OOPS(K_SYSCALL_MEMORY_READ(dram_ptr, size)); |
193 | 193 |
|
194 | 194 | return z_impl_fast_get(heap, dram_ptr, size); |
195 | 195 | } |
196 | | -#include <zephyr/syscalls/mod_fast_get_mrsh.c> |
| 196 | +#include <zephyr/syscalls/fast_get_mrsh.c> |
197 | 197 | #endif |
0 commit comments