All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Crispin <blogic@openwrt.org>
To: dedekind1@gmail.com
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, Ralph Hempel <ralph.hempel@lantiq.com>,
	linux-mtd@lists.infradead.org,
	Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH V5 06/10] MIPS: lantiq: add NOR flash support
Date: Mon, 04 Apr 2011 15:36:52 +0200	[thread overview]
Message-ID: <4D99C974.5060800@openwrt.org> (raw)
In-Reply-To: <1301661832.2789.56.camel@localhost>

Hi Artem

thanks for the feedback, comments inline
>
>> +ltq_copy_from(struct map_info *map, void *to,
>> +	unsigned long from, ssize_t len)
>> +{
>> +	unsigned char *f = (unsigned char *) (map->virt + from);
>> +	unsigned char *t = (unsigned char *) to;
>> +	unsigned long flags;
>> +
>> +	spin_lock_irqsave(&ebu_lock, flags);
>> +	while (len--)
>> +		*t++ = *f++;
>> +	spin_unlock_irqrestore(&ebu_lock, flags);
>>     
> Can you use memcpy here instead?
>
>   

as we are copying to/from iomem, we cannot use memcpy as the
pre-fetching breaks the copy process. the normal alternative is to use
memcpy_to/fromio, however on MIPS this breaks down to a normal memcpy.

i will fold your comments into the patch and resend it ASAP

thanks, John

WARNING: multiple messages have this Message-ID (diff)
From: John Crispin <blogic@openwrt.org>
To: dedekind1@gmail.com
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>,
	Ralph Hempel <ralph.hempel@lantiq.com>,
	linux-mtd@lists.infradead.org,
	Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH V5 06/10] MIPS: lantiq: add NOR flash support
Date: Mon, 04 Apr 2011 15:36:52 +0200	[thread overview]
Message-ID: <4D99C974.5060800@openwrt.org> (raw)
In-Reply-To: <1301661832.2789.56.camel@localhost>

Hi Artem

thanks for the feedback, comments inline
>
>> +ltq_copy_from(struct map_info *map, void *to,
>> +	unsigned long from, ssize_t len)
>> +{
>> +	unsigned char *f = (unsigned char *) (map->virt + from);
>> +	unsigned char *t = (unsigned char *) to;
>> +	unsigned long flags;
>> +
>> +	spin_lock_irqsave(&ebu_lock, flags);
>> +	while (len--)
>> +		*t++ = *f++;
>> +	spin_unlock_irqrestore(&ebu_lock, flags);
>>     
> Can you use memcpy here instead?
>
>   

as we are copying to/from iomem, we cannot use memcpy as the
pre-fetching breaks the copy process. the normal alternative is to use
memcpy_to/fromio, however on MIPS this breaks down to a normal memcpy.

i will fold your comments into the patch and resend it ASAP

thanks, John

  reply	other threads:[~2011-04-04 13:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30  7:27 [PATCH V5 00/10] MIPS: lantiq: add initial support for Lantiq SoCs John Crispin
2011-03-30  7:27 ` [PATCH V5 01/10] " John Crispin
2011-03-31 13:01   ` Ralf Baechle
2011-03-31 13:35     ` John Crispin
2011-03-30  7:27 ` [PATCH V5 02/10] MIPS: lantiq: add SoC specific code for XWAY family John Crispin
2011-03-31 13:01   ` Ralf Baechle
2011-03-30  7:27 ` [PATCH V5 03/10] MIPS: lantiq: add PCI controller support John Crispin
2011-03-31 13:01   ` Ralf Baechle
2011-03-30  7:27 ` [PATCH V5 04/10] MIPS: lantiq: add serial port support John Crispin
2011-03-30  9:33   ` Alan Cox
2011-03-30  7:27 ` [PATCH V5 05/10] MIPS: lantiq: add watchdog support John Crispin
2011-03-30  9:36   ` Wim Van Sebroeck
2011-03-30  9:41     ` John Crispin
2011-04-04  9:24     ` John Crispin
2011-04-07 14:31   ` Sergei Shtylyov
2011-03-30  7:27 ` [PATCH V5 06/10] MIPS: lantiq: add NOR flash support John Crispin
2011-03-30  7:27   ` John Crispin
2011-04-01 12:43   ` Artem Bityutskiy
2011-04-01 12:43     ` Artem Bityutskiy
2011-04-04 13:36     ` John Crispin [this message]
2011-04-04 13:36       ` John Crispin
2011-04-04 14:07       ` Artem Bityutskiy
2011-04-04 14:07         ` Artem Bityutskiy
2011-03-30  7:27 ` [PATCH V5 07/10] MIPS: lantiq: add platform device support John Crispin
2011-03-31 13:01   ` Ralf Baechle
2011-03-30  7:27 ` [PATCH V5 08/10] MIPS: lantiq: add mips_machine support John Crispin
2011-03-31 13:01   ` Ralf Baechle
2011-03-30  7:27 ` [PATCH V5 09/10] MIPS: lantiq: add machtypes for lantiq eval kits John Crispin
2011-03-31 13:02   ` Ralf Baechle
2011-03-30  7:27 ` [PATCH V5 10/10] MIPS: lantiq: add more gpio drivers John Crispin
2011-03-31 13:02   ` Ralf Baechle

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=4D99C974.5060800@openwrt.org \
    --to=blogic@openwrt.org \
    --cc=daniel.schwierzeck@googlemail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ralf@linux-mips.org \
    --cc=ralph.hempel@lantiq.com \
    /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.