public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Wojciech Kromer <krom@dgt-lab.com.pl>
To: mtd <linux-mtd@lists.infradead.org>
Subject: Re: JFFS2 on 8MB Flash-Chip conneted to MPC850 works extremly slow:(
Date: Mon, 03 Sep 2001 14:19:03 +0200	[thread overview]
Message-ID: <3B937537.D636406C@dgt-lab.com.pl> (raw)
In-Reply-To: 25302.999077097@redhat.com

>
> It won't make your mount any faster. You have a sane CPU which can handle
> having both a cached and uncached mapping of a physical region - try doing
> that in your map driver (see ocelot.c for inspiration) and see if it helps.
>

OK, now I'm testing the ocelot's trick. But I do not understand it.

........................

        ocelot_flash_map.map_priv_1 =
        (unsigned long)ioremap_nocache(FLASH_WINDOW_ADDR, FLASH_WINDOW_SIZE);

        ocelot_flash_map.map_priv_2 =
         (unsigned long)__ioremap(FLASH_WINDOW_ADDR, FLASH_WINDOW_SIZE, 0);

^^^^^^^^ so we have chached version in map_priv_2

..........................


__u8 ocelot_read8(struct map_info *map, unsigned long ofs)
{
        return __raw_readb(map->map_priv_1 + ofs);
}

void ocelot_write8(struct map_info *map, __u8 d, unsigned long adr)
{
        cacheflush = 1;
        __raw_writeb(d, map->map_priv_1 + adr);
        mb();
}

^^^^^ and now we're using uncached version for reading and wrining
!!!!!!!!!!!!!!!!!!!!!!!!! ?????????????????

void ocelot_copy_from_cache(struct map_info *map, void *to, unsigned long from,
ss
{
        if (cacheflush) {
                dma_cache_inv(map->map_priv_2, map->size);
                cacheflush = 0;
        }
        memcpy_fromio(to, map->map_priv_1 + from, len);
}

^^^^^^^ and flushing chache after some writes !!!! ???


Q1 What is cahed version usef for?
Q2 Is it a bug?


--
* * * * * * * * * * * *
* per pedes ad astra! *
* * * * * * * * * * * *    mailto:krom@dgt-lab.com.pl

  parent reply	other threads:[~2001-09-03 12:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-28 11:59 JFFS2 on 8MB Flash-Chip conneted to MPC850 works extremly slow :( Wojciech Kromer
2001-08-28 15:53 ` Russ Dill
2001-08-29  6:07   ` Wojciech Kromer
2001-08-29  7:17     ` Russ Dill
2001-08-29  7:46       ` JFFS2 on 8MB Flash-Chip conneted to MPC850 works extremly slow:( Wojciech Kromer
2001-08-29  8:36         ` Russ Dill
2001-08-29  8:55           ` David Woodhouse
2001-08-29  9:17             ` Wojciech Kromer
2001-08-29  9:24               ` David Woodhouse
2001-08-29 10:15                 ` Joakim Tjernlund
2001-08-29 10:19                   ` David Woodhouse
2001-09-03 12:19                 ` Wojciech Kromer [this message]
2001-09-03 12:26                   ` David Woodhouse
     [not found]                     ` <4189.999520431@redhat.com>
2001-09-03 12:42                       ` Wojciech Kromer
2001-09-05  8:19                         ` Wojciech Kromer
2001-09-05  8:29                           ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2001-09-06 14:29 JFFS2 on 8MB Flash-Chip conneted to MPC850 works extremly slo w:( Jonas Holmberg
2001-09-07  7:33 ` JFFS2 on 8MB Flash-Chip conneted to MPC850 works extremly slow:( Wojciech Kromer
2001-09-07  8:10   ` David Woodhouse
2001-09-07  8:33     ` Wojciech Kromer
2001-09-07 13:26       ` Wojciech Kromer

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=3B937537.D636406C@dgt-lab.com.pl \
    --to=krom@dgt-lab.com.pl \
    --cc=linux-mtd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox