diff options
author | Johan Mossberg <johan.xx.mossbergg@stericsson.com> | 2011-01-27 13:44:16 +0100 |
---|---|---|
committer | Henrik Aberg <henrik.aberg@stericsson.com> | 2011-02-18 10:30:36 +0100 |
commit | e2d9e98773a2f126854a9cd01c314afb752b0510 (patch) | |
tree | 60b80a87621a481c92af6c7996b9c5dd3ecd7b14 /include | |
parent | df6750a164674b330337aa6a890816c12d1ea5fd (diff) |
HWMEM: Add hwmem_kmap and hwmem_kunmap
Add hwmem_kmap and hwmem_kunmap to the hwmem kernel api so that hwmem
buffers can be used from the kernel.
ST-Ericsson ID: AP 321641
ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10068
Change-Id: Ifd639eb9668d794004b0fbff91b3f403c3c335ad
Signed-off-by: Johan Mossberg <johan.xx.mossbergg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/13672
Reviewed-by: Johan MOSSBERG <johan.xx.mossberg@stericsson.com>
Tested-by: Johan MOSSBERG <johan.xx.mossberg@stericsson.com>
Reviewed-by: QATOOLS
Reviewed-by: Pierre PEIFFER <pierre.peiffer@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hwmem.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/hwmem.h b/include/linux/hwmem.h index c3ba179a83a..bc0a26a30a6 100644 --- a/include/linux/hwmem.h +++ b/include/linux/hwmem.h @@ -443,6 +443,26 @@ void hwmem_unpin(struct hwmem_alloc *alloc); int hwmem_mmap(struct hwmem_alloc *alloc, struct vm_area_struct *vma); /** + * @brief Map the buffer for use in the kernel. + * + * This function implicitly pins the buffer. + * + * @param alloc Buffer to be mapped. + * + * @return Pointer to buffer, or a negative error code. + */ +void *hwmem_kmap(struct hwmem_alloc *alloc); + +/** + * @brief Un-map a buffer previously mapped with hwmem_kmap. + * + * This function implicitly unpins the buffer. + * + * @param alloc Buffer to be un-mapped. + */ +void hwmem_kunmap(struct hwmem_alloc *alloc); + +/** * @brief Set access rights for buffer. * * @param alloc Buffer to set rights for. |