blob: a7f3de56ce4aadb9b30994e5ae4d538c6585ecfe [file] [log] [blame]
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -07001/*
2 * include/linux/ion.h
3 *
4 * Copyright (C) 2011 Google, Inc.
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef _LINUX_ION_H
18#define _LINUX_ION_H
19
Laura Abbottabcb6f72011-10-04 16:26:49 -070020#include <linux/ioctl.h>
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070021#include <linux/types.h>
22
Laura Abbottabcb6f72011-10-04 16:26:49 -070023
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070024struct ion_handle;
25/**
26 * enum ion_heap_types - list of all possible types of heaps
Iliyan Malchevf22301562011-07-06 16:53:21 -070027 * @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc
28 * @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc
29 * @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved
30 * carveout heap, allocations are physically
31 * contiguous
32 * @ION_HEAP_END: helper for iterating over heaps
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070033 */
34enum ion_heap_type {
35 ION_HEAP_TYPE_SYSTEM,
36 ION_HEAP_TYPE_SYSTEM_CONTIG,
37 ION_HEAP_TYPE_CARVEOUT,
38 ION_HEAP_TYPE_CUSTOM, /* must be last so device specific heaps always
39 are at the end of this enum */
Rebecca Schultz Zavine6ee1242011-06-30 12:19:55 -070040 ION_NUM_HEAPS,
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070041};
42
Iliyan Malchevf22301562011-07-06 16:53:21 -070043#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
44#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
45#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070046
Laura Abbotta2e93632011-08-19 13:36:32 -070047
48/**
49 * These are the only ids that should be used for Ion heap ids.
50 * The ids listed are the order in which allocation will be attempted
51 * if specified. Don't swap the order of heap ids unless you know what
52 * you are doing!
53 */
54
55enum ion_heap_ids {
56 ION_HEAP_SYSTEM_ID,
57 ION_HEAP_SYSTEM_CONTIG_ID,
58 ION_HEAP_EBI_ID,
59 ION_HEAP_SMI_ID,
Laura Abbott2d1760b2011-09-29 21:31:24 -070060 ION_HEAP_ADSP_ID,
61 ION_HEAP_AUDIO_ID,
Laura Abbotta2e93632011-08-19 13:36:32 -070062};
63
64#define ION_KMALLOC_HEAP_NAME "kmalloc"
65#define ION_VMALLOC_HEAP_NAME "vmalloc"
66#define ION_EBI1_HEAP_NAME "EBI1"
Laura Abbott2d1760b2011-09-29 21:31:24 -070067#define ION_ADSP_HEAP_NAME "adsp"
Laura Abbott63cfd7e2011-10-10 18:21:01 -070068#define ION_SMI_HEAP_NAME "smi"
Laura Abbotta2e93632011-08-19 13:36:32 -070069
Laura Abbott894fd582011-08-19 13:33:56 -070070#define CACHED 1
71#define UNCACHED 0
72
73#define ION_CACHE_SHIFT 0
74
75#define ION_SET_CACHE(__cache) ((__cache) << ION_CACHE_SHIFT)
76
Laura Abbott35412032011-09-29 09:50:06 -070077#define ION_IS_CACHED(__flags) ((__flags) & (1 << ION_CACHE_SHIFT))
78
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070079#ifdef __KERNEL__
Laura Abbott65576962011-10-31 12:13:25 -070080#include <linux/err.h>
Laura Abbottcffdff52011-09-23 10:40:19 -070081#include <mach/ion.h>
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070082struct ion_device;
83struct ion_heap;
84struct ion_mapper;
85struct ion_client;
86struct ion_buffer;
87
88/* This should be removed some day when phys_addr_t's are fully
89 plumbed in the kernel, and all instances of ion_phys_addr_t should
90 be converted to phys_addr_t. For the time being many kernel interfaces
91 do not accept phys_addr_t's that would have to */
92#define ion_phys_addr_t unsigned long
93
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070094/**
95 * struct ion_platform_heap - defines a heap in the given platform
96 * @type: type of the heap from ion_heap_type enum
Rebecca Schultz Zavine6ee1242011-06-30 12:19:55 -070097 * @id: unique identifier for heap. When allocating (lower numbers
98 * will be allocated from first)
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -070099 * @name: used for debug purposes
100 * @base: base address of heap in physical memory if applicable
101 * @size: size of the heap in bytes if applicable
Alex Bird8a3ede32011-11-07 12:33:42 -0800102 * @request_region: function to be called when the number of allocations goes
103 * from 0 -> 1
104 * @release_region: function to be called when the number of allocations goes
105 * from 1 -> 0
106 * @setup_region: function to be called upon ion registration
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700107 *
108 * Provided by the board file.
109 */
110struct ion_platform_heap {
111 enum ion_heap_type type;
Rebecca Schultz Zavine6ee1242011-06-30 12:19:55 -0700112 unsigned int id;
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700113 const char *name;
114 ion_phys_addr_t base;
115 size_t size;
Laura Abbotta2e93632011-08-19 13:36:32 -0700116 enum ion_memory_types memory_type;
Alex Bird8a3ede32011-11-07 12:33:42 -0800117 void (*request_region)(void *);
118 void (*release_region)(void *);
119 void *(*setup_region)(void);
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700120};
121
122/**
123 * struct ion_platform_data - array of platform heaps passed from board file
Alex Bird27ca6612011-11-01 14:40:06 -0700124 * @nr: number of structures in the array
125 * @request_region: function to be called when the number of allocations goes
126 * from 0 -> 1
127 * @release_region: function to be called when the number of allocations goes
128 * from 1 -> 0
129 * @setup_region: function to be called upon ion registration
130 * @heaps: array of platform_heap structions
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700131 *
132 * Provided by the board file in the form of platform data to a platform device.
133 */
134struct ion_platform_data {
135 int nr;
Alex Bird27ca6612011-11-01 14:40:06 -0700136 void (*request_region)(void *);
137 void (*release_region)(void *);
138 void *(*setup_region)(void);
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700139 struct ion_platform_heap heaps[];
140};
141
Jordan Crouse8cd48322011-10-12 17:05:19 -0600142#ifdef CONFIG_ION
143
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700144/**
145 * ion_client_create() - allocate a client and returns it
146 * @dev: the global ion device
147 * @heap_mask: mask of heaps this client can allocate from
148 * @name: used for debugging
149 */
150struct ion_client *ion_client_create(struct ion_device *dev,
151 unsigned int heap_mask, const char *name);
152
153/**
Laura Abbott302911d2011-08-15 17:12:57 -0700154 * msm_ion_client_create - allocate a client using the ion_device specified in
155 * drivers/gpu/ion/msm/msm_ion.c
156 *
157 * heap_mask and name are the same as ion_client_create, return values
158 * are the same as ion_client_create.
159 */
160
161struct ion_client *msm_ion_client_create(unsigned int heap_mask,
162 const char *name);
163
164/**
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700165 * ion_client_destroy() - free's a client and all it's handles
166 * @client: the client
167 *
168 * Free the provided client and all it's resources including
169 * any handles it is holding.
170 */
171void ion_client_destroy(struct ion_client *client);
172
173/**
174 * ion_alloc - allocate ion memory
175 * @client: the client
176 * @len: size of the allocation
177 * @align: requested allocation alignment, lots of hardware blocks have
178 * alignment requirements of some kind
Rebecca Schultz Zavine6ee1242011-06-30 12:19:55 -0700179 * @flags: mask of heaps to allocate from, if multiple bits are set
180 * heaps will be tried in order from lowest to highest order bit
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700181 *
182 * Allocate memory in one of the heaps provided in heap mask and return
183 * an opaque handle to it.
184 */
185struct ion_handle *ion_alloc(struct ion_client *client, size_t len,
186 size_t align, unsigned int flags);
187
188/**
189 * ion_free - free a handle
190 * @client: the client
191 * @handle: the handle to free
192 *
193 * Free the provided handle.
194 */
195void ion_free(struct ion_client *client, struct ion_handle *handle);
196
197/**
198 * ion_phys - returns the physical address and len of a handle
199 * @client: the client
200 * @handle: the handle
201 * @addr: a pointer to put the address in
202 * @len: a pointer to put the length in
203 *
204 * This function queries the heap for a particular handle to get the
205 * handle's physical address. It't output is only correct if
206 * a heap returns physically contiguous memory -- in other cases
207 * this api should not be implemented -- ion_map_dma should be used
208 * instead. Returns -EINVAL if the handle is invalid. This has
209 * no implications on the reference counting of the handle --
210 * the returned value may not be valid if the caller is not
211 * holding a reference.
212 */
213int ion_phys(struct ion_client *client, struct ion_handle *handle,
214 ion_phys_addr_t *addr, size_t *len);
215
216/**
217 * ion_map_kernel - create mapping for the given handle
218 * @client: the client
219 * @handle: handle to map
Laura Abbott894fd582011-08-19 13:33:56 -0700220 * @flags: flags for this mapping
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700221 *
222 * Map the given handle into the kernel and return a kernel address that
Laura Abbott894fd582011-08-19 13:33:56 -0700223 * can be used to access this address. If no flags are specified, this
224 * will return a non-secure uncached mapping.
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700225 */
Laura Abbott894fd582011-08-19 13:33:56 -0700226void *ion_map_kernel(struct ion_client *client, struct ion_handle *handle,
227 unsigned long flags);
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700228
229/**
230 * ion_unmap_kernel() - destroy a kernel mapping for a handle
231 * @client: the client
232 * @handle: handle to unmap
233 */
234void ion_unmap_kernel(struct ion_client *client, struct ion_handle *handle);
235
236/**
237 * ion_map_dma - create a dma mapping for a given handle
238 * @client: the client
239 * @handle: handle to map
240 *
241 * Return an sglist describing the given handle
242 */
243struct scatterlist *ion_map_dma(struct ion_client *client,
Laura Abbott894fd582011-08-19 13:33:56 -0700244 struct ion_handle *handle,
245 unsigned long flags);
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700246
247/**
248 * ion_unmap_dma() - destroy a dma mapping for a handle
249 * @client: the client
250 * @handle: handle to unmap
251 */
252void ion_unmap_dma(struct ion_client *client, struct ion_handle *handle);
253
254/**
255 * ion_share() - given a handle, obtain a buffer to pass to other clients
256 * @client: the client
257 * @handle: the handle to share
258 *
Iliyan Malchev3fe24362011-08-09 14:42:08 -0700259 * Given a handle, return a buffer, which exists in a global name
260 * space, and can be passed to other clients. Should be passed into ion_import
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700261 * to obtain a new handle for this buffer.
Iliyan Malchev3fe24362011-08-09 14:42:08 -0700262 *
263 * NOTE: This function does do not an extra reference. The burden is on the
264 * caller to make sure the buffer doesn't go away while it's being passed to
265 * another client. That is, ion_free should not be called on this handle until
266 * the buffer has been imported into the other client.
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700267 */
268struct ion_buffer *ion_share(struct ion_client *client,
269 struct ion_handle *handle);
270
271/**
272 * ion_import() - given an buffer in another client, import it
273 * @client: this blocks client
274 * @buffer: the buffer to import (as obtained from ion_share)
275 *
276 * Given a buffer, add it to the client and return the handle to use to refer
277 * to it further. This is called to share a handle from one kernel client to
278 * another.
279 */
280struct ion_handle *ion_import(struct ion_client *client,
281 struct ion_buffer *buffer);
282
283/**
284 * ion_import_fd() - given an fd obtained via ION_IOC_SHARE ioctl, import it
285 * @client: this blocks client
286 * @fd: the fd
287 *
288 * A helper function for drivers that will be recieving ion buffers shared
289 * with them from userspace. These buffers are represented by a file
290 * descriptor obtained as the return from the ION_IOC_SHARE ioctl.
291 * This function coverts that fd into the underlying buffer, and returns
292 * the handle to use to refer to it further.
293 */
294struct ion_handle *ion_import_fd(struct ion_client *client, int fd);
Laura Abbott273dd8e2011-10-12 14:26:33 -0700295
Laura Abbott273dd8e2011-10-12 14:26:33 -0700296/**
297 * ion_handle_get_flags - get the flags for a given handle
298 *
299 * @client - client who allocated the handle
300 * @handle - handle to get the flags
301 * @flags - pointer to store the flags
302 *
303 * Gets the current flags for a handle. These flags indicate various options
304 * of the buffer (caching, security, etc.)
305 */
306int ion_handle_get_flags(struct ion_client *client, struct ion_handle *handle,
307 unsigned long *flags);
308
Jordan Crouse8cd48322011-10-12 17:05:19 -0600309#else
310static inline struct ion_client *ion_client_create(struct ion_device *dev,
311 unsigned int heap_mask, const char *name)
312{
313 return ERR_PTR(-ENODEV);
314}
Laura Abbott273dd8e2011-10-12 14:26:33 -0700315
Jordan Crouse8cd48322011-10-12 17:05:19 -0600316static inline struct ion_client *msm_ion_client_create(unsigned int heap_mask,
317 const char *name)
318{
319 return ERR_PTR(-ENODEV);
320}
321
322static inline void ion_client_destroy(struct ion_client *client) { }
323
324static inline struct ion_handle *ion_alloc(struct ion_client *client,
325 size_t len, size_t align, unsigned int flags)
326{
327 return ERR_PTR(-ENODEV);
328}
329
330static inline void ion_free(struct ion_client *client,
331 struct ion_handle *handle) { }
332
333
334static inline int ion_phys(struct ion_client *client,
335 struct ion_handle *handle, ion_phys_addr_t *addr, size_t *len)
336{
337 return -ENODEV;
338}
339
340static inline void *ion_map_kernel(struct ion_client *client,
341 struct ion_handle *handle, unsigned long flags)
342{
343 return ERR_PTR(-ENODEV);
344}
345
346static inline void ion_unmap_kernel(struct ion_client *client,
347 struct ion_handle *handle) { }
348
349static inline struct scatterlist *ion_map_dma(struct ion_client *client,
350 struct ion_handle *handle, unsigned long flags)
351{
352 return ERR_PTR(-ENODEV);
353}
354
355static inline void ion_unmap_dma(struct ion_client *client,
356 struct ion_handle *handle) { }
357
358static inline struct ion_buffer *ion_share(struct ion_client *client,
359 struct ion_handle *handle)
360{
361 return ERR_PTR(-ENODEV);
362}
363
364static inline struct ion_handle *ion_import(struct ion_client *client,
365 struct ion_buffer *buffer)
366{
367 return ERR_PTR(-ENODEV);
368}
369
370static inline struct ion_handle *ion_import_fd(struct ion_client *client,
371 int fd)
372{
373 return ERR_PTR(-ENODEV);
374}
375
376static inline int ion_handle_get_flags(struct ion_client *client,
377 struct ion_handle *handle, unsigned long *flags)
378{
379 return -ENODEV;
380}
381#endif /* CONFIG_ION */
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700382#endif /* __KERNEL__ */
383
384/**
385 * DOC: Ion Userspace API
386 *
387 * create a client by opening /dev/ion
388 * most operations handled via following ioctls
389 *
390 */
391
392/**
393 * struct ion_allocation_data - metadata passed from userspace for allocations
394 * @len: size of the allocation
395 * @align: required alignment of the allocation
396 * @flags: flags passed to heap
397 * @handle: pointer that will be populated with a cookie to use to refer
398 * to this allocation
399 *
400 * Provided by userspace as an argument to the ioctl
401 */
402struct ion_allocation_data {
403 size_t len;
404 size_t align;
405 unsigned int flags;
406 struct ion_handle *handle;
407};
408
409/**
410 * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair
411 * @handle: a handle
412 * @fd: a file descriptor representing that handle
413 *
414 * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with
415 * the handle returned from ion alloc, and the kernel returns the file
416 * descriptor to share or map in the fd field. For ION_IOC_IMPORT, userspace
417 * provides the file descriptor and the kernel returns the handle.
418 */
419struct ion_fd_data {
420 struct ion_handle *handle;
421 int fd;
422};
423
424/**
425 * struct ion_handle_data - a handle passed to/from the kernel
426 * @handle: a handle
427 */
428struct ion_handle_data {
429 struct ion_handle *handle;
430};
431
Rebecca Schultz Zavine6ee1242011-06-30 12:19:55 -0700432/**
433 * struct ion_custom_data - metadata passed to/from userspace for a custom ioctl
434 * @cmd: the custom ioctl function to call
435 * @arg: additional data to pass to the custom ioctl, typically a user
436 * pointer to a predefined structure
437 *
438 * This works just like the regular cmd and arg fields of an ioctl.
439 */
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700440struct ion_custom_data {
441 unsigned int cmd;
442 unsigned long arg;
443};
444
Laura Abbottabcb6f72011-10-04 16:26:49 -0700445
446/* struct ion_flush_data - data passed to ion for flushing caches
447 *
448 * @handle: handle with data to flush
Laura Abbotte80ea012011-11-18 18:36:47 -0800449 * @fd: fd to flush
Laura Abbottabcb6f72011-10-04 16:26:49 -0700450 * @vaddr: userspace virtual address mapped with mmap
451 * @offset: offset into the handle to flush
452 * @length: length of handle to flush
453 *
454 * Performs cache operations on the handle. If p is the start address
455 * of the handle, p + offset through p + offset + length will have
456 * the cache operations performed
457 */
458struct ion_flush_data {
459 struct ion_handle *handle;
Laura Abbotte80ea012011-11-18 18:36:47 -0800460 int fd;
Laura Abbottabcb6f72011-10-04 16:26:49 -0700461 void *vaddr;
462 unsigned int offset;
463 unsigned int length;
464};
Laura Abbott273dd8e2011-10-12 14:26:33 -0700465
466/* struct ion_flag_data - information about flags for this buffer
467 *
468 * @handle: handle to get flags from
469 * @flags: flags of this handle
470 *
471 * Takes handle as an input and outputs the flags from the handle
472 * in the flag field.
473 */
474struct ion_flag_data {
475 struct ion_handle *handle;
476 unsigned long flags;
477};
478
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700479#define ION_IOC_MAGIC 'I'
480
481/**
482 * DOC: ION_IOC_ALLOC - allocate memory
483 *
484 * Takes an ion_allocation_data struct and returns it with the handle field
485 * populated with the opaque handle for the allocation.
486 */
487#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, \
488 struct ion_allocation_data)
489
490/**
491 * DOC: ION_IOC_FREE - free memory
492 *
493 * Takes an ion_handle_data struct and frees the handle.
494 */
495#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
496
497/**
498 * DOC: ION_IOC_MAP - get a file descriptor to mmap
499 *
500 * Takes an ion_fd_data struct with the handle field populated with a valid
501 * opaque handle. Returns the struct with the fd field set to a file
502 * descriptor open in the current address space. This file descriptor
503 * can then be used as an argument to mmap.
504 */
505#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
506
507/**
508 * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation
509 *
510 * Takes an ion_fd_data struct with the handle field populated with a valid
511 * opaque handle. Returns the struct with the fd field set to a file
512 * descriptor open in the current address space. This file descriptor
513 * can then be passed to another process. The corresponding opaque handle can
514 * be retrieved via ION_IOC_IMPORT.
515 */
516#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
517
518/**
519 * DOC: ION_IOC_IMPORT - imports a shared file descriptor
520 *
521 * Takes an ion_fd_data struct with the fd field populated with a valid file
522 * descriptor obtained from ION_IOC_SHARE and returns the struct with the handle
523 * filed set to the corresponding opaque handle.
524 */
525#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, int)
526
527/**
528 * DOC: ION_IOC_CUSTOM - call architecture specific ion ioctl
529 *
530 * Takes the argument of the architecture specific ioctl to call and
531 * passes appropriate userdata for that ioctl
532 */
533#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
534
Laura Abbottabcb6f72011-10-04 16:26:49 -0700535
536/**
537 * DOC: ION_IOC_CLEAN_CACHES - clean the caches
538 *
539 * Clean the caches of the handle specified.
540 */
541#define ION_IOC_CLEAN_CACHES _IOWR(ION_IOC_MAGIC, 7, \
542 struct ion_flush_data)
543/**
544 * DOC: ION_MSM_IOC_INV_CACHES - invalidate the caches
545 *
546 * Invalidate the caches of the handle specified.
547 */
548#define ION_IOC_INV_CACHES _IOWR(ION_IOC_MAGIC, 8, \
549 struct ion_flush_data)
550/**
551 * DOC: ION_MSM_IOC_CLEAN_CACHES - clean and invalidate the caches
552 *
553 * Clean and invalidate the caches of the handle specified.
554 */
555#define ION_IOC_CLEAN_INV_CACHES _IOWR(ION_IOC_MAGIC, 9, \
556 struct ion_flush_data)
Laura Abbott273dd8e2011-10-12 14:26:33 -0700557
558/**
559 * DOC: ION_IOC_GET_FLAGS - get the flags of the handle
560 *
561 * Gets the flags of the current handle which indicate cachability,
562 * secure state etc.
563 */
564#define ION_IOC_GET_FLAGS _IOWR(ION_IOC_MAGIC, 10, \
565 struct ion_flag_data)
Rebecca Schultz Zavinc80005a2011-06-29 19:44:29 -0700566#endif /* _LINUX_ION_H */