Re: [Yaffs] Re: mtd_info/mtd_info_user>size wrong type

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
CC: jwboyer
Subject: Re: [Yaffs] Re: mtd_info/mtd_info_user>size wrong type
I think you will have better results trying to resolve an mtd issue on the mtd
list.

On Saturday 07 April 2007 16:27, Tian Jin wrote:
> I have tried to change size from u_int32_t to u_int64_t, but kernel had
> unrsolved symbol: __udivdi3 and __moddi3 while linking, I thought those
> two functions should come from libgcc.a, if I link to libgcc, the problem
> should be resolved, or I can just use do_div() from asm/div64 to replace
> "/" and "%" for mtd_info->size.


do_div() is probably going to be required.

>
> I used do_div() method, and modified source line that use __udivdi3 and
> __moddi3 to use do_div() instead, after that the linking probem was gone,
> but kernel had some problem showing MTD partition names:
>
> Using physmap partition information
> Creating 6 MTD partitions on "physmap-flash.0":
> 0x00000000-0x00040000 : "<NULL>"
> 0x00040000-0x00080000 : "<NULL>"
> 0x00080000-0x00300000 : "<NULL>"
> 0x00300000-0x00320000 : "<NULL>"
> 0x00320000-0x00a00000 : "<NULL>"
> 0x00a00000-0x01000000 : "<NULL>"
> NAND device: Manufacturer ID: 0xec, Chip ID: 0x73 (Samsung NAND 16MiB 3,3V
> 8-bit)
> Scanning device for bad blocks
> Bad eraseblock 979 at 0x00f4c000
> Creating 1 MTD partitions on "NAND 16MiB 3,3V 8-bit":
> 0x00000000-0x01000000 : "<NULL>"
>
> If i cat /proc/mtd the kernel Oops:
>
> ARM ~]# cat /proc/mtd
> Unable to handle kernel paging request at virtual address 00004000
> pgd = c1800000
> [00004000] *pgd=21e5b031, *pte=00000000, *ppte=00000000
> Internal error: Oops: 17 [#1]
> Modules linked in:
> CPU: 0
> PC is at strnlen+0x1c/0x44
> LR is at vsnprintf+0x304/0x588
> ...
>
> I think it must be a printk problem, and I'm still trying to resolve
> this...


I am not really suprised you get problems like this. You will probably need to
change code right through the whole mtd subsystem to fix the problem.

-- Charles