From: tip-bot for Alessandro Rubini <rubini@gnudd.com>
To: linux-tip-commits@vger.kernel.org
Cc: alan@linux.intel.com, linux-kernel@vger.kernel.org,
hpa@zytor.com, mingo@kernel.org, rubini@gnudd.com,
tglx@linutronix.de, giancarlo.asnaghi@st.com
Subject: [tip:x86/platform] x86-32: Introduce CONFIG_X86_DEV_DMA_OPS
Date: Thu, 12 Apr 2012 12:41:00 -0700 [thread overview]
Message-ID: <tip-4692d77fc3c8978a36406a3cf9e8b899f86f68f1@git.kernel.org> (raw)
In-Reply-To: <f79fcc1a2e17ef942e1b798b92aac43a80202532.1333560789.git.rubini@gnudd.com>
Commit-ID: 4692d77fc3c8978a36406a3cf9e8b899f86f68f1
Gitweb: http://git.kernel.org/tip/4692d77fc3c8978a36406a3cf9e8b899f86f68f1
Author: Alessandro Rubini <rubini@gnudd.com>
AuthorDate: Wed, 4 Apr 2012 19:39:58 +0200
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Thu, 12 Apr 2012 11:09:56 -0700
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: Alessandro Rubini <rubini@gnudd.com>
Link: http://lkml.kernel.org/r/f79fcc1a2e17ef942e1b798b92aac43a80202532.1333560789.git.rubini@gnudd.com
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/Kconfig | 5 +++++
arch/x86/include/asm/device.h | 4 ++--
arch/x86/include/asm/dma-mapping.h | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1d14cc6..07b412a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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"
diff --git a/arch/x86/include/asm/device.h b/arch/x86/include/asm/device.h
index 63a2a03..93e1c55 100644
--- a/arch/x86/include/asm/device.h
+++ b/arch/x86/include/asm/device.h
@@ -5,8 +5,8 @@ struct dev_archdata {
#ifdef CONFIG_ACPI
void *acpi_handle;
#endif
-#ifdef CONFIG_X86_64
-struct dma_map_ops *dma_ops;
+#ifdef CONFIG_X86_DEV_DMA_OPS
+ struct dma_map_ops *dma_ops;
#endif
#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
void *iommu; /* hook for IOMMU specific extension */
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index 4b4331d..09aa473 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -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)
next prev parent reply other threads:[~2012-04-12 19:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 17:39 [PATCH V5 0/3] STA2X11: patches for pci bridge support Alessandro Rubini
2012-04-04 17:39 ` [PATCH V5 1/3] x86: introduce CONFIG_X86_DEV_DMA_OPS Alessandro Rubini
2012-04-12 19:41 ` tip-bot for Alessandro Rubini [this message]
2012-04-04 17:40 ` [PATCH V5 2/3] x86: introduce CONFIG_X86_DMA_REMAP Alessandro Rubini
2012-04-12 19:41 ` [tip:x86/platform] x86: Introduce CONFIG_X86_DMA_REMAP tip-bot for Alessandro Rubini
2012-04-04 17:40 ` [PATCH V5 3/3] x86/PCI: initial support for sta2x11 I/O hub Alessandro Rubini
2012-04-12 19:43 ` [tip:x86/platform] x86, platform: Initial support for sta2x11 I/ O hub tip-bot for Alessandro Rubini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-4692d77fc3c8978a36406a3cf9e8b899f86f68f1@git.kernel.org \
--to=rubini@gnudd.com \
--cc=alan@linux.intel.com \
--cc=giancarlo.asnaghi@st.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome