* phram/slram
@ 2004-10-14 17:08 Manfred Gruber
2004-10-15 6:58 ` phram/slram Michal Schulz
0 siblings, 1 reply; 5+ messages in thread
From: Manfred Gruber @ 2004-10-14 17:08 UTC (permalink / raw)
To: linux-mtd
hi !
I have a 2MB nvram on my ARM board.
slram and phram driver is possible to load and nvram works.
but phram driver is very slow (needs 20 seconds to load on insmod), slram is
fast. does anyone know why ?
another question is i have changed in this drivers for a default erase size to
get a jffs2 fs running on this. i know that it is not the right way to use a
flash fs on ram but another fs was not possible to run (ext2).
is it correct to use a fs on ram chips? i will do this because then i have not
to change my application :-)
thanks for comments regards
manfred
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: phram/slram
2004-10-14 17:08 phram/slram Manfred Gruber
@ 2004-10-15 6:58 ` Michal Schulz
0 siblings, 0 replies; 5+ messages in thread
From: Michal Schulz @ 2004-10-15 6:58 UTC (permalink / raw)
To: Manfred Gruber; +Cc: linux-mtd
On Thu, 14 Oct 2004, Manfred Gruber wrote:
> another question is i have changed in this drivers for a default erase size to
> get a jffs2 fs running on this. i know that it is not the right way to use a
> flash fs on ram but another fs was not possible to run (ext2).
why couldn't you use ext2? It works without any problems with slram
> is it correct to use a fs on ram chips? i will do this because then i have not
> to change my application :-)
http://hedera.linuxnews.pl/_news/2002/09/03/_long/1445.html
--
Michal Schulz
^ permalink raw reply [flat|nested] 5+ messages in thread
* phram/slram
@ 2004-10-15 13:05 Jörn Engel
2004-10-18 7:06 ` phram/slram Manfred Gruber
0 siblings, 1 reply; 5+ messages in thread
From: Jörn Engel @ 2004-10-15 13:05 UTC (permalink / raw)
To: linux-mtd
Sorry, I wasn't subscribed to the list for a while.
Regarding your insmod problems with phram, I cannot reproduce that on
my notebook. What's your kernel? Any patches on it?
Jörn
--
He who knows others is wise.
He who knows himself is enlightened.
-- Lao Tsu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: phram/slram
2004-10-15 13:05 phram/slram Jörn Engel
@ 2004-10-18 7:06 ` Manfred Gruber
2004-10-18 13:32 ` phram/slram Jörn Engel
0 siblings, 1 reply; 5+ messages in thread
From: Manfred Gruber @ 2004-10-18 7:06 UTC (permalink / raw)
To: Jörn Engel; +Cc: linux-mtd
Am Freitag, 15. Oktober 2004 15:05 schrieben Sie:
> Sorry, I wasn't subscribed to the list for a while.
>
> Regarding your insmod problems with phram, I cannot reproduce that on
> my notebook. What's your kernel? Any patches on it?
>
> Jörn
2.6.9 -rc1. When none have the same problem with phram. Than it is a problem
on my arm board :-(
thanks regards manfred
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: phram/slram
2004-10-18 7:06 ` phram/slram Manfred Gruber
@ 2004-10-18 13:32 ` Jörn Engel
0 siblings, 0 replies; 5+ messages in thread
From: Jörn Engel @ 2004-10-18 13:32 UTC (permalink / raw)
To: Manfred Gruber; +Cc: linux-mtd
On Mon, 18 October 2004 09:06:07 +0200, Manfred Gruber wrote:
>
> 2.6.9 -rc1. When none have the same problem with phram. Than it is a problem
> on my arm board :-(
Most people have problems with neither phram or slram working. Below
is a patch for 2.6.8 (should still apply with -rc1) that fixes the
problem.
Will send it to akpm when 2.6.9 is out.
Jörn
--
It's not whether you win or lose, it's how you place the blame.
-- unknown
Finally make phram work again:
o Add simple usage example.
o Fix up unit handling (k, M. G).
o Use correct size limit for setup string.
o Remove pointless printk message.
o Fix mtdblock to not allocate a read-modify-write buffer for CAP_RAM
devices (and fail to do so, returning an error).
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
---
devices/phram.c | 10 ++++++----
mtdblock.c | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
--- linux-2.6.8cow/drivers/mtd/devices/phram.c~phram_fix 2004-09-05 11:57:14.000000000 +0200
+++ linux-2.6.8cow/drivers/mtd/devices/phram.c 2004-09-05 11:58:00.000000000 +0200
@@ -18,6 +18,9 @@
* by "k", "M" or "G", the numbers will be interpreted as kilo, mega or
* gigabytes.
*
+ * Example:
+ * phram=swap,896M,110M phram=test,1006M,1M
+ *
*/
#include <asm/io.h>
@@ -184,7 +187,7 @@
result *= 1024;
case 'k':
result *= 1024;
- endp++;
+ (*endp)++;
}
return result;
}
@@ -235,7 +238,7 @@
uint32_t len;
int i, ret;
- if (strnlen(val, sizeof(str)) >= sizeof(str))
+ if (strnlen(val, sizeof(buf)) >= sizeof(buf))
parse_err("parameter too long\n");
strcpy(str, val);
@@ -283,7 +286,7 @@
if (!val || !val[0])
parse_err("no arguments to \"slram=\"\n");
- if (strnlen(val, sizeof(str)) >= sizeof(str))
+ if (strnlen(val, sizeof(buf)) >= sizeof(buf))
parse_err("parameter too long\n");
strcpy(str, val);
@@ -342,7 +345,6 @@
int __init init_phram(void)
{
- printk(KERN_ERR "phram loaded\n");
return 0;
}
--- linux-2.6.8cow/drivers/mtd/mtdblock.c~phram_fix 2004-09-05 11:57:14.000000000 +0200
+++ linux-2.6.8cow/drivers/mtd/mtdblock.c 2004-09-05 11:58:00.000000000 +0200
@@ -248,7 +248,7 @@
unsigned long block, char *buf)
{
struct mtdblk_dev *mtdblk = mtdblks[dev->devnum];
- if (unlikely(!mtdblk->cache_data)) {
+ if (unlikely(!mtdblk->cache_data && mtdblk->cache_size)) {
mtdblk->cache_data = vmalloc(mtdblk->mtd->erasesize);
if (!mtdblk->cache_data)
return -EINTR;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-18 13:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15 13:05 phram/slram Jörn Engel
2004-10-18 7:06 ` phram/slram Manfred Gruber
2004-10-18 13:32 ` phram/slram Jörn Engel
-- strict thread matches above, loose matches on Subject: below --
2004-10-14 17:08 phram/slram Manfred Gruber
2004-10-15 6:58 ` phram/slram Michal Schulz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox