remarkable-linux/drivers/base
Marek Szyprowski d2b7428eb0 common: dma-mapping: introduce dma_get_sgtable() function
This patch adds dma_get_sgtable() function which is required to let
drivers to share the buffers allocated by DMA-mapping subsystem. Right
now the driver gets a dma address of the allocated buffer and the kernel
virtual mapping for it. If it wants to share it with other device (= map
into its dma address space) it usually hacks around kernel virtual
addresses to get pointers to pages or assumes that both devices share
the DMA address space. Both solutions are just hacks for the special
cases, which should be avoided in the final version of buffer sharing.

To solve this issue in a generic way, a new call to DMA mapping has been
introduced - dma_get_sgtable(). It allocates a scatter-list which
describes the allocated buffer and lets the driver(s) to use it with
other device(s) by calling dma_map_sg() on it.

This patch provides a generic implementation based on virt_to_page()
call. Architectures which require more sophisticated translation might
provide their own get_sgtable() methods.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-30 12:25:46 +02:00
..
power PM / Sleep: Prevent waiting forever on asynchronous suspend after abort 2012-06-24 23:31:09 +02:00
regmap regmap: Export regmap_reinit_cache() 2012-06-08 05:57:21 +08:00
attribute_container.c
base.h driver core: move the deferred probe pointer into the private area 2012-03-08 12:17:22 -08:00
bus.c Revert "driver core: check start node in klist_iter_init_node" 2012-04-19 19:17:30 -07:00
class.c Revert "driver core: check start node in klist_iter_init_node" 2012-04-19 19:17:30 -07:00
core.c driver-core: extend dev_printk() to pass structured data 2012-05-07 17:12:03 -07:00
cpu.c sched: Remove stale power aware scheduling remnants and dysfunctional knobs 2012-05-17 13:48:56 +02:00
dd.c Make wait_for_device_probe() also do scsi_complete_async_scans() 2012-07-18 18:15:46 -07:00
devres.c devres: Add devres_release() 2012-05-04 16:33:16 -07:00
devtmpfs.c devtmpfs: fix 'the the' typo 2012-04-18 15:37:35 -07:00
dma-buf.c dma-buf updates for 3.5 2012-05-25 09:37:26 -07:00
dma-coherent.c common: add dma_mmap_from_coherent() function 2012-05-21 15:06:09 +02:00
dma-contiguous.c drivers: add Contiguous Memory Allocator 2012-05-21 15:09:37 +02:00
dma-mapping.c common: dma-mapping: introduce dma_get_sgtable() function 2012-07-30 12:25:46 +02:00
driver.c Driver Core: don't oops with unregistered driver in driver_find_device() 2012-05-14 08:46:01 -07:00
firmware.c
firmware_class.c firmware_class: Move request_firmware_nowait() to workqueues 2012-03-28 23:31:00 +02:00
hypervisor.c
init.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
isa.c
Kconfig drivers: add Contiguous Memory Allocator 2012-05-21 15:09:37 +02:00
Makefile drivers: add Contiguous Memory Allocator 2012-05-21 15:09:37 +02:00
map.c
memory.c Linux 3.3-rc7 2012-03-14 07:44:11 +01:00
module.c
node.c mm: fix off-by-one bug in print_nodes_state() 2012-05-29 16:22:19 -07:00
platform.c drivercore: Output common devicetree information in uevent 2012-02-01 14:26:30 -07:00
soc.c mode_t whack-a-mole: ->is_visible() returns umode_t... 2012-05-29 23:28:42 -04:00
syscore.c
topology.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
transport_class.c