diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2018-01-05 08:26:46 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-01-06 09:18:00 -0700 |
commit | e80a0af4759a164214f02da157a3800753ce135f (patch) | |
tree | efd4cbbac280618e1cd6e9dd464730a739c2b37f /lib/Kconfig | |
parent | bbbc3c1cfaf6900d24e3c9fcaac25d267ad2bc40 (diff) | |
download | linux-e80a0af4759a164214f02da157a3800753ce135f.tar.gz linux-e80a0af4759a164214f02da157a3800753ce135f.tar.bz2 linux-e80a0af4759a164214f02da157a3800753ce135f.zip |
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 <bart.vanassche@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/Kconfig')
-rw-r--r-- | lib/Kconfig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index c5e84fbcb30b..4dd5c11366f9 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -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) |