mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
lib/scatterlist: Introduce sgl_alloc() and sgl_free()
Many kernel drivers contain code that allocates and frees both a scatterlist and the pages that populate that scatterlist. Introduce functions in lib/scatterlist.c that perform these tasks instead of duplicating this functionality in multiple drivers. Only include these functions in the build if CONFIG_SGL_ALLOC=y to avoid that the kernel size increases if this functionality is not used. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
bbbc3c1cfa
commit
e80a0af475
3 changed files with 119 additions and 0 deletions
|
|
@ -409,6 +409,10 @@ config HAS_DMA
|
|||
depends on !NO_DMA
|
||||
default y
|
||||
|
||||
config SGL_ALLOC
|
||||
bool
|
||||
default n
|
||||
|
||||
config DMA_NOOP_OPS
|
||||
bool
|
||||
depends on HAS_DMA && (!64BIT || ARCH_DMA_ADDR_T_64BIT)
|
||||
|
|
|
|||
Loading…
Reference in a new issue