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

Commit 4692d77f authored by Alessandro Rubini's avatar Alessandro Rubini Committed by H. Peter Anvin
Browse files

x86-32: Introduce CONFIG_X86_DEV_DMA_OPS



32-bit x86 systems may need their own DMA operations, so add
a new config option, which is turned on for 64-bit systems. This
patch has no functional effect but it paves the way for supporting
the STA2x11 I/O Hub and possibly other chips.

Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
Link: http://lkml.kernel.org/r/f79fcc1a2e17ef942e1b798b92aac43a80202532.1333560789.git.rubini@gnudd.com


Acked-by: default avatarGiancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 00341028
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ config X86_32

config X86_64
	def_bool 64BIT
	select X86_DEV_DMA_OPS

### Arch settings
config X86
@@ -2215,6 +2216,10 @@ config HAVE_TEXT_POKE_SMP
	bool
	select STOP_MACHINE if SMP

config X86_DEV_DMA_OPS
	bool
	depends on X86_64

source "net/Kconfig"

source "drivers/Kconfig"
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ struct dev_archdata {
#ifdef CONFIG_ACPI
	void	*acpi_handle;
#endif
#ifdef CONFIG_X86_64
#ifdef CONFIG_X86_DEV_DMA_OPS
	struct dma_map_ops *dma_ops;
#endif
#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ extern struct dma_map_ops *dma_ops;

static inline struct dma_map_ops *get_dma_ops(struct device *dev)
{
#ifdef CONFIG_X86_32
#ifndef CONFIG_X86_DEV_DMA_OPS
	return dma_ops;
#else
	if (unlikely(!dev) || !dev->archdata.dma_ops)