From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
avictor.za@gmail.com, linux@arm.linux.org.uk,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MMC: at91_mci: modify cache flush routines
Date: Wed, 19 May 2010 13:04:54 +0200 [thread overview]
Message-ID: <4BF3C5D6.3010707@atmel.com> (raw)
In-Reply-To: <20100512141929.80c13953.akpm@linux-foundation.org>
Le 12/05/2010 23:19, Andrew Morton :
> On Tue, 11 May 2010 19:09:53 +0200
> Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
>
>> As we were using an internal dma flushing routine, this patch changes to the
>> DMA API flush_kernel_dcache_page(). Driver is able to compile now.
>>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>> ---
>> drivers/mmc/host/at91_mci.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
>> index a6dd7da..813d208 100644
>> --- a/drivers/mmc/host/at91_mci.c
>> +++ b/drivers/mmc/host/at91_mci.c
>> @@ -315,7 +315,7 @@ static void at91_mci_post_dma_read(struct at91mci_host *host)
>> }
>>
>> kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
>> - dmac_flush_range((void *)sgbuffer, ((void *)sgbuffer) + amount);
>> + flush_kernel_dcache_page(sg_page(sg));
>> data->bytes_xfered += amount;
>> if (size == 0)
>> break;
>
> The flush_kernel_dcache_page() documentation specifically says that
> thou shalt run flush_kernel_dcache_page() _prior_ to kunmapping the
> page.
>
> I don't know if that makes a difference in the real world, but heck why
> not:
>
> --- a/drivers/mmc/host/at91_mci.c~mmc-at91_mci-modify-cache-flush-routines-fix
> +++ a/drivers/mmc/host/at91_mci.c
> @@ -314,8 +314,8 @@ static void at91_mci_post_dma_read(struc
> dmabuf = (unsigned *)tmpv;
> }
>
> - kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
> flush_kernel_dcache_page(sg_page(sg));
> + kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
> data->bytes_xfered += amount;
> if (size == 0)
> break;
> _
Andrew, thanks a lot for folding this in my patch.
I had no access to my emails last days and it was good to learn that
this patch went to 2.6.34-final.
Best regards,
--
Nicolas Ferre
WARNING: multiple messages have this Message-ID (diff)
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] MMC: at91_mci: modify cache flush routines
Date: Wed, 19 May 2010 13:04:54 +0200 [thread overview]
Message-ID: <4BF3C5D6.3010707@atmel.com> (raw)
In-Reply-To: <20100512141929.80c13953.akpm@linux-foundation.org>
Le 12/05/2010 23:19, Andrew Morton :
> On Tue, 11 May 2010 19:09:53 +0200
> Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
>
>> As we were using an internal dma flushing routine, this patch changes to the
>> DMA API flush_kernel_dcache_page(). Driver is able to compile now.
>>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>> ---
>> drivers/mmc/host/at91_mci.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
>> index a6dd7da..813d208 100644
>> --- a/drivers/mmc/host/at91_mci.c
>> +++ b/drivers/mmc/host/at91_mci.c
>> @@ -315,7 +315,7 @@ static void at91_mci_post_dma_read(struct at91mci_host *host)
>> }
>>
>> kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
>> - dmac_flush_range((void *)sgbuffer, ((void *)sgbuffer) + amount);
>> + flush_kernel_dcache_page(sg_page(sg));
>> data->bytes_xfered += amount;
>> if (size == 0)
>> break;
>
> The flush_kernel_dcache_page() documentation specifically says that
> thou shalt run flush_kernel_dcache_page() _prior_ to kunmapping the
> page.
>
> I don't know if that makes a difference in the real world, but heck why
> not:
>
> --- a/drivers/mmc/host/at91_mci.c~mmc-at91_mci-modify-cache-flush-routines-fix
> +++ a/drivers/mmc/host/at91_mci.c
> @@ -314,8 +314,8 @@ static void at91_mci_post_dma_read(struc
> dmabuf = (unsigned *)tmpv;
> }
>
> - kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
> flush_kernel_dcache_page(sg_page(sg));
> + kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
> data->bytes_xfered += amount;
> if (size == 0)
> break;
> _
Andrew, thanks a lot for folding this in my patch.
I had no access to my emails last days and it was good to learn that
this patch went to 2.6.34-final.
Best regards,
--
Nicolas Ferre
next prev parent reply other threads:[~2010-05-19 11:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 13:11 arm926_dma_flush_range undefined! Nicolas Ferre
2010-05-06 14:07 ` Catalin Marinas
2010-05-06 17:59 ` Russell King - ARM Linux
2010-05-11 9:43 ` Nicolas Ferre
2010-05-11 9:44 ` Russell King - ARM Linux
2010-05-11 13:32 ` Nicolas Ferre
2010-05-11 13:44 ` Russell King - ARM Linux
2010-05-11 17:09 ` [PATCH] MMC: at91_mci: modify cache flush routines Nicolas Ferre
2010-05-11 17:09 ` Nicolas Ferre
2010-05-12 21:19 ` Andrew Morton
2010-05-12 21:19 ` Andrew Morton
2010-05-12 21:30 ` Russell King - ARM Linux
2010-05-12 21:30 ` Russell King - ARM Linux
2010-05-19 11:04 ` Nicolas Ferre [this message]
2010-05-19 11:04 ` Nicolas Ferre
2010-05-12 11:18 ` arm926_dma_flush_range undefined! Catalin Marinas
2010-05-12 18:42 ` Russell King - ARM Linux
2010-05-12 21:39 ` Catalin Marinas
2010-05-12 6:48 ` Wolfgang Mües
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=4BF3C5D6.3010707@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=akpm@linux-foundation.org \
--cc=avictor.za@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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.