Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18e98307 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Linus Torvalds
Browse files

asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()



There are only two ways to define sg_dma_len(); use sg->dma_length or
sg->length.  This patch introduces NEED_SG_DMA_LENGTH that enables
architectures to choose sg->dma_length or sg->length.

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 204f3a04
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -56,6 +56,9 @@ config MMU
config NEED_DMA_MAP_STATE
	def_bool y

config NEED_SG_DMA_LENGTH
	def_bool y

config SWIOTLB
       bool

+3 −0
Original line number Diff line number Diff line
@@ -186,6 +186,9 @@ config DMA_NONCOHERENT
config NEED_DMA_MAP_STATE
	def_bool DMA_NONCOHERENT

config NEED_SG_DMA_LENGTH
	def_bool y

source "init/Kconfig"

source "kernel/Kconfig.freezer"
+3 −0
Original line number Diff line number Diff line
@@ -133,6 +133,9 @@ config ZONE_DMA
config NEED_DMA_MAP_STATE
	def_bool y

config NEED_SG_DMA_LENGTH
	def_bool y

config GENERIC_ISA_DMA
	bool
	default y if SPARC32
+0 −2
Original line number Diff line number Diff line
#ifndef _SPARC_SCATTERLIST_H
#define _SPARC_SCATTERLIST_H

#define sg_dma_len(sg)     	((sg)->dma_length)

#define ISA_DMA_THRESHOLD	(~0UL)

#include <asm-generic/scatterlist.h>
+3 −0
Original line number Diff line number Diff line
@@ -109,6 +109,9 @@ config SBUS
config NEED_DMA_MAP_STATE
       def_bool (X86_64 || DMAR || DMA_API_DEBUG)

config NEED_SG_DMA_LENGTH
	def_bool X86_64

config GENERIC_ISA_DMA
	def_bool y

Loading