All of lore.kernel.org
 help / color / mirror / Atom feed
From: mike@compulab.co.il (Mike Rapoport)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] [ARM] Remove now unnecessary dma_needs_bounce()
Date: Mon, 21 Jun 2010 08:38:04 +0300	[thread overview]
Message-ID: <4C1EFABC.4020601@compulab.co.il> (raw)
In-Reply-To: <AANLkTilJ3UpyHEplDqS_nV8SVDcl_pRRn4glDn7JS1GW@mail.gmail.com>

Eric

Eric Miao wrote:
> On Sat, Jun 5, 2010 at 3:55 PM, Eric Miao <eric.y.miao@gmail.com> wrote:
>> With a correct dev->dma_mask before calling dmabounce_register_dev(),
>> dma_needs_bounce() is not necessary.
>>
>> The above is true for it8152.c and ixp4xx/common-pci.c.
>>
>> The sa1111, though, is a bit complicated. Until it's fully understood
>> and fixed, dma_needs_bounce() for sa1111 is kept if CONFIG_SA1111 is
>> enabled with no side effect (with the condition of machine_is_*)
>>
> 
> Sorry I forgot to CC you two. Any feedback is welcome, thanks.

Can I pull these changes from your git tree?

>> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
>> ---
>>  arch/arm/common/it8152.c           |    8 --------
>>  arch/arm/include/asm/dma-mapping.h |    7 +++++++
>>  arch/arm/mach-ixp4xx/common-pci.c  |    5 -----
>>  3 files changed, 7 insertions(+), 13 deletions(-)
>>
>> diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
>> index 7974baa..6c09135 100644
>> --- a/arch/arm/common/it8152.c
>> +++ b/arch/arm/common/it8152.c
>> @@ -263,14 +263,6 @@ static int it8152_pci_platform_notify_remove(struct device *dev)
>>        return 0;
>>  }
>>
>> -int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
>> -{
>> -       dev_dbg(dev, "%s: dma_addr %08x, size %08x\n",
>> -               __func__, dma_addr, size);
>> -       return (dev->bus == &pci_bus_type) &&
>> -               ((dma_addr + size - PHYS_OFFSET) >= SZ_64M);
>> -}
>> -
>>  int __init it8152_pci_setup(int nr, struct pci_sys_data *sys)
>>  {
>>        it8152_io.start = IT8152_IO_BASE + 0x12000;
>> diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
>> index 69ce072..c80d4d2 100644
>> --- a/arch/arm/include/asm/dma-mapping.h
>> +++ b/arch/arm/include/asm/dma-mapping.h
>> @@ -298,7 +298,14 @@ extern void dmabounce_unregister_dev(struct device *);
>>  * DMA access and 1 if the buffer needs to be bounced.
>>  *
>>  */
>> +#ifdef CONFIG_SA1111
>>  extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
>> +#else
>> +static inline int dma_needs_bounce(struct device*, dma_addr_t, size_t)
>> +{
>> +       return 0;
>> +}
>> +#endif
>>
>>  /*
>>  * The DMA API, implemented by dmabounce.c.  See below for descriptions.
>> diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
>> index e318153..c7aa0ac 100644
>> --- a/arch/arm/mach-ixp4xx/common-pci.c
>> +++ b/arch/arm/mach-ixp4xx/common-pci.c
>> @@ -337,11 +337,6 @@ static int ixp4xx_pci_platform_notify_remove(struct device *dev)
>>        return 0;
>>  }
>>
>> -int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
>> -{
>> -       return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M);
>> -}
>> -
>>  /*
>>  * Only first 64MB of memory can be accessed via PCI.
>>  * We use GFP_DMA to allocate safe buffers to do map/unmap.
>> --
>> 1.7.0.4
>>
>>


-- 
Sincerely yours,
Mike.

  reply	other threads:[~2010-06-21  5:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-05  7:55 [PATCH 0/4] [ARM] Reduce the defconfig numbers for PXA Eric Miao
2010-06-05  7:55 ` [PATCH 1/4] [ARM] Remove now unnecessary dma_needs_bounce() Eric Miao
2010-06-18  4:03   ` Eric Miao
2010-06-21  5:38     ` Mike Rapoport [this message]
2010-06-21 15:22       ` Eric Miao
2010-06-22  7:38         ` Mike Rapoport
2010-06-22  7:52           ` Eric Miao
2010-06-05  7:55 ` [PATCH 2/4] [ARM] pxa: merge all pxa2xx board configs into pxa2xx_defconfig Eric Miao
2010-06-05  8:03   ` Eric Miao
2010-06-05  8:04     ` Eric Miao
2010-06-05  7:55 ` [PATCH 3/4] [ARM] pxa: merge all pxa3xx board configs into pxa3xx_defconfig Eric Miao
2010-06-05  8:04   ` Eric Miao
2010-06-05  7:55 ` [PATCH 4/4] [ARM] pxa: merge {corgi, spitz}_defconfig into zaurus_defconfig Eric Miao
2010-06-05  8:05   ` [PATCH 4/4] [ARM] pxa: merge {corgi,spitz}_defconfig " Eric Miao

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=4C1EFABC.4020601@compulab.co.il \
    --to=mike@compulab.co.il \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.