public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH -mm 5/7] powerpc: use generic pci_set_dma_mask and pci_set_consistent_dma_mask
Date: Mon, 15 Feb 2010 10:36:40 +1100	[thread overview]
Message-ID: <1266190600.16346.74.camel@pasglop> (raw)
In-Reply-To: <1265967212-9126-6-git-send-email-fujita.tomonori@lab.ntt.co.jp>

On Fri, 2010-02-12 at 18:33 +0900, FUJITA Tomonori wrote:
> This converts powerpc to use the generic pci_set_dma_mask and
> pci_set_consistent_dma_mask (drivers/pci/pci.c).
> 
> The generic pci_set_dma_mask does what powerpc's pci_set_dma_mask
> does.
> 
> Unlike powerpc's pci_set_consistent_dma_mask, the gneric
> pci_set_consistent_dma_mask sets only coherent_dma_mask. It doesn't
> work for powerpc? pci_set_consistent_dma_mask API should set only
> coherent_dma_mask?

I don't know why we do it that way, your patch looks correct to me, if
we have a driver bug assuming it does both masks at once, then we'll
fix it.

Do you need me to merge that via powerpc.git or are you happy to carry
it with the rest of your PCI DMA changes ?

> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>  arch/powerpc/include/asm/dma-mapping.h |    3 ---
>  arch/powerpc/kernel/pci-common.c       |   15 ---------------
>  2 files changed, 0 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
> index 80a973b..c85ef23 100644
> --- a/arch/powerpc/include/asm/dma-mapping.h
> +++ b/arch/powerpc/include/asm/dma-mapping.h
> @@ -127,9 +127,6 @@ static inline int dma_supported(struct device *dev, u64 mask)
>  	return dma_ops->dma_supported(dev, mask);
>  }
>  
> -/* We have our own implementation of pci_set_dma_mask() */
> -#define HAVE_ARCH_PCI_SET_DMA_MASK
> -
>  static inline int dma_set_mask(struct device *dev, u64 dma_mask)
>  {
>  	struct dma_map_ops *dma_ops = get_dma_ops(dev);
> diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
> index cadbed6..a8bc6f2 100644
> --- a/arch/powerpc/kernel/pci-common.c
> +++ b/arch/powerpc/kernel/pci-common.c
> @@ -63,21 +63,6 @@ struct dma_map_ops *get_pci_dma_ops(void)
>  }
>  EXPORT_SYMBOL(get_pci_dma_ops);
>  
> -int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
> -{
> -	return dma_set_mask(&dev->dev, mask);
> -}
> -
> -int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
> -{
> -	int rc;
> -
> -	rc = dma_set_mask(&dev->dev, mask);
> -	dev->dev.coherent_dma_mask = dev->dma_mask;
> -
> -	return rc;
> -}
> -
>  struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
>  {
>  	struct pci_controller *phb;



  reply	other threads:[~2010-02-14 23:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12  9:33 [PATCH -mm 0/7] transforming the PCI DMA API into the generic device model FUJITA Tomonori
2010-02-12  9:33 ` [PATCH -mm 1/7] sparc: unify 32bit and 64bit dma_set_mask FUJITA Tomonori
2010-02-13  1:09   ` David Miller
2010-02-12  9:33 ` [PATCH -mm 2/7] alpha: use include/linux/pci-dma-compat.h FUJITA Tomonori
2010-02-12  9:33 ` [PATCH -mm 3/7] pci: convert pci_set_dma_mask to call dma_set_mask FUJITA Tomonori
2010-02-14 23:33   ` Benjamin Herrenschmidt
2010-02-12  9:33 ` [PATCH -mm 4/7] dma-mapping.h: add dma_set_coherent_mask FUJITA Tomonori
2010-02-12  9:33 ` [PATCH -mm 5/7] powerpc: use generic pci_set_dma_mask and pci_set_consistent_dma_mask FUJITA Tomonori
2010-02-14 23:36   ` Benjamin Herrenschmidt [this message]
2010-02-15  1:57     ` FUJITA Tomonori
2010-02-15  2:41       ` Benjamin Herrenschmidt
2010-02-12  9:33 ` [PATCH -mm 6/7] arm: " FUJITA Tomonori
2010-02-12 15:01   ` Russell King - ARM Linux
2010-02-12  9:33 ` [PATCH -mm 7/7] pci: move pci_set_dma_mask and pci_set_consistent_dma_mask to pci-dma-compat.h FUJITA Tomonori
2010-03-03  2:29   ` Andrew Morton
2010-03-03  2:58     ` FUJITA Tomonori
2010-03-03 16:23       ` Jesse Barnes

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=1266190600.16346.74.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@vger.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