diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2018-01-05 19:26:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-12 21:18:30 +0300 |
commit | 75644ed66fd2985c7119309c1c48090736e71851 (patch) | |
tree | ca9922b8d9cc2815388c1899c74387d7526d3d5b /lib/Kconfig | |
parent | da73a178efaccdfffe440047471cc4d40320a811 (diff) | |
download | linux-75644ed66fd2985c7119309c1c48090736e71851.tar.xz |
lib/scatterlist: Introduce sgl_alloc() and sgl_free()
commit e80a0af4759a164214f02da157a3800753ce135f upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 b1445b22a6de..8396c4cfa1ab 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -413,6 +413,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) |