Thanks for reply David,
I'm talking about JFFS filesystem
i'm not writing full fledged driver for flash. I have a x86 based board
where access to Flash is through CPLD(Complex Programming Logic Device),
which is board specific and linux does not support it. so i have just
defined the map file and my own read, write, copy routines considering the
CPLD.
I think my routines are correct (but we never know) because with High Memory
Support disabled everything works fine and even with High Memory Support raw
read and write works fine.
But when CONFIG_HIGHMEM is enabled i can mount the JFFS filesystem, but when
I try to access existing files in filesystem oops is caused with following
dump:
****************************************************************************
****
Unable to handle kernel NULL pointer dereference at virtual address 00000000
printing eip:
c024db99
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0060:[<c024db99>] Not tainted
EFLAGS: 00010216
EIP is at cpci747_uflash_copy_from+0xc9/0x110 [kernel]
eax: f9749dc8 ebx: 00001000 ecx: 00000400 edx: f71d0000
esi: f9749dc8 edi: 00000000 ebp: 00000000 esp: f71d1d84
ds: 0068 es: 0068 ss: 0068
Process vim (pid: 549, stackpage=f71d1000)
Stack: f9749dc8 c030209e 000000a0 f71d0000 f71d0000 00005dc8 00000000
00000000
c024c1be c03db8c0 00000000 00005dc8 00001000 f7bbdadc 00005dc8
00001000
f7bbdb18 00000000 00001000 c0249bed c03db8c0 f7bbdb18 00005dc8
00000000
Call Trace:
[<c024c1be>] do_read_onechip+0x9e/0x170 [kernel]
[<c0249bed>] cfi_intelext_read+0xbd/0xf0 [kernel]
[<c0243b7f>] part_read+0x6f/0x100 [kernel]
[<c011c254>] release_console_sem+0xc4/0xd0 [kernel]
[<c01d1dad>] flash_safe_read+0x6d/0xa0 [kernel]
[<c01d44f6>] jffs_get_node_data+0x86/0xc0 [kernel]
[<c01d464d>] jffs_read_data+0x11d/0x150 [kernel]
[<c01d79f7>] jffs_do_readpage_nolock+0xd7/0x180 [kernel]
[<c01d7abf>] jffs_readpage+0x1f/0x40 [kernel]
[<c0138413>] do_generic_file_read+0x2b3/0x4b0 [kernel]
[<c015462c>] permission+0x8c/0xa0 [kernel]
[<c0138a72>] generic_file_read+0xb2/0x170 [kernel]
[<c01388c0>] file_read_actor+0x0/0x100 [kernel]
[<c013edad>] kmem_cache_free_one+0xed/0x200 [kernel]
[<c0148353>] sys_read+0xa3/0x120 [kernel]
[<c0107a8f>] system_call+0x33/0x38 [kernel]
Code: f3 a5 f6 c3 02 74 02 66 a5 f6 c3 01 74 01 a4 8b 44 24 0c ff
<6>note: vim[549] exited with preempt_count 2
****************************************************************************
*******************
I tried to analyze the cause for the oops. It's because the
"memcpy_fromio(to, from)" function which copies data "from" flash "to" ram
(in our case) is getting NULL pointer for "to" argument. This NULL pointer
is generated in the function "jffs_do_readpage_nolock()" function which uses
"page_address(page)" function to get that "to" memory buffer pointer.
I may be wrong but I have doubt whether JFFS supports CONFIG_HIGHMEM or not
because "jffs_do_readpage_nolock" directly uses "page_address(page)" to get
the address in memory corresponding to a page number. If a CONFIG_HIGHMEM is
supported it should be through "kmap()" which internally calls
"page_address()". And also no where in the JFFS subsystem i.e., in
"$KERNEL_PATH/driver/jffs/" CONFIG_HIGHMEM is considered.
I am a newbie to linux and may be silly but just want know if high memory is
supported in JFFS how is it possible without using kmap
Thanking You in advance
Harish
-----Original Message-----
From: David Woodhouse [mailto:***@infradead.org]
Sent: Wednesday, September 08, 2004 4:27 PM
To: Kodandaram, Harish
Cc: jffs-***@axis.com
Subject: Re: Does JFFS supports high memory
Post by Kodandaram, HarishHello all,
i'm newbie to JFFS.
i'm writing a driver for Intel Strata Flash.
For what OS? Linux already _has_ drivers for Intel StrataFlash, as does
eCos.
Post by Kodandaram, HarishIt's possible to mount JFFS filesystem with High Memory Support disabled.
But if I enable High Memory
Post by Kodandaram, HarishSupport mount fails though my raw read and write works. I just wanted to
know whether JFFS supports High Memory.
It should, although it's rarely tested. I assume you mean JFFS2, not
JFFS? Can you describe the failure in more detail?
--
dwmw2
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to ***@axis.com