| To: | John Crispin <blogic@openwrt.org> |
|---|---|
| Subject: | Re: [PATCH V5 06/10] MIPS: lantiq: add NOR flash support |
| From: | Artem Bityutskiy <dedekind1@gmail.com> |
| Date: | Mon, 04 Apr 2011 17:07:25 +0300 |
| 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> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:reply-to:to:cc:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=kCmM27D4tp2kTmrFuEyuhe399TUQzmE8LNR3lwtlzeQ=; b=N9YU73bt5YVcww1RlhLCa/4gaqnZp7lR1i1AIrQcerYIJCbDv+vCH89KEWYLCWTar2 Twixj9yqVfvAaiTY+ijkUxwplCiz2OOX37sRpey+WJZicpXF86S1eu4ILGBJsgL62Q08 qm/5nIGDzm/+1Rw/j+bNgX9DIcd/VircF9Pkc= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; b=xLgssEPxubnIEStvKJklxbD8HjyUEUFKe1x+pYn/FJGI/14EsX7UeORIvGdKjP/bMK vwOiyk/wm0oJ5/JJ+nxEqEX+VumkCIq0F8jhyh3L92/3NK8Y8yP4uGatZn1TSFKqCbyJ QNAVFZ3VDMXA8V5jyhU7lGnco+b/wZjphOdp0= |
| In-reply-to: | <4D99C974.5060800@openwrt.org> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <1301470076-17279-1-git-send-email-blogic@openwrt.org> <1301470076-17279-7-git-send-email-blogic@openwrt.org> <1301661832.2789.56.camel@localhost> <4D99C974.5060800@openwrt.org> |
| Reply-to: | dedekind1@gmail.com |
| Sender: | linux-mips-bounce@linux-mips.org |
On Mon, 2011-04-04 at 15:36 +0200, John Crispin wrote:
> >> +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.
Would be nice to have this comment in the code to make life of those who
reads it a bit easier.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH V5 06/10] MIPS: lantiq: add NOR flash support, John Crispin |
|---|---|
| Next by Date: | Re: System suffers frequent TLB miss, Jayachandran C. |
| Previous by Thread: | Re: [PATCH V5 06/10] MIPS: lantiq: add NOR flash support, John Crispin |
| Next by Thread: | System suffers frequent TLB miss, wilbur.chan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |