public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Christoph Hellwig <hch@lst.de>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] x86/pci: Clean up usage of X86_DEV_DMA_OPS
Date: Wed, 10 Apr 2019 10:16:17 +0200	[thread overview]
Message-ID: <20190410081617.GA54229@gmail.com> (raw)
In-Reply-To: <20190410080220.21705-3-hch@lst.de>



(+Cc. Patch quoted below. Acked-by from an x86 perspective.)

* Christoph Hellwig <hch@lst.de> wrote:

> We have supported per-device dma_map_ops in generic code for a long
> time, and this symbol just guards the inclusion of the dma_map_ops
> registry used for vmd.  Stop enabling it for anything but vmd.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  arch/x86/Kconfig               | 3 ---
>  drivers/misc/mic/Kconfig       | 4 ++--
>  drivers/pci/controller/Kconfig | 1 +
>  drivers/pci/controller/vmd.c   | 7 -------
>  4 files changed, 3 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 38c62ff8a3f0..d8e2e6519a61 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -28,7 +28,6 @@ config X86_64
>  	select MODULES_USE_ELF_RELA
>  	select NEED_DMA_MAP_STATE
>  	select SWIOTLB
> -	select X86_DEV_DMA_OPS
>  	select ARCH_HAS_SYSCALL_WRAPPER
>  
>  #
> @@ -703,7 +702,6 @@ config STA2X11
>  	bool "STA2X11 Companion Chip Support"
>  	depends on X86_32_NON_STANDARD && PCI
>  	select ARCH_HAS_PHYS_TO_DMA
> -	select X86_DEV_DMA_OPS
>  	select SWIOTLB
>  	select MFD_STA2X11
>  	select GPIOLIB
> @@ -2877,7 +2875,6 @@ config HAVE_ATOMIC_IOMAP
>  
>  config X86_DEV_DMA_OPS
>  	bool
> -	depends on X86_64 || STA2X11
>  
>  config HAVE_GENERIC_GUP
>  	def_bool y
> diff --git a/drivers/misc/mic/Kconfig b/drivers/misc/mic/Kconfig
> index 242dcee14689..6736f72cc14a 100644
> --- a/drivers/misc/mic/Kconfig
> +++ b/drivers/misc/mic/Kconfig
> @@ -4,7 +4,7 @@ comment "Intel MIC Bus Driver"
>  
>  config INTEL_MIC_BUS
>  	tristate "Intel MIC Bus Driver"
> -	depends on 64BIT && PCI && X86 && X86_DEV_DMA_OPS
> +	depends on 64BIT && PCI && X86
>  	help
>  	  This option is selected by any driver which registers a
>  	  device or driver on the MIC Bus, such as CONFIG_INTEL_MIC_HOST,
> @@ -21,7 +21,7 @@ comment "SCIF Bus Driver"
>  
>  config SCIF_BUS
>  	tristate "SCIF Bus Driver"
> -	depends on 64BIT && PCI && X86 && X86_DEV_DMA_OPS
> +	depends on 64BIT && PCI && X86
>  	help
>  	  This option is selected by any driver which registers a
>  	  device or driver on the SCIF Bus, such as CONFIG_INTEL_MIC_HOST
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 6012f3059acd..011c57cae4b0 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -267,6 +267,7 @@ config PCIE_TANGO_SMP8759
>  
>  config VMD
>  	depends on PCI_MSI && X86_64 && SRCU
> +	select X86_DEV_DMA_OPS
>  	tristate "Intel Volume Management Device Driver"
>  	---help---
>  	  Adds support for the Intel Volume Management Device (VMD). VMD is a
> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> index cf6816b55b5e..999a5509e57e 100644
> --- a/drivers/pci/controller/vmd.c
> +++ b/drivers/pci/controller/vmd.c
> @@ -95,10 +95,8 @@ struct vmd_dev {
>  	struct irq_domain	*irq_domain;
>  	struct pci_bus		*bus;
>  
> -#ifdef CONFIG_X86_DEV_DMA_OPS
>  	struct dma_map_ops	dma_ops;
>  	struct dma_domain	dma_domain;
> -#endif
>  };
>  
>  static inline struct vmd_dev *vmd_from_bus(struct pci_bus *bus)
> @@ -293,7 +291,6 @@ static struct msi_domain_info vmd_msi_domain_info = {
>  	.chip		= &vmd_msi_controller,
>  };
>  
> -#ifdef CONFIG_X86_DEV_DMA_OPS
>  /*
>   * VMD replaces the requester ID with its own.  DMA mappings for devices in a
>   * VMD domain need to be mapped for the VMD, not the device requiring
> @@ -438,10 +435,6 @@ static void vmd_setup_dma_ops(struct vmd_dev *vmd)
>  	add_dma_domain(domain);
>  }
>  #undef ASSIGN_VMD_DMA_OPS
> -#else
> -static void vmd_teardown_dma_ops(struct vmd_dev *vmd) {}
> -static void vmd_setup_dma_ops(struct vmd_dev *vmd) {}
> -#endif
>  
>  static char __iomem *vmd_cfg_addr(struct vmd_dev *vmd, struct pci_bus *bus,
>  				  unsigned int devfn, int reg, int len)
> -- 
> 2.20.1
> 

  reply	other threads:[~2019-04-10  8:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10  8:02 two small DMA-related Kconfig cleanups for x86 Christoph Hellwig
2019-04-10  8:02 ` [PATCH 1/2] x86: Remove the unused X86_DMA_REMAP kconfig symbol Christoph Hellwig
2019-04-10  8:48   ` [tip:x86/cleanups] x86/Kconfig: Remove the unused X86_DMA_REMAP KConfig symbol tip-bot for Christoph Hellwig
2019-04-10  8:02 ` [PATCH 2/2] x86/pci: Clean up usage of X86_DEV_DMA_OPS Christoph Hellwig
2019-04-10  8:16   ` Ingo Molnar [this message]
2019-04-10 21:45     ` Bjorn Helgaas
2019-04-10 22:03       ` Derrick, Jonathan
2019-04-11  5:18       ` Christoph Hellwig
2019-04-11 13:35         ` Bjorn Helgaas
2019-04-24  5:38           ` Christoph Hellwig
2019-04-24 11:12             ` Ingo Molnar
2019-04-24 12:37   ` [tip:x86/cleanups] " tip-bot for Christoph Hellwig

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=20190410081617.GA54229@gmail.com \
    --to=mingo@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=x86@kernel.org \
    /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