Skip to content

Instantly share code, notes, and snippets.

@srikanth007m
Created August 18, 2017 05:27
Show Gist options
  • Save srikanth007m/860223c145fd56431cc2c1c162f83ad0 to your computer and use it in GitHub Desktop.
Save srikanth007m/860223c145fd56431cc2c1c162f83ad0 to your computer and use it in GitHub Desktop.
include <asm/ioctl.h>
include <linux/uaccess.h>
include <linux/compat.h>
include <linux/ion.h>
include <linux/msm_ion.h>
incdir "drivers/staging/android/ion"
include <../drivers/staging/android/ion/msm/compat_msm_ion.c>
include <../drivers/staging/android/uapi/ion.h>
include <../drivers/staging/android/ion/msm/compat_msm_ion.c>
resource fd_ion[fd]
resource fd_ion_generic[fd]
resource ion_handle[int32]
openat$ion(fd const[AT_FDCWD], file ptr[in, string["/dev/ion"]], flags flags[open_flags], mode const[0]) fd_ion
ioctl$ION_IOC_ALLOC(fd fd_ion, cmd const[ION_IOC_ALLOC], arg ptr[inout, ion_allocation_data])
ioctl$ION_IOC_FREE(fd fd_ion, cmd const[ION_IOC_FREE], arg ptr[in, ion_handle_data])
ioctl$ION_IOC_MAP(fd fd_ion, cmd const[ION_IOC_MAP], arg ptr[inout, ion_fd_data])
ioctl$ION_IOC_SHARE(fd fd_ion, cmd const[ION_IOC_SHARE], arg ptr[inout, ion_fd_data])
ioctl$ION_IOC_IMPORT(fd fd_ion, cmd const[ION_IOC_IMPORT], arg ptr[inout, ion_fd_data])
ioctl$ION_IOC_SYNC(fd fd_ion, cmd const[ION_IOC_SYNC], arg ptr[inout, ion_fd_data])
ioctl$ION_IOC_CUSTOM(fd fd_ion, cmd const[ION_IOC_CUSTOM], arg ptr[inout, ion_custom_data])
ioctl$COMPAT_ION_IOC_CLEAN_CACHES(fd fd_ion, cmd const[COMPAT_ION_IOC_CLEAN_CACHES], arg ptr[inout, compat_ion_flush_data])
ioctl$COMPAT_ION_IOC_INV_CACHES(fd fd_ion, cmd const[COMPAT_ION_IOC_INV_CACHES], arg ptr[inout, compat_ion_flush_data])
ioctl$COMPAT_ION_IOC_CLEAN_INV_CACHES(fd fd_ion, cmd const[COMPAT_ION_IOC_CLEAN_INV_CACHES], arg ptr[inout, compat_ion_flush_data])
ioctl$COMPAT_ION_IOC_PREFETCH(fd fd_ion, cmd const[COMPAT_ION_IOC_PREFETCH], arg ptr[inout, compat_ion_prefetch_data])
ioctl$COMPAT_ION_IOC_DRAIN(fd fd_ion, cmd const[COMPAT_ION_IOC_DRAIN], arg ptr[inout, compat_ion_prefetch_data])
ion_allocation_data {
len intptr
align intptr
heapid int32
flags int32
handle ion_handle
}
ion_handle_data {
handle ion_handle
}
ion_fd_data {
handle ion_handle
fd fd_ion_generic
}
ion_custom_data {
cmd int32
arg intptr
}
compat_ion_flush_data {
handle ion_handle
fd fd_ion_generic
vaddr intptr
offset int32
len int32
}
compat_ion_prefetch_data {
heapid int32
len int32
regions intptr
nrregionz int32
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment