blob: 13c4c1af3e436e72ca0c37f064b2588429919c82 [file] [log] [blame]
Naveen Ramaraj89738952013-02-13 15:24:57 -08001/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <linux/slab.h>
14#include <mach/ocmem_priv.h>
15
Naveen Ramarajcc4ec152012-05-14 09:55:29 -070016static DEFINE_MUTEX(ocmem_eviction_lock);
17static DECLARE_BITMAP(evicted, OCMEM_CLIENT_MAX);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -070018
19static struct ocmem_handle *generate_handle(void)
20{
21 struct ocmem_handle *handle = NULL;
22
23 handle = kzalloc(sizeof(struct ocmem_handle), GFP_KERNEL);
24 if (!handle) {
25 pr_err("ocmem: Unable to generate buffer handle\n");
26 return NULL;
27 }
28 mutex_init(&handle->handle_mutex);
29 return handle;
30}
31
32static int free_handle(struct ocmem_handle *handle)
33{
34 if (!handle)
35 return -EINVAL;
36
37 mutex_destroy(&handle->handle_mutex);
38 kfree(handle);
39 handle = NULL;
40 return 0;
41}
42
43static int __ocmem_free(int id, struct ocmem_buf *buf)
44{
45 int ret = 0;
46 struct ocmem_handle *handle = buffer_to_handle(buf);
47
48 if (!handle)
49 return -EINVAL;
50
51 mutex_lock(&handle->handle_mutex);
52 ret = process_free(id, handle);
53 mutex_unlock(&handle->handle_mutex);
54
Naveen Ramaraj89738952013-02-13 15:24:57 -080055 if (ret) {
56 pr_err("ocmem: Free failed for client %s\n", get_name(id));
57 return ret;
58 }
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -070059 free_handle(handle);
60 return 0;
61}
62
Naveen Ramarajcc4ec152012-05-14 09:55:29 -070063static int __ocmem_shrink(int id, struct ocmem_buf *buf, unsigned long len)
64{
65 int ret = 0;
66 struct ocmem_handle *handle = buffer_to_handle(buf);
67
68 if (!handle)
69 return -EINVAL;
70
71 mutex_lock(&handle->handle_mutex);
72 ret = process_shrink(id, handle, len);
73 mutex_unlock(&handle->handle_mutex);
74
75 if (ret)
76 return -EINVAL;
77
78 return 0;
79}
80
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -070081static struct ocmem_buf *__ocmem_allocate_range(int id, unsigned long min,
82 unsigned long max, unsigned long step, bool block, bool wait)
83{
84 struct ocmem_handle *handle = NULL;
85 int ret = 0;
86
87 handle = generate_handle();
88 if (!handle) {
89 pr_err("ocmem: Unable to generate handle\n");
90 return NULL;
91 }
92
93 mutex_lock(&handle->handle_mutex);
94 ret = process_allocate(id, handle, min, max, step, block, wait);
95 mutex_unlock(&handle->handle_mutex);
96 if (ret) {
97 pr_err("ocmem allocation failed\n");
98 free_handle(handle);
99 return NULL;
100 } else
101 return handle_to_buffer(handle);
102}
103
104struct ocmem_buf *ocmem_allocate(int client_id, unsigned long size)
105{
106 bool can_block = false;
107 bool can_wait = true;
Neeti Desaif69aa132013-02-28 17:25:01 -0800108 struct ocmem_buf *buffer;
109 struct timeval start_time;
110 struct timeval end_time;
111 unsigned int delay;
112 struct ocmem_zone *zone;
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700113
114 if (!check_id(client_id)) {
115 pr_err("ocmem: Invalid client id: %d\n", client_id);
116 return NULL;
117 }
118
Naveen Ramaraj4d5e3542012-08-12 21:55:49 -0700119 if (!zone_active(client_id)) {
120 pr_err("ocmem: Client %s (id: %d) not allowed to use OCMEM\n",
121 get_name(client_id), client_id);
122 return NULL;
123 }
124
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700125 if (size < OCMEM_MIN_ALLOC) {
126 pr_err("ocmem: requested size %lx must be at least %x\n",
127 size, OCMEM_MIN_ALLOC);
128 return NULL;
129 }
130
131 if (!IS_ALIGNED(size, OCMEM_MIN_ALIGN)) {
132 pr_err("ocmem: Invalid alignment, size must be %x aligned\n",
133 OCMEM_MIN_ALIGN);
134 return NULL;
135 }
136
Neeti Desaif69aa132013-02-28 17:25:01 -0800137 zone = get_zone(client_id);
138 if (!zone) {
139 pr_err("ocmem: Zone not found for client %d\n", client_id);
140 return NULL;
141 }
142
143 do_gettimeofday(&start_time);
144
145 buffer = __ocmem_allocate_range(client_id, size, size,
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700146 size, can_block, can_wait);
Neeti Desaif69aa132013-02-28 17:25:01 -0800147
148 do_gettimeofday(&end_time);
149
150 if (!buffer)
151 return NULL;
152
153 delay = (end_time.tv_sec * USEC_PER_SEC + end_time.tv_usec)
154 - (start_time.tv_sec * USEC_PER_SEC + start_time.tv_usec);
155
156 if (delay > zone->max_alloc_time)
157 zone->max_alloc_time = delay;
158 if (delay < zone->min_alloc_time)
159 zone->min_alloc_time = delay;
160 zone->total_alloc_time += delay;
161 inc_ocmem_stat(zone, NR_SYNC_ALLOCATIONS);
162
163 return buffer;
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700164}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700165EXPORT_SYMBOL(ocmem_allocate);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700166
167struct ocmem_buf *ocmem_allocate_nowait(int client_id, unsigned long size)
168{
169 bool can_block = false;
170 bool can_wait = false;
171
172 if (!check_id(client_id)) {
173 pr_err("ocmem: Invalid client id: %d\n", client_id);
174 return NULL;
175 }
176
Naveen Ramaraj4d5e3542012-08-12 21:55:49 -0700177 if (!zone_active(client_id)) {
178 pr_err("ocmem: Client %s (id: %d) not allowed to use OCMEM\n",
179 get_name(client_id), client_id);
180 return NULL;
181 }
182
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700183 if (size < OCMEM_MIN_ALLOC) {
184 pr_err("ocmem: requested size %lx must be at least %x\n",
185 size, OCMEM_MIN_ALLOC);
186 return NULL;
187 }
188
189 if (!IS_ALIGNED(size, OCMEM_MIN_ALIGN)) {
190 pr_err("ocmem: Invalid alignment, size must be %x aligned\n",
191 OCMEM_MIN_ALIGN);
192 return NULL;
193 }
194 return __ocmem_allocate_range(client_id, size, size,
195 size, can_block, can_wait);
196}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700197EXPORT_SYMBOL(ocmem_allocate_nowait);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700198
199struct ocmem_buf *ocmem_allocate_range(int client_id, unsigned long min,
200 unsigned long goal, unsigned long step)
201{
202 bool can_block = true;
203 bool can_wait = false;
204
205 if (!check_id(client_id)) {
206 pr_err("ocmem: Invalid client id: %d\n", client_id);
207 return NULL;
208 }
209
Naveen Ramaraj4d5e3542012-08-12 21:55:49 -0700210 if (!zone_active(client_id)) {
211 pr_err("ocmem: Client %s (id: %d) not allowed to use OCMEM\n",
212 get_name(client_id), client_id);
213 return NULL;
214 }
215
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700216 /* Asynchronous API requires notifier registration */
217 if (!check_notifier(client_id)) {
218 pr_err("ocmem: No notifier registered for client %d\n",
219 client_id);
220 return NULL;
221 }
222
223 if (min < OCMEM_MIN_ALLOC) {
224 pr_err("ocmem: requested min size %lx must be at least %x\n",
225 min, OCMEM_MIN_ALLOC);
226 return NULL;
227 }
228
229 if (!IS_ALIGNED(min | goal | step, OCMEM_MIN_ALIGN)) {
230 pr_err("ocmem: Invalid alignment, args must be %x aligned\n",
231 OCMEM_MIN_ALIGN);
232 return NULL;
233 }
234
235 return __ocmem_allocate_range(client_id, min, goal,
236 step, can_block, can_wait);
237}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700238EXPORT_SYMBOL(ocmem_allocate_range);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700239
240struct ocmem_buf *ocmem_allocate_nb(int client_id, unsigned long size)
241{
242 bool can_block = true;
243 bool can_wait = false;
244
245 if (!check_id(client_id)) {
246 pr_err("ocmem: Invalid client id: %d\n", client_id);
247 return NULL;
248 }
249
250 /* Asynchronous API requires notifier registration */
251 if (!check_notifier(client_id)) {
252 pr_err("ocmem: No notifier registered for client %d\n",
253 client_id);
254 return NULL;
255 }
256
Naveen Ramaraj4d5e3542012-08-12 21:55:49 -0700257 if (!zone_active(client_id)) {
258 pr_err("ocmem: Client %s (id: %d) not allowed to use OCMEM\n",
259 get_name(client_id), client_id);
260 return NULL;
261 }
262
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700263 if (size < OCMEM_MIN_ALLOC) {
264 pr_err("ocmem: requested size %lx must be at least %x\n",
265 size, OCMEM_MIN_ALLOC);
266 return NULL;
267 }
268
269 if (!IS_ALIGNED(size, OCMEM_MIN_ALIGN)) {
270 pr_err("ocmem: Invalid alignment, args must be %x aligned\n",
271 OCMEM_MIN_ALIGN);
272 return NULL;
273 }
274
275 return __ocmem_allocate_range(client_id, 0, size, size,
276 can_block, can_wait);
277
278}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700279EXPORT_SYMBOL(ocmem_allocate_nb);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700280
281int ocmem_free(int client_id, struct ocmem_buf *buffer)
282{
Neeti Desaif69aa132013-02-28 17:25:01 -0800283 int rc;
284 struct timeval start_time;
285 struct timeval end_time;
286 unsigned int delay;
287 struct ocmem_zone *zone;
288
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700289 if (!check_id(client_id)) {
290 pr_err("ocmem: Invalid client id: %d\n", client_id);
291 return -EINVAL;
292 }
293
Naveen Ramaraj4d5e3542012-08-12 21:55:49 -0700294 if (!zone_active(client_id)) {
295 pr_err("ocmem: Client %s (id: %d) not allowed to use OCMEM\n",
296 get_name(client_id), client_id);
297 return -EINVAL;
298 }
299
Neeti Desaif69aa132013-02-28 17:25:01 -0800300 zone = get_zone(client_id);
301 if (!zone) {
302 pr_err("ocmem: Zone not found for client %d\n", client_id);
303 return -EINVAL;
304 }
305
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700306 if (!buffer) {
307 pr_err("ocmem: Invalid buffer\n");
308 return -EINVAL;
309 }
310
Neeti Desaif69aa132013-02-28 17:25:01 -0800311 do_gettimeofday(&start_time);
312
313 rc = __ocmem_free(client_id, buffer);
314
315 do_gettimeofday(&end_time);
316
317 if (rc < 0)
318 return rc;
319
320 delay = (end_time.tv_sec * USEC_PER_SEC + end_time.tv_usec)
321 - (start_time.tv_sec * USEC_PER_SEC + start_time.tv_usec);
322
323 if (delay > zone->max_free_time)
324 zone->max_free_time = delay;
325 if (delay < zone->min_free_time)
326 zone->min_free_time = delay;
327 zone->total_free_time += delay;
328 inc_ocmem_stat(zone, NR_FREES);
329
330 return rc;
331
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700332}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700333EXPORT_SYMBOL(ocmem_free);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700334
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700335int ocmem_shrink(int client_id, struct ocmem_buf *buffer, unsigned long len)
336{
337 if (!buffer)
338 return -EINVAL;
339 if (len >= buffer->len)
340 return -EINVAL;
Naveen Ramaraj4d5e3542012-08-12 21:55:49 -0700341
342 if (!zone_active(client_id)) {
343 pr_err("ocmem: Client id: %s (id: %d) not allowed to use OCMEM\n",
344 get_name(client_id), client_id);
345 return -EINVAL;
346 }
347
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700348 return __ocmem_shrink(client_id, buffer, len);
349}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700350EXPORT_SYMBOL(ocmem_shrink);
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700351
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700352int pre_validate_chunk_list(struct ocmem_map_list *list)
353{
354 int i = 0;
355 struct ocmem_chunk *chunks;
356
357 if (!list)
358 return -EINVAL;
359
360 if (list->num_chunks > OCMEM_MAX_CHUNKS || list->num_chunks == 0)
361 return -EINVAL;
362
363 chunks = list->chunks;
364
365 if (!chunks)
366 return -EINVAL;
367
368 for (i = 0; i < list->num_chunks; i++) {
369 if (!chunks[i].ddr_paddr ||
Naveen Ramaraj66522592012-11-19 11:33:09 -0800370 !IS_ALIGNED(chunks[i].ddr_paddr, MIN_CHUNK_SIZE) ||
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700371 chunks[i].size < MIN_CHUNK_SIZE ||
372 !IS_ALIGNED(chunks[i].size, MIN_CHUNK_SIZE)) {
373 pr_err("Invalid ocmem chunk at index %d (p: %lx, size %lx)\n",
374 i, chunks[i].ddr_paddr, chunks[i].size);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700375 return -EINVAL;
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700376 }
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700377 }
378 return 0;
379}
380
381int ocmem_map(int client_id, struct ocmem_buf *buffer,
382 struct ocmem_map_list *list)
383{
384 int ret = 0;
385 struct ocmem_handle *handle = NULL;
386
387 if (!check_id(client_id)) {
388 pr_err("ocmem: Invalid client id: %d\n", client_id);
389 return -EINVAL;
390 }
391
Naveen Ramaraj4d5e3542012-08-12 21:55:49 -0700392 if (!zone_active(client_id)) {
393 pr_err("ocmem: Client id: %s (id: %d) not allowed to use OCMEM\n",
394 get_name(client_id), client_id);
395 return -EINVAL;
396 }
397
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700398 /* Asynchronous API requires notifier registration */
399 if (!check_notifier(client_id)) {
400 pr_err("ocmem: No notifier registered for client %d\n",
401 client_id);
402 return -EINVAL;
403 }
404
405 if (!buffer) {
406 pr_err("ocmem: Invalid buffer\n");
407 return -EINVAL;
408 }
409
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700410 if (pre_validate_chunk_list(list) != 0)
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700411 return -EINVAL;
412
413 handle = buffer_to_handle(buffer);
414
415 if (!handle)
416 return -EINVAL;
417
418 mutex_lock(&handle->handle_mutex);
419 ret = process_xfer(client_id, handle, list, TO_OCMEM);
420 mutex_unlock(&handle->handle_mutex);
421 return ret;
422}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700423EXPORT_SYMBOL(ocmem_map);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700424
425int ocmem_unmap(int client_id, struct ocmem_buf *buffer,
426 struct ocmem_map_list *list)
427{
428
429 int ret = 0;
430 struct ocmem_handle *handle = NULL;
431
432 if (!check_id(client_id)) {
433 pr_err("ocmem: Invalid client id: %d\n", client_id);
434 return -EINVAL;
435 }
436
Naveen Ramaraj4d5e3542012-08-12 21:55:49 -0700437 if (!zone_active(client_id)) {
438 pr_err("ocmem: Client id: %s (id: %d) not allowed to use OCMEM\n",
439 get_name(client_id), client_id);
440 return -EINVAL;
441 }
442
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700443 /* Asynchronous API requires notifier registration */
444 if (!check_notifier(client_id)) {
445 pr_err("ocmem: No notifier registered for client %d\n",
446 client_id);
447 return -EINVAL;
448 }
449
450 if (!buffer) {
451 pr_err("ocmem: Invalid buffer\n");
452 return -EINVAL;
453 }
454
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700455 if (pre_validate_chunk_list(list) != 0)
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700456 return -EINVAL;
457
458 handle = buffer_to_handle(buffer);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700459 mutex_lock(&handle->handle_mutex);
460 ret = process_xfer(client_id, handle, list, TO_DDR);
461 mutex_unlock(&handle->handle_mutex);
462 return ret;
463}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700464EXPORT_SYMBOL(ocmem_unmap);
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700465
Neeti Desaidad1d8e2013-01-09 19:42:06 -0800466int ocmem_drop(int client_id, struct ocmem_buf *buffer,
467 struct ocmem_map_list *list)
468{
469 int ret = 0;
470 struct ocmem_handle *handle = NULL;
471
472 if (!check_id(client_id)) {
473 pr_err("ocmem: Invalid client id: %d\n", client_id);
474 return -EINVAL;
475 }
476
477 if (!zone_active(client_id)) {
478 pr_err("ocmem: Client id: %s (id: %d) not allowed to use OCMEM\n",
479 get_name(client_id), client_id);
480 return -EINVAL;
481 }
482
483 if (!buffer) {
484 pr_err("ocmem: Invalid buffer\n");
485 return -EINVAL;
486 }
487
488 if (pre_validate_chunk_list(list) != 0)
489 return -EINVAL;
490
491 handle = buffer_to_handle(buffer);
492 mutex_lock(&handle->handle_mutex);
493 ret = process_drop(client_id, handle, list);
494 mutex_unlock(&handle->handle_mutex);
495 return ret;
496}
497EXPORT_SYMBOL(ocmem_drop);
498
499
Naveen Ramaraj55ed8902012-09-26 13:18:06 -0700500int ocmem_dump(int client_id, struct ocmem_buf *buffer,
501 unsigned long dst_phys_addr)
502{
503 int ret = 0;
504 struct ocmem_handle *handle = NULL;
505
506 if (!check_id(client_id)) {
507 pr_err("ocmem: Invalid client id: %d\n", client_id);
508 return -EINVAL;
509 }
510
511 if (!zone_active(client_id)) {
512 pr_err("ocmem: Client id: %s (id: %d) not allowed to use OCMEM\n",
513 get_name(client_id), client_id);
514 return -EINVAL;
515 }
516
517 if (!buffer) {
518 pr_err("ocmem: Invalid buffer\n");
519 return -EINVAL;
520 }
521
522 handle = buffer_to_handle(buffer);
523 mutex_lock(&handle->handle_mutex);
524 ret = process_dump(client_id, handle, dst_phys_addr);
525 mutex_unlock(&handle->handle_mutex);
526 return ret;
527}
528EXPORT_SYMBOL(ocmem_dump);
529
Naveen Ramaraj0f5e7ab2012-04-24 19:10:23 -0700530unsigned long get_max_quota(int client_id)
531{
532 if (!check_id(client_id)) {
533 pr_err("ocmem: Invalid client id: %d\n", client_id);
534 return 0x0;
535 }
536 return process_quota(client_id);
537}
Naveen Ramarajbb93faa2013-04-08 15:07:52 -0700538EXPORT_SYMBOL(get_max_quota);
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700539
540/* Synchronous eviction/restore calls */
541/* Only a single eviction or restoration is allowed */
542/* Evictions/Restorations cannot be concurrent with other maps */
543int ocmem_evict(int client_id)
544{
545 int ret = 0;
546
547 if (!check_id(client_id)) {
548 pr_err("ocmem: Invalid client id: %d\n", client_id);
549 return -EINVAL;
550 }
551
552 mutex_lock(&ocmem_eviction_lock);
553 if (test_bit(client_id, evicted)) {
554 pr_err("ocmem: Previous eviction was not restored by %d\n",
555 client_id);
556 mutex_unlock(&ocmem_eviction_lock);
557 return -EINVAL;
558 }
559
560 ret = process_evict(client_id);
561 if (ret == 0)
562 set_bit(client_id, evicted);
563
564 mutex_unlock(&ocmem_eviction_lock);
565 return ret;
566}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700567EXPORT_SYMBOL(ocmem_evict);
Naveen Ramarajcc4ec152012-05-14 09:55:29 -0700568
569int ocmem_restore(int client_id)
570{
571 int ret = 0;
572
573 if (!check_id(client_id)) {
574 pr_err("ocmem: Invalid client id: %d\n", client_id);
575 return -EINVAL;
576 }
577
578 mutex_lock(&ocmem_eviction_lock);
579 if (!test_bit(client_id, evicted)) {
580 pr_err("ocmem: No previous eviction by %d\n", client_id);
581 mutex_unlock(&ocmem_eviction_lock);
582 return -EINVAL;
583 }
584 ret = process_restore(client_id);
585 clear_bit(client_id, evicted);
586 mutex_unlock(&ocmem_eviction_lock);
587 return ret;
588}
Naveen Ramarajfdfb0cc2012-09-06 23:16:48 -0700589EXPORT_SYMBOL(ocmem_restore);
Naveen Ramaraj99b07562012-05-28 20:57:09 -0700590
591/* Wrappers until power control is transitioned to clients */
592enum ocmem_power_state ocmem_get_power_state(int client_id,
593 struct ocmem_buf *buffer)
594{
595 return 0;
596}
597
598int ocmem_set_power_state(int client_id, struct ocmem_buf *buffer,
599 enum ocmem_power_state new_state)
600{
601 return 0;
602}
603
604struct ocmem_vectors *ocmem_get_vectors(int client_id,
605 struct ocmem_buf *buffer)
606{
607 return NULL;
608}